WIP - Demons of Dex

Discussion, Reviews & High-scores

Moderator: Moderators

phvic
Vic 20 Dabbler
Posts: 78
Joined: Mon Nov 18, 2013 1:06 pm
Location: Finland
Occupation: Game developer

WIP - Demons of Dex

Post by phvic »

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
Attachments
dex2.png
dex2.png (24.07 KiB) Viewed 4423 times
Last edited by phvic on Tue Sep 08, 2015 7:07 am, edited 6 times in total.
phvic
Vic 20 Dabbler
Posts: 78
Joined: Mon Nov 18, 2013 1:06 pm
Location: Finland
Occupation: Game developer

Re: WIP - Demons of Dex

Post by phvic »

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).
phvic
Vic 20 Dabbler
Posts: 78
Joined: Mon Nov 18, 2013 1:06 pm
Location: Finland
Occupation: Game developer

Re: WIP - Demons of Dex

Post by phvic »

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! :)
User avatar
joshuadenmark
Big Mover
Posts: 1217
Joined: Sat Oct 23, 2010 11:32 am
Location: Fr-Havn, Denmark
Occupation: Service engineer

Re: WIP - Demons of Dex

Post by joshuadenmark »

Fast progress :shock: will test tomorrow on real Vic.
Kind regards, Peter.
____________________________________________________
In need of a wiki logon - PM me
phvic
Vic 20 Dabbler
Posts: 78
Joined: Mon Nov 18, 2013 1:06 pm
Location: Finland
Occupation: Game developer

Re: WIP - Demons of Dex

Post by phvic »

Thanks, looking forward to your feedback! :)
ravenxau
Vic 20 Devotee
Posts: 296
Joined: Fri May 28, 2004 10:03 pm

Re: WIP - Demons of Dex

Post by ravenxau »

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....
phvic
Vic 20 Dabbler
Posts: 78
Joined: Mon Nov 18, 2013 1:06 pm
Location: Finland
Occupation: Game developer

Re: WIP - Demons of Dex

Post by phvic »

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???
Thanks! Yes, hopefully I will have some time this weekend to work on it.

btw. Serpent Caves is one of the reasons why I'm doing this :)
ravenxau
Vic 20 Devotee
Posts: 296
Joined: Fri May 28, 2004 10:03 pm

Re: WIP - Demons of Dex

Post by ravenxau »

phvic wrote:
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???
Thanks! Yes, hopefully I will have some time this weekend to work on it.

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....
phvic
Vic 20 Dabbler
Posts: 78
Joined: Mon Nov 18, 2013 1:06 pm
Location: Finland
Occupation: Game developer

Re: WIP - Demons of Dex

Post by phvic »

ravenxau wrote:have you tried the 'alternate' version with the green on white color scheme and 9 levels?
Not yet, when I get this done I'll check it out :)
phvic
Vic 20 Dabbler
Posts: 78
Joined: Mon Nov 18, 2013 1:06 pm
Location: Finland
Occupation: Game developer

Re: WIP - Demons of Dex

Post by phvic »

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.
ravenxau
Vic 20 Devotee
Posts: 296
Joined: Fri May 28, 2004 10:03 pm

Re: WIP - Demons of Dex

Post by ravenxau »

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....
phvic
Vic 20 Dabbler
Posts: 78
Joined: Mon Nov 18, 2013 1:06 pm
Location: Finland
Occupation: Game developer

Re: WIP - Demons of Dex

Post by phvic »

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
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.

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 ;-)
phvic
Vic 20 Dabbler
Posts: 78
Joined: Mon Nov 18, 2013 1:06 pm
Location: Finland
Occupation: Game developer

Re: WIP - Demons of Dex

Post by phvic »

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...
ravenxau
Vic 20 Devotee
Posts: 296
Joined: Fri May 28, 2004 10:03 pm

Re: WIP - Demons of Dex

Post by ravenxau »

phvic 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...
Scan the jiffy clock might be an option
Android Tablet running Frodo 64 emulator running VIC 20 emulator....
ravenxau
Vic 20 Devotee
Posts: 296
Joined: Fri May 28, 2004 10:03 pm

Re: WIP - Demons of Dex

Post by ravenxau »

phvic wrote:
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
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.

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 ;-)
Do you just pick a random new direction for the drill head, or rotate it 90 degrees each change?
Android Tablet running Frodo 64 emulator running VIC 20 emulator....
Post Reply