4 Hugues Ross - Blog: Halberd Update 2 : Scrolling Around
Hugues Ross

9/13/15

Halberd Update 2 : Scrolling Around

Just as promised, here's a short update on my progress with Halberd. I've started to adopt a new strategy for work that spreads my work out more, so work on individual projects has slowed down a bit. On the other hand, I think it's more fun, and I've been making more progress on projects that had been sitting by the wayside for a while.

A couple of things have been done for this project since this summer. The biggest update has been to map loading and scrolling. Just like I originally explained, maps are loaded as the player walks between them. To ensure that the game world can grow to any size, actors in the world use 3 sets of coordinates. The first one refers to the map that the actor is in, the second is the tile that the actor is on within the map, and the last set is the position used for rendering. Using this setup, we can allow actors to move smoothly between tiles, and while also having enormous maps without any extra tricks.

This update is pretty short, so I'm also going to leave a couple of screenshots showing off the current status of the editor and game.
Here's a view of the test player standing at the intersection of several map segments. The unsightly seams will be going away shortly, but in the meantime they do a good job of showing how the maps connect nicely.

Now, here's a second view of the area, from the map editor. As you can see, multiple map segments work even in the editor now, as does zooming. However, the editor doesn't yet support map streaming like the game does. I also need to get the grid to draw on more map segments. It shouldn't be hard, but the multiple segment feature is still a work in progress for the editor.

Lastly, I just finally got the code for this project up on Github. If you're wondering how much duct tape is involved holding this engine together right now, you can finally find out! My next goal is to clean up some of the little bugs here and there, and polish the editor up a bit more. After that, I can get back to adding more gameplay features.

No comments: