By Bio2hazard 2 Comments
Well, here it is. My first blog post in what will hopefully become a series, describing both my pains and my joys as I work on my game.
Now then - the game! It is of yet untitled, though I named my project SmartRPG for no particular reason.
I have decided to make my first game a roguelike. In the vein of Dungeons of Dredmore, nethack and - especially - ADOM. ADOM has a wonderful thing called the infinity dungeon, and that is the general idea that I want to bring onto a mobile device.
It is a dungeon in which every level is randomly generated when you enter it - including levels that you have been to previously. And it honestly is my favorite part about ADOM.
My goals for this game:
- Randomly generate each level of the dungeon, and populate it with loot, monsters, traps etc. Levels get progressively harder.
- Create and maintain online leaderboards. Data is submitted upon death and can be filtered by lifetime, weekly & daily.
- Load most game data via XML files, for easy editing & modding.
- Compatible with iPhone, iPad, Android
For the development platform, I chose Adobe Flash Builder 4.6 Premium. I do not have the license, nor do I have the money to buy it, so I will have to finish this game within 54 days.
Flash Builder fills the goal of cross-platform compatibily. It can release to both iOS and Android, and provides me with the ability to preview my game on all sorts of different devices as I work on it. Nifty!
But enough of that, Here is where I stand:
I've taught myself the basics of using ActionScript and Spark, and I have successfully created the Main Menu ( currently only with a "Start" button ), the prestigious "Name Thyself" screen, in which you enter your hero's name. I will later expand this with class selection, and may add another page for perks and such. And, the most important part, the main game screen.
The main game screen is where Flex became... problematic. All forms of data output that I tried had a lot of issues attached to it. DataGrid would insist on spacing each text element like, 14 pixels apart, even after attempting to use a custom renderer and skin. Attempts to set it lower than 14 pixels would cause it to not display anything. I tried TileSet, but again, weird spacing. I tried just using a label, but then it becomes impossible to color individual characters...
I ended up using a RichTextField that has selecting and editing turned off. It blends in fairly nicely, spacing is ideal and I can color elements ! Wooo !
I then, after finally getting the mapdisplay right, added some basic movement controls. It checks whether the target cell is walkable, and if yes, moves the hero, who is a part of the unit class to the desired cell. I'm really beginning to like classes. I have a class called unit, of which the hero is a instance of, a class called Cell, which holds information about a single cell in the grid (x, y, walkable) and a class called map, which has basic map information ( level ) as well as holds the 2d array of Cells which make up the map.
Finally, a screenshot to show the work in progress (testing on a iPhone):
# Denotes a solid rock wall
. Donates a empty section of floor that can be walked over
@ Denotes our Hero
Tomorrow, I am hoping to work on a map generator. I am planning on defining a few pre-made rooms, and then having the program generate hallways that lead to the generated rooms.
Feedback and comments are very welcome. Let me know if you are interested in any actual code samples, or have any questions.