WIP - Demons of Dex
Moderator: Moderators
-
- Vic 20 Dabbler
- Posts: 78
- Joined: Mon Nov 18, 2013 1:06 pm
- Location: Finland
- Occupation: Game developer
WIP - Demons of Dex
Hi!
I'm writing a roguelike game in assembly for the unexpended VIC-20. The game is about 60% complete.
Status:
- level generation DONE
- doors DONE
- enemy and item placement DONE
- gradual reveal of map DONE
- status bar and message area DONE
- enemy AI DONE
- player damage and dying DONE
- usable items (not done)
- monster special abilities (not done)
- xp and level ups (not done)
- special levels (not done)
- end game (not done)
- sounds (not done)
How to play:
- move using W,S,A,D
- items are picked up when you walk over them
- attack by walking on monsters
Source code and PRG file here:
https://github.com/petrihakkinen/demons
I'm writing a roguelike game in assembly for the unexpended VIC-20. The game is about 60% complete.
Status:
- level generation DONE
- doors DONE
- enemy and item placement DONE
- gradual reveal of map DONE
- status bar and message area DONE
- enemy AI DONE
- player damage and dying DONE
- usable items (not done)
- monster special abilities (not done)
- xp and level ups (not done)
- special levels (not done)
- end game (not done)
- sounds (not done)
How to play:
- move using W,S,A,D
- items are picked up when you walk over them
- attack by walking on monsters
Source code and PRG file here:
https://github.com/petrihakkinen/demons
- Attachments
-
- dex2.png (24.07 KiB) Viewed 6631 times
Last edited by phvic on Tue Sep 08, 2015 7:07 am, edited 6 times in total.
-
- Vic 20 Dabbler
- Posts: 78
- Joined: Mon Nov 18, 2013 1:06 pm
- Location: Finland
- Occupation: Game developer
Re: WIP - Demons of Dex
Basic player movement, collision detection and random enemy placement done. Now at 344 bytes.
Now I understand why Kernal's PLOT routine is weird and takes X=row, Y=column and not the other way around... because there is no addressing mode "LDA ($D1),X" only "LDA ($D1),Y"! ($D1 = address of current line in screen RAM).
Now I understand why Kernal's PLOT routine is weird and takes X=row, Y=column and not the other way around... because there is no addressing mode "LDA ($D1),X" only "LDA ($D1),Y"! ($D1 = address of current line in screen RAM).
-
- Vic 20 Dabbler
- Posts: 78
- Joined: Mon Nov 18, 2013 1:06 pm
- Location: Finland
- Occupation: Game developer
Re: WIP - Demons of Dex
Descending to next level works now. Also implemented basics of player attacking monsters. 494 bytes used.
There seems to be a weird problem with keyboard input. For some reason when I hold left cursor while pressing cursor up, the player moves northeast (should be nw!). Can't see anything wrong with the code. Maybe limitation of Kernal's GETIN or bug in vice? Anybody care to test if this manifests on a real vic?
I'm done for tonight, if somebody is interested to check this out, comments are welcome!
There seems to be a weird problem with keyboard input. For some reason when I hold left cursor while pressing cursor up, the player moves northeast (should be nw!). Can't see anything wrong with the code. Maybe limitation of Kernal's GETIN or bug in vice? Anybody care to test if this manifests on a real vic?
I'm done for tonight, if somebody is interested to check this out, comments are welcome!

- joshuadenmark
- Big Mover
- Posts: 1180
- Joined: Sat Oct 23, 2010 11:32 am
- Location: Fr-Havn, Denmark
- Occupation: Service engineer
Re: WIP - Demons of Dex
Fast progress
will test tomorrow on real Vic.

Kind regards, Peter.
____________________________________________________
In need of a wiki logon - PM me
____________________________________________________
In need of a wiki logon - PM me
-
- Vic 20 Dabbler
- Posts: 78
- Joined: Mon Nov 18, 2013 1:06 pm
- Location: Finland
- Occupation: Game developer
Re: WIP - Demons of Dex
Thanks, looking forward to your feedback! 

Re: WIP - Demons of Dex
good work - I am also a fan of roguelikes (my program serpent caves) - will you be implementing the fog-of-war to progressively reveal the levels???
Android Tablet running Frodo 64 emulator running VIC 20 emulator....
-
- Vic 20 Dabbler
- Posts: 78
- Joined: Mon Nov 18, 2013 1:06 pm
- Location: Finland
- Occupation: Game developer
Re: WIP - Demons of Dex
Thanks! Yes, hopefully I will have some time this weekend to work on it.ravenxau wrote:good work - I am also a fan of roguelikes (my program serpent caves) - will you be implementing the fog-of-war to progressively reveal the levels???
btw. Serpent Caves is one of the reasons why I'm doing this

