Last year I learned the basics of jMonkeyEngine, and though I intended to create a 2D game with it, I only ended up creating the MIDI animator mentioned in my last post. But for a tile-based 2D game, it’s really not ideal. It’s certainly capable of producing such a game, but as an engine, it’s not really designed for it, and I realized I’d have to spend a considerable amount of time just programming a custom framework for such a project.
So last month I began learning LibGDX, which is certainly better suited for the sort of tile-based 2D adventure game I’d like to create.
So here’s what I’ve got so far (the art is temporary, simply a free tile set I found out there, though I think I’ll be aiming for tiles that are 16×16 pixels as well, so this represents the size I’m hoping for):
Doesn’t look like much, but I’m still learning and programming the basics I’ll need before I actually start programming the actual game play. What I’ve learned and/or programmed so far includes:
- loading and displaying a tilemap (a .tmx file from Tiled)
- dynamic window resizing (or resolution changing) without completely screwing up the aspect ratio (trickier than it may sound)
- basically it will always render with a resolution of 1280×720, which is then rendered as a texture to whatever resolution the user sets; handy for Android devices which may feature differing resolutions which cannot be changed
- using Ashley as an entity framework
- using Box2D for character movement and collision detection
- animating the character as he walks (much easier with LibGDX; I had to program a custom shader with jMonkeyEngine)
- real-time A* pathfinding (hope to use it with NPCs)
- text (as you can see at the bottom there) to be used with menus, dialog, etc. (nice little font called Munro) (this is also much easier with LibGDX)
- custom shader to make object tiles “light up”
Still lots to program, but I reckon that’s an OK start. The to-do list before I can actually begin programming the actual game-play logic includes:
- have interactable objects “light up” as the player nears them, along with a small pop up menu with available actions (pick up, talk, examine, activate, etc.)
- design and implement a menu panel / status bar (along the black panel along the bottom)
- this menu will switch to a “dialog mode” when the character is talking with someone (as in The Secret of Monkey Island, for example)
- pause menu with save, load, quit, settings, etc.
- camera movement for when the player walks off the screen
- loading another tilemap for when the character leaves a village or enters a house, for example
- I need to try sticking an NPC in there and having it play through some scripted material, utilizing the aforementioned A* algorithm as necessary
- real-time combat system
- cast a spell or swing a sword to injure attacking enemies (the combat will be simple in this game, nothing fancy)
That’s all I can think of at the moment, but that’s plenty, isn’t it?
The game itself will be pretty short; I’ve tried to keep it short on purpose since even a short game is a lot of work, especially when you’ve never done it before and don’t have a pre-existing framework your familiar with to use. If I manage to actually succeed in this endeavor, I hope it will be easier to create new adventure games and/or RPGs in a similar style without having to reprogram these basics again, at least not from scratch.
The tentative title for the game is Memory of a Thousand Kings, which began as a half-plotted fantasy novel, but I think it will work better as an adventure game.