Shine that floor!


Important stuff first: Heroes of Loot 2 is on Greenlight, and can use every Yes vote it get’s.. so please vote for it here: Heroes of Loot 2 Greenlight page

Second important stuff: I adding commentary to my development video.. I still need to practice at it cause I don’t like talking to a computer, but it’s something that I can work on and might actually become second nature with some practice ;)

We’ll see how it goes and if you guys like it or not (can always mute the video!)

so.. video first? ok!

About that shiny floor! nice isn’t it? There are probably awesome ways to do this with shaders or other trickery and wizardry, but I just took the old-fashioned way of simplicity:

So every frame update I have to add all the sprites to a sprite list because for the top-down view to work correctly I need to do a simple sorting and make sure sprites are rendered from top to bottom.

Now to make the shine effect all I did was run through that sprite list one extra time where I vertically flip all the images around their “feet axis” and make them transparent.

….uhm and that’s really it! My scene render does the following

  1. fill the screen what the darkness color (the part that’s solid outside the dungeon area’s)
  2. render all floor tiles and blood spatters
  3. render the spritelist in a flipped state (unsorted, cause no human eye will notice that anyway)
  4. render all the walls
  5. render the spritelist in the normal way (and sorted from top to bottom)

Thanks to LibGDX’s sprite batching, this only generates a single extra draw call for the flipped-state sprites, so it isn’t even noticed in the frame-rate ( tested this on my Nexus5 and old iPad to make sure ).

As mentioned in the video, I need to get rid of those silly speech bubbles that Valkyrie keeps saying. The problem is that it’s actually part of Valkyrie’s powers to “feel” items and secret area’s, so I can’t completely remove it.

My first thought is to start using some sort of icon/indicator that lights up when there is something interesting like hidden loot or secret area’s. I’ll be trying to figure that one out before next week.

Finally, with the shop being a “special room”, I hope to add a few more of those. It would work a lot like the buildings in the original Gunslugs. So basically anything could happen in there. As simple example: you could stumble upon a princess who thanks you with a bunch of coins. Or you could stumble into the king’s bedroom and suddenly be surrounded by his guards.. I’ll have to come up with some funny ideas for those rooms!






Bookmark the permalink.