Re: WIP - Demons of Dex
phvic wrote:Thanks! Yes, hopefully I will have some time this weekend to work on it.ravenxau wrote:good work - I am also a fan of roguelikes (my program serpent caves) - will you be implementing the fog-of-war to progressively reveal the levels???
btw. Serpent Caves is one of the reasons why I'm doing this
glad you like Serpent Caves.....have you tried the 'alternate' version with the green on white color scheme and 9 levels?
Android Tablet running Frodo 64 emulator running VIC 20 emulator....
-
- Vic 20 Dabbler
- Posts: 78
- Joined: Mon Nov 18, 2013 1:06 pm
- Location: Finland
- Occupation: Game developer
Re: WIP - Demons of Dex
Not yet, when I get this done I'll check it outravenxau wrote:have you tried the 'alternate' version with the green on white color scheme and 9 levels?

-
- Vic 20 Dabbler
- Posts: 78
- Joined: Mon Nov 18, 2013 1:06 pm
- Location: Finland
- Occupation: Game developer
Re: WIP - Demons of Dex
New version with doors, preliminary colors and bugs fixed. Movement changed to W,A,S,D keys.
Getting closer to first playable version... 729 bytes used.
Getting closer to first playable version... 729 bytes used.
Re: WIP - Demons of Dex
just curious, can you give a brief description of how the maze/dungeon is generated??? - I always find it interesting to see how people develop solutions when creating games
Android Tablet running Frodo 64 emulator running VIC 20 emulator....
-
- Vic 20 Dabbler
- Posts: 78
- Joined: Mon Nov 18, 2013 1:06 pm
- Location: Finland
- Occupation: Game developer
Re: WIP - Demons of Dex
Sure! The level generation algorithm is actually really simple (I needed it to be really tiny, about 100 bytes). I start with an empty level and place a random walker on the map. The walker carves tunnels and turns at map boundaries. There is also 30% chance of making a random turn.ravenxau wrote:just curious, can you give a brief description of how the maze/dungeon is generated??? - I always find it interesting to see how people develop solutions when creating games
Door placement is a little bit more complicated and adds about 200 more bytes (I'm not totally happy about this bloat). I scan the entire level and for each floor tile encountered I compute a bitmask encoding the walls of the 8 neighbor cells. I have a list of predetermined values, and if this bitmask matches with any of them in the list, a door is placed in the empty cell.
Stairs and monsters are placed on randomly selected empty spaces. I need to work on stairs placement, currently it's possible for the player to start next to the stairs making for a really short level

-
- Vic 20 Dabbler
- Posts: 78
- Joined: Mon Nov 18, 2013 1:06 pm
- Location: Finland
- Occupation: Game developer
Re: WIP - Demons of Dex
Does anyone know if it's possible to call BASIC's random number generation routine from assembly to create (preferably uniformly distributed) random numbers in range 0-255? I know BASIC operates on floats, but maybe it's still possible...
Re: WIP - Demons of Dex
Scan the jiffy clock might be an optionphvic wrote:Does anyone know if it's possible to call BASIC's random number generation routine from assembly to create (preferably uniformly distributed) random numbers in range 0-255? I know BASIC operates on floats, but maybe it's still possible...
Android Tablet running Frodo 64 emulator running VIC 20 emulator....
Re: WIP - Demons of Dex
Do you just pick a random new direction for the drill head, or rotate it 90 degrees each change?phvic wrote:Sure! The level generation algorithm is actually really simple (I needed it to be really tiny, about 100 bytes). I start with an empty level and place a random walker on the map. The walker carves tunnels and turns at map boundaries. There is also 30% chance of making a random turn.ravenxau wrote:just curious, can you give a brief description of how the maze/dungeon is generated??? - I always find it interesting to see how people develop solutions when creating games
Door placement is a little bit more complicated and adds about 200 more bytes (I'm not totally happy about this bloat). I scan the entire level and for each floor tile encountered I compute a bitmask encoding the walls of the 8 neighbor cells. I have a list of predetermined values, and if this bitmask matches with any of them in the list, a door is placed in the empty cell.
Stairs and monsters are placed on randomly selected empty spaces. I need to work on stairs placement, currently it's possible for the player to start next to the stairs making for a really short level
Android Tablet running Frodo 64 emulator running VIC 20 emulator....