I'm making a (mobile) game!

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.

I have programmed for over 5 years, mostly a mix between Web ( PHP, MySQL, HTML, CSS, javascript, jQuery ) and C ( with some C# thrown in here and there ) and I would say that I'm a good programmer. I do however lack experience when it comes to Object-Oriented Programming - but I'm sure that will change as this series progresses.

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.

2 Comments
2 Comments
Posted by Bio2hazard

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.

I have programmed for over 5 years, mostly a mix between Web ( PHP, MySQL, HTML, CSS, javascript, jQuery ) and C ( with some C# thrown in here and there ) and I would say that I'm a good programmer. I do however lack experience when it comes to Object-Oriented Programming - but I'm sure that will change as this series progresses.

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.

Edited by Murdouken

I'm just throwing it out there that Flashdevelop is an extremely good and an extremely well made alternative to Flash Builder, and it's totally freeware. It's what I have been using while I learn to develop AS3 games. It might be something to consider.

http://www.flashdevelop.org/

This looks quite nice so far though, I really do have a soft spot for permadeath and such things. Good luck with making your game. If it works on iOS 3.1.3 on an iPhone 3G then I'd totally buy it.

Edit: I'm also throwing another thing out there, if you are having trouble getting stuff to work you might want to consider trying Flashpunk. http://connorullmann.com/2011/04/air-2-6-and-ios/ is a good tutorial for getting it to run on iOS using Flashdevelop and it really, really, really streamlines the development process of AS3 games.