gearleaf

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

Down Week

Shamus

So I had no internet for the last week. I mentioned this would be happening. What I hadn't realized at the time, of course, is that I had trashed my Visual Studio install so I was unable to actually do the engine work on Verge that I wanted to.

So I grumped and stamped around a bit and then decided to just work on something new for a bit. I've had an idea for a rogue-like engine floating around for a while now, so I thought I'd take a first few opening stabs at that. It is a web 2.0 rogue-like: ROGR. (Yes it's dumb, I know.)

You can check it out at http://rogr.gearleaf.com/. It's not terribly exciting yet -- it's just the barest bones of an engine, but it's what I've got this week.

I will almost certainly come back to Rogr in the future, but I really only started it in the interest of not going insane for a week. I'm back on Lichen starting right now.

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.

« Newer Older »