gearleaf

Viewing posts tagged 'lichen'

Importing and Updating Tilesets

Shamus

As I said last time, making new maps is not useful if you can't save the map elsewhere or import tilesets. Well... I set out to get both of those finished off this week, but the one I started with (importing tilesets) ended up being more tricky than I'd anticipated. Pair with that a fairly busy week otherwise, and well... here we are.

At least I did get the tile importing working though. If you switch to VSP mode (hit V or click on the tiles in the top left) you now have a button that says "IMPORT: IMAGE". Clicking it will load a particular image in as your tileset. Ta-da! The image is in tmp/ inside the project. Importing it again should bring in your changes (thought I admit that this has not been thoroughly tested yet).

Anyway, that's one more task knocked out. I'll continue on. See you next week!

Lichen is available on Github

Layer Resizing in Verge

Shamus

Actually got to work on Lichen a bit this week. Most of the work is invisible, sadly!

First off, I updated the Verge engine to allow for resizing the current map. A call to

v3.map.resizeLayer(<layer index>, <new width>, <new height>, <offset x>, <offset y>)

will resize a single layer. An important underlying thing to note here is that your Obstruction and Zone layers are always the same size as your bottom-most layer (index 0) so they will get resized along with it. The offset params will let you control where your data gets copied into; so for example if you wanted to add a 10 tile border around the whole map you'd use

v3.map.resizeLayer(0, v3.map.w + 20, v3.map.h + 20, 10, 10)

and you'd get a blank (tile 0) border all the way around. You can use negative offsets to carve out a chunk in the middle of your map if you'd like, too.

Anyway, this was in service of being able to resize maps and create new maps. Creating new maps is not, however, terribly useful without being able to import tilesets or being able to save to some place other than a fixed location, so my next two targets are importing an image as a tileset, and adding a file dialog for saving and loading. Since this stuff isn't in place yet, though, this work is all invisible -- if you go into the code and actually write some resize lines you can see it happening but there's no way to actually trigger this within the editor yet.

Other small miscellaneous things I did:

  • When in VSP mode, removed the grid lines on the map behind the mode
  • Fixed a problem with 'get' in the console
  • Upped the resolution that the editor uses; now actually uses 640x480 so we've got reasonable space for UI
  • Added a simple reusable text button to my UI classes

Consolation Prize

Shamus

More work on Lichen. The console now supports getting and setting variables within the script. These are live querying/updates. Not terribly exciting, but it does hackishly allow you to change the map location where you will save to when you hit ctrl+S, by typing

set lichen.current_map foo/bar.map

Hooray! The code update should theoretically also allow you to load another map, but there is no way in the console currently to fire the lichen.loadMap() function. Sadness.

The next step is to allow the creation of new maps, and then to tie all of this together with a file dialog of some sort to let you open and save maps. The problem here is that Verge does not allow you to resize a map after it's been loaded, meaning to allow this (and thus allow the creation of new maps based on a template) I have to go and modify the engine. I wasn't previously set up to do this (needed to install Visual Studio and all of that muck), but I now am, and ready to plow back into the problem when I have free time.

Of course the hilarity continues because I am moving into a real apartment tomorrow. And I'm not sure when we'll get an Internet connection hooked up because we've left it to the last minute and haven't made an appointment yet. Sigh. In any case, hopefully I'll figure things out enough to post again in a week's time. Barring that, I guess I'll have lots of time on my hands.

So...

Shamus

Since my last post I left my apartment, got married, left my job, got rid of most of my stuff, moved to a different country and across the continent, and started a new job. In a bit more than a week I'll be moving into my new apartment. I blame all of this on Grue who callously and fiendishly got me an interview for a pretty fantastic job in California. That's where I am now. It's a little weird.

So as you can imagine my free time has been a little curtailed. However, things are starting to calm down again and I am sick and tired of not doing things, so I've started working on Lichen again. I've also started using a reasonably neat tool to keep track of what I need to do and features I'd like to add.

In terms of actual accomplishment, I've fixed a rendering issue where holding space did not swap your mouse cursor properly (to the hand), and I've added a console. The console can be summoned by hitting F1 (Columns is currently unavailable) and you can type into it. It's not very fully featured yet but I'm working on making that better. It should, ideally, be something that you can drop into your own Verge games! Because you're making Verge games, right?

Right?

Columns

Shamus

Just a quick note. I've added what every good map editor needs to Lichen: Columns. Check out what I have in the github repository, and hit F1 to open it up. It's pretty gross right now, but it's pretty close to fully functional.

Get Lichen from the github repository.

Older »