Monday, 30 November 2009

Weekly update

Another weekly update, sort of on time. Progress:

- Semi-written the class for my NPCs, to the point where they will spawn in towns with some basic properties such as health. They currently have no AI though, and probably won't do for a while. The concept of coding AI currently terrifies me.
- The groundwork for the RPG side of things has been coded into my Player class. HP, XP, etc, etc. Leading on to...
- The beginning of combat. The player now has the ability to attack, and attacking an NPC knocks the NPC back and does damage based on the player's STR (strength) statistic. Should an NPC's health fall below 0, it will "die". If an NPC is dead, they're no longer shown on screen and the player can no longer interact with them. The instance of the NPC class remains, however, until the town is left. Also, walking in to an NPC hurts the player, knocking them back and lowering their health, which can be seen on the...
- ...Health bar! I've begun coding and drawing up a simple GUI. So far I've got nicer looking buttons for the boat travel menu and some placeholder buttons that will eventually let the player open the character sheet, inventory, quest log and game menu (all of which I need to draw up placeholder screens for and get working). I also have a working health bar that fills up depending on what percentage of health the player currently has, which looks quite pretty and is the first example of something working straight away exactly as I planned it. Of course, all this is subject to lots of change, but everything so far looks nice enough for a prototype.

I've also changed up some colours in the still flat colour tileset to make things a little easier on the eye, and have been researching how to do draw good tiles and tilesets. I'm getting quite into it. Plan for this week:

- Get Inventory screen drawn up and Inventory system working, with items generated when NPCs are killed.
- Expand the RPG stuff, with the player gaining experience points when an NPC is killed and then levelling up when enough points have been acquired (standard RPG stuff)
- Once that's done, I can move on to the stuff I really want to get right: Quest generation. This is the big one, and the way I'm planning it will involve me moving a lot of code around to get it working as ultimately intended rather than as prototype code. I'm going to have to code the quest generation system itself, get friendly NPCs going, get some more map generation stuff going and get the player dying properly.

I also have a fair amount of bugginess and undesirable behaviour to code out, mainly surrounding controls. Should make for a fun week.

Wednesday, 25 November 2009

Weekly Update

So everything that was working last time is still working and everything that was broken by my OOP game loop has been fixed. On top of that, I've made some decent progress over the last week:

- Towns can now be entered and left, and have a randomly generated layout. Currently the towns just have a bunch of grey tiles in them so I could see if they were generating differently or not, but eventually they will have houses and roads and people.
- Port Towns now exist. One per island, on the coast. They're pretty much same as towns except they have a coastline and a "boat" (a big brown rectangle) in the town.
- Island to Island travel is now possible. Walking into a boat in a port town opens up a travel menu and allows you to warp to another island. In the future, there'll be a snazzy little boat travel animation. Probably.
- Plenty of general bug fixes and crash preventions.

Next on my list is combat and NPCs. I'd like to get more map generation stuff going but it's currently more important that I get some proper gameplay in there rather than a more complex map. And now, some screenies:


 My placeholder title screen with working
new game button. 

 
An island. Green = Field, Light grey = Mountain, 
Yellow = Town, Orange = Port Town. The black square
with the dot in is the current player character... 

 
Inside a port town. Boat!

 
The travel menu. Also has a "Go to North Island" option
when you're not already on the North Island. Similarly
if you're on the SE or SW Islands, their options won't
be available. 

 
Another island that I just travelled to. 

That's about it for now. If I can keep myself from spending all my time playing Torchlight this week, I should make some decent progress.

Monday, 16 November 2009

Weekly update my arse.

It's been almost a month. This project (along with my Borderlands addiction) is slowly turning me nocturnal. 5am is my usual bedtime these days, more often that not after two or three hours of tearing my hair out over stupid nonsensical programming issues. Even with the silly bedtime increasing the number of hours available to me in which to work, I'm falling further and further behind. Anyway, general progress report:

- Map generator now generates three islands that don't overlap or run off the edge of the allotted space for the entire map.
- Mersenne Twister random number generator implemented. The in-built C++ random number generator isn't random enough.
- Moveable, animating player character implemented (well, it's just a flashing box at the moment). Collides with walls and everything.
- Placeholder title screen with working "New game" button.
- Object orientated state machine/game loop going. While it's a good solution to a game loops, the added programming complexity is the source of my current problems.
- Character art is coming along, which is nice.

Next on my to-do list is get everything working again. Implementing the OOP game loop has broken most of the stuff I'd coded before so it all needs to be reworked. It's getting done though, if slowly. Once that's all done getting everything else working in it should be a fairly straightforward process, as straightforward a process programming a dynamically generating quest system can be.

And so I retire to bed. I wonder if I can wake up before 2pm today. It would be nice.