Posts from May 28 - May 31
Published on June 17, 2008 By Sekerah In Game Development Journals

May 28th Posts
I decided to take a break from studying and do some more coding. I started to implement keyboard recognition. It was a lot easier than I thought it would be.
Link: http://www.flickr.com/photos/26996118@N06/2532426920/sizes/o/

In the screen you can see a test display message I coded in to see if my code for recognizing the 'a' key was correct.

Next Step:
1. Start implementing the correct actions for specific key inputs.
2. Implement the necessary code to allow the player to move around and for the screen to update accordingly.

May 29th
Did a little bit of coding after I got home. Nothing to show really just coding of some behind the scenes stuff needed for movement and a few other things.

May 30th
Well I had to throw out about half the code I was working on yesterday but I only worked on it for about an hour so it isn't a big deal. After rewriting some of the code in a much better way and a way that actually works I now have movement enabled for "north" direction. I need to implement some code so you can only walk where you are supposed to be able to but that isn't difficult. Then it is a simple matter of copying and pasting then editing a few lines to get movement in the other 7 directions.

There is one small problem, the screen flickers very briefly when it "moves" you as it needs to repaint the entire screen. It isn't really a big deal but I'm going to see if I can fix it. It may require that I implement the way the map is drawn to the screen and updated in a completely different way. I'll have to look into it. For now though, during testing, it isn't a big deal.

Divider
A little bit of research has revealed something called double buffering, wherein you draw the new updated screen "off screen" first then make it visible rather than clearing the current screen and then drawing the new image you want. I'm going to implement this and see if it eliminates my flicker problem, from what I have read it seems likely that will do the trick.

-----------------------------------------------------------------------------------------------------------------

Well double buffering works extremely well. No more flickering, yay! Now to start implementing movement restrictions(so you can't walk through walls, door, etc).

Divider
Movement in eight different directions is implemented(I haven't done up or down yet as there is no need for that at this stage). The game recognizes walls and such and won't let you move into them. Flickering as mentioned before is completely eliminated.

Next Step:
1. Implement other actions such as search, open, close etc.
2. Start designing menus for items, learning new skills, talent tree etc.
3. Start implementing monsters/items for testing purposes.
4. Implement a turn system.
5. Implement a line of sight system.

Some of the above things will be very easy to do(open, close), others will take a bit longer like the turn system or menus and other are easy to do buy other necessary sub-systems are not yet implemented so I can't really do them yet(searching- can implement partially, learning new skills). Also that is not an order in which things will get done. Number 1 I can get done right now for the most part but some of the other things might get pushed back.

Divider
lso I just thought up something while I was taking a break from coding.

Nemesis monsters. Basically if you die to a monster you will have the opportunity to name it. The monster will then be saved, perhaps with a small boost to its power and in future games you will have a chance to encounter it at the same level it killed you on. If you manage to kill it that next game it gets "deleted" so it can't appear any more but if it kills you again it gets even stronger.

If you kill a nemesis monster then you would be able to get an appropriate reward based on the monster's base difficulty level and how many times it has killed you. The change to see a nemesis monster would be fairly small probably somewhere in the range from 1/20 to 1/100.

Do you like the idea? Think it should be modified somehow? Hate it?

May 31
Ok so I just implemented opening/closing doors. I also laid the groundwork necessary for other directional actions. Not all that exciting but necessary to play the game so it is important.

Some images, they also show off the new msgbox which the game uses to send messages to the player.
http://www.flickr.com/photos/26996118@N06/2539246620/sizes/o/
http://www.flickr.com/photos/26996118@N06/2539246676/sizes/o/
http://www.flickr.com/photos/26996118@N06/2538425505/sizes/o/

Next step:
1.Implement searching.
2.Start working on menus.
3.Start laying the foundation for items/monsters/spells/etc.

Divider
Searching for hidden doors is now in. As of now you can completely traverse the level that you are generated on(locked doors haven't been implemented yet).

Next Step:
Not entirely certain yet but I'll need the following things fairly soon before I can continue on to other parts of the code:
1.Item generation.
2.Monster generation.
3.Code to save level files.
4. Traversal up and down stairs.
5. Save game code(different from saving the level layout).
6.Item "piles" - basically how item locations are stored on the map and allowing for multiple items to rest on a single tile.


Then some things that can probably wait for a while but will need to be done eventually:
1.Item menus.
2.Levelling up.
3. Character creation
4.Hidden item stashes in walls.
5.Other menus.
6.Various other features I've mentioned.
7. Perma death.
8. A whole bunch of other stuff I'm not even thinking about right now.

-------------------------------------------------------------------------

 Started to implement the line of sight system. You can see a pic I took on a partially explored level here: http://www.flickr.com/photos/26996118@N06/2539542263/sizes/o/

Currently it just reveals two tiles in all eight directions every time you move. Obviously that won't do for the final game, since it allows you to see through walls and it doesn't reveal an entire room when you first walk into it.

I'm thinking for the final version I'll make it so you can see as far as a wall or a predefined number of tiles, whichever is closer. I have an idea for how I'll do it but I'm not certain if it will work. On paper it seems good so I'll just have to try and implement it and then see what happens.

-----------------------------------------------------------------------

I've been busy implementing the better line of sight system. It mostly works now, the few bugs that remain usually only occur when you are in a hallway so they shouldn't be too difficult to fix.
Example of one of the bugs: http://www.flickr.com/photos/26996118@N06/2539694905/sizes/o/

As you can see in the above pic you can see around corners in hallways currently. Besides that there are 2 other bugs, that I know of, that I need to fix before it is fully functional.

-----------------------------------------------------------------------

 Just tried ADOM out. I only played for a few minutes before I died but here are my initial impressions.
1. I like how when you level up you can increase certain skills. As I mentioned before I'm planning on having crafting skills, talents, as well as class specific abilities as you lvl up so naturally this appealed to me.

2. It might just be that I played Nethack first but I like the way it looks more than Adom. I know they both use ASCII chars but I prefer Nethack's "visual style".

3.I only created one character but Adom's character creation system seems to be more in depth than Nethack's system, which I like.

4. I don't really like Adom's "World Map". IMO having a single dungeon with various sub-dungeons, ala Nethack, works better for this type of game. However, I may change my opinion as I play Adom more.

Anyways I didn't play long before I died so I don't have many thoughts about Adom yet and the ones I do have may change as I play more.

-----------------------------------------------------------------------


Comments
No one has commented on this article. Be the first!