Category: g2dp

G2DP and the missing parallax

Development on the Generic 2D Platformer library is slow going, but I’m still making the occasional time to work on it.

This last weekend I finally got around to adding parallax in the vertical axis. It’s something that I’d just never gotten around to doing, and all that was needed was an additional 4 or 6 lines of code.

G2DP merged

I’ve imported (copied and pasted) most of the posts from the G2DP site over to this blog. I won’t link to it as I’ll be removing it soon. It just seemed silly to me to have a separate home for G2DP when it could just as easily live here.

Slick beer themed contest almost over

So, there are only 4 days left for me to finish “Beer Bottle Rocket Man”. That’s the game I’m submitting for the contest at the Slick forums.

How is that relevant to G2DP? Because I’m using the Generic 2D Platformer game library in Beer Bottle Rocket Man. As I use it, I see areas that could use improvement. And areas that are potentially broken and need some work done.

So tonight I’ve added a drawEntity method to the Camera class, which allows easy drawing of any entity, in addition to the player, so the developer no longer has to track the screen position of said entity. I had it in place for the player for a long time, but tonight it just made sense to add that functionality.

Slick’s setColor method

I’m just messing around with the setColor method in Slick. It allows you to manipulate the color property (red, green, blue, alpha) of a corner.

The numbers, 0 through 3, represent the four different corners of a tile (as shown in the image). The combinations of corner manipulation with 100% transparency are indicated in the image.

Secret Areas

I’m quite proud of what I’ve got to show off today.

Here we have the hero inside a “secret area”. It’s not so secret if you’ve been testing out the demo on a regular basis. It’s the first room of the demo, just with a big rock placed onto the foreground layer.

Now the player can see where the hero is at when he’s standing behind a tile.

Staypressed theme by Themocracy