#game development

Screenshot of Wrong!, a Pong variant

It's like Pong, but Wrong!

Wrong! is a project coded in C++ using the Raylib framework. It's a simple concept - instead of hitting the ball with your paddle, you do NOT want to hit the ball with your paddle, allowing it to bounce off the walls.

My intent for this learning project was to use organizational aspects of object-oriented C++ to not only run a game, but manage it, between scenes, events, and entities, encapsulating the functions of the C-based Raylib library in objects with specific goals and responsibilities.

Project Page on itch.io

Source Repository on GitHub



seamless scrolling map

So I've been working on a hobby project making a jRPG for MSDOS using DJGPP and Allegro, and I have tile maps exported from Tiled scrolling seamlessly at 60fps even on an emulated 286 CPU. Which I think is pretty impressive! DOS games of the 286/386 era were not known for smooth 60fps scrolling. I'll elaborate on how I got it that smooth below.

First, I picked a 256x224 Mode X resolution, just because it's compatible with the SNES and Mega Drive, in case I ever wanna port this to those. This created the happy side effect that I just barely could fit a 2x2 grid of that screen plus one tile (for scrolling) into the virtual screen memory. That's 544x480, and Allegro says I have room for 544x481, just under the wire!

See, the problem with hardware scrolling on VGA cards is that, unlike consoles, they don't wrap around once you reach the edge. It just stops. But by cloning the screen vertically and horizontally but keeping the top-left corner of the actual viewport in the top-left quadrant, I can basically emulate the wrap around.

At that point it's just a matter of detecting a scroll left, right, up, or down, and updating the new tiles in the virtual screen's grid of tiles (which stays static while the camera moves).

read more


In general, it was a mess, so I'm re-organizing it in hierarchical scheme of entities which are initialized by a set of inputs.

Well, it might be weird, but seems to work well.

It could be improved and there's might have a bit of overhead in this process (many copies involved), but it's acceptable I think, I'm way more worried about making it clean and organized, otherwise I'll get overwhelmed by caos and not actually finish anything.