Untitled Dungeon Game

developing/porting a new game or gaming framework? post in here!
User avatar
ChrisB
Posts: 76
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Untitled Dungeon Game

Post by ChrisB » Mon Feb 10, 2020 11:00 pm

Introducing the "Untitled Dungeon Game".

This started out as an exercise in using sideways and shadow ram. I've been tinkering for several months on and off (mostly off) but with the acquisition of my old BBC B+ 128K from the loft I've had renewed enthusiasm. Having said that at the moment it is targeting the Master because the shadow ram is easier to work with. Currently it uses two banks of sideways ram to hold the monsters and dungeon pieces. This will increase to at least three with more planned graphics depending on how much disk access I want to use. There's also 900+ lines of BASIC driving the main logic and a small piece of machine code in main ram to interface between the basic and the sideways ram.

The game is a sort of light roguelike card battler based loosely on the guild of dungeoneering. Here are some screenshots but remember that this is very much placeholder graphics. I was even thinking about it becoming a space themed game as the last one I did was fantasy but we’ll see what happens. I wanted a large number of monsters and items hence the use of sideways ram. There are currently 40 different monsters and I expect there will be 50-100 cards.

The main screen is a top down maze view (that scrolls) with a map. There will be some sort of status display as well. There will be several dungeons that can be attempted multiple times.
dungeon.png
Once you meet a monster you go to the battle screen. The player has an inventory with items that give cards to use in the battle. The order the cards appear is random – but the player has a “hand” to choose from. Cards have effects like stun, damage, healing, shielding, or changing the size of the hand etc. The monsters just choose from the next card in their list.
battle.png
If you defeat a monster you can pick from an item of treasure that will change your deck. This is very much a first iteration of this screen.
inventory.png
Once you “Finish” a dungeon (not sure how that will be determined yet) you’ll be able to upgrade your characters abilities back at “town” which will affect damage done and similar.

Things to do:
  • Complete the battle logic. Monsters will have special abilities and the Player will have stats that affect their performance.
  • Finish the battle screen to use sprites not predefined characters and introduce some animation.
  • Finalise the inventory (types of item etc.) and do the Inventory screen.
  • Create Cards and inventory items. This might mean moving some routines out of sideways ram. With shadow ram and crunched basic there should be a good chunk of main memory space. Ideally the BASIC will sit beneath the screen ram(&3000 upwards).
  • Move the treasure storage into sideways ram.
  • Move the map plot code to assembler.
  • Create the town screen for upgrades and the map screen for dungeon selection.
  • Store the screens in sideways RAM (probably using Tricky’s compression routine). I’m hoping because there will be quite a lot of blank space they will compress well. I'd like to leave a 4th bank free for soft loaded filesystems and the like if possible.
  • Move the text display to my font routine. (Proportional spacing).
  • Create sound/music.
  • Create a story/final goal.
  • Possibly implement a character save system.
  • Add the niceties, loading screen, progress bars, pallet switching etc.
  • Bugfix and balance.
  • Convert to the B+

User avatar
davidb
Posts: 2844
Joined: Sun Nov 11, 2007 10:11 pm
Contact:

Re: Untitled Dungeon Game

Post by davidb » Mon Feb 10, 2020 11:21 pm

Looks intriguing! :D
ChrisB wrote:
Mon Feb 10, 2020 11:00 pm
Store the screens in sideways RAM (probably using Tricky’s compression routine). I’m hoping because there will be quite a lot of blank space they will compress well. I'd like to leave a 4th bank free for soft loaded filesystems and the like if possible.
It might be worth looking at zlib6502 if you have some free memory for workspace. I converted the assembly language into Ophis syntax in my fork. I'm sure it would be easy to convert it for use with whatever assembler you are using.

User avatar
Lardo Boffin
Posts: 2156
Joined: Thu Aug 06, 2015 7:47 am
Contact:

Re: Untitled Dungeon Game

Post by Lardo Boffin » Tue Feb 11, 2020 7:22 am

Looks good. I enjoyed the Guild of Dungeoneering - good fun concept.
Adventure Language on GitHub
Atom, issue 5
Elk
A number of econetted (is that a word?) Beebs
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA

User avatar
tricky
Posts: 4564
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Untitled Dungeon Game

Post by tricky » Tue Feb 11, 2020 10:03 pm

Looks very interesting.

My compressor isn't great, except at repeated patters close together, but it is small and fast ;) and good if your data nearly fits!
It is 72 bytes, needs 5 bytes of ZP and can decompress over the compressed data with I think max two bytes of compressed sticking out of the end.
Nearly all my games are compressed with it as they are usually 16-18K and after compression leave at least 1/2K for a ROM header and fit in 16K (usually quite a bit less).

User avatar
lurkio
Posts: 2853
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Untitled Dungeon Game

Post by lurkio » Wed Feb 12, 2020 9:41 am

ChrisB wrote:
Mon Feb 10, 2020 11:00 pm
Introducing the "Untitled Dungeon Game" ...
I approve of this.

:wink: =D> =D>

User avatar
ChrisB
Posts: 76
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Untitled Dungeon Game

Post by ChrisB » Sun Feb 23, 2020 7:33 pm

Update time.

Thanks for the compression suggestions. I see what happens when I get some data to squash.

Done since list time.
  • Battle logic more or less done. I might tweak some powers or card abilities.
  • Battle screen now doesn't use predefined characters. No animation as yet.
  • Inventory types updated. Hope they are final - will see as I create items.
  • Moved the font plot code to main ram to free up some space. Also tweaked the font.
  • Map plot code is partially in assembler. It's now probably "fast enough".
  • Placeholder town screen and more logic around completing a dungeon.
  • New monster screen when initiating a battle.
  • More wrapper and polish of code and a new window plot function (might end up in assembler)


And finally @lardo - I say inspired by - but this will end up being a more conventional dungeon crawler.

User avatar
Dave Footitt
Posts: 916
Joined: Thu Jun 22, 2006 10:31 am
Location: Abandoned Uranium Workings
Contact:

Re: Untitled Dungeon Game

Post by Dave Footitt » Wed Feb 26, 2020 9:13 pm

Pretty interesting looking title, keep up the good work, looking forward to having a go!

=D>

User avatar
ChrisB
Posts: 76
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Untitled Dungeon Game

Post by ChrisB » Sun Mar 01, 2020 8:53 pm

This week I've been playing with the compression routines. Tricky's is smaller and much faster - but the deflate one gives much better compression... For example the 20K castle defender loading screen goes down to about 12K with Tricky's routine and about 6K with deflate. However - it takes about half a second to decompress vs 2+ seconds for deflate. The upshot of this is I have a header image on all my screens - but the code's not final.

Other than that I've completed and early town screen and added some animation to one side of the battle screen. Still playing round with this.

As such the game is nearly "feature complete" and can be played although not completed as there's no win condition. There will of course be plenty of tweaks to come.

julie_m
Posts: 227
Joined: Wed Jul 24, 2019 9:53 pm
Location: Derby, UK
Contact:

Re: Untitled Dungeon Game

Post by julie_m » Sun Mar 01, 2020 9:47 pm

Ah, yes, the great compression trade-off; do you want the decompression code small and fast but the compressed code larger, or the compressed code small but the decompression code larger and slower? Every situation is different ..... Sometimes you might even need to use more than one compression schema, if there are some parts that need to be rendered quickly but others that can tolerably be rendered more slowly.

User avatar
ChrisB
Posts: 76
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Untitled Dungeon Game

Post by ChrisB » Sun Apr 19, 2020 6:00 pm

Still playing around with this. Have been redoing quite a few routines (card layout is better - one more tweak to go) and moving more routines to assembler. With the screens I have now settled on the zlib compression as I ran out of space. I've also been tweaking the graphics and updated the font to be a bit bigger. Seem to have spent a lot of time without much visible progress although the whole thing feels more polished.

The town screen is still to do but I have a map screen with some reused graphics from castle defender and update dungeon tiles.

Next major task is the town screen although I have some ideas. Some updated screen shots (which appear to have some slightly funny colours...):
nmap.png
nmainscreen.png
nmainscreen2.png
nfight.png
ninvent.png

User avatar
Lardo Boffin
Posts: 2156
Joined: Thu Aug 06, 2015 7:47 am
Contact:

Re: Untitled Dungeon Game

Post by Lardo Boffin » Sun Apr 19, 2020 6:47 pm

Looking very good!
Adventure Language on GitHub
Atom, issue 5
Elk
A number of econetted (is that a word?) Beebs
BBC Master, Datacentre + HDD, pi co-proc, econet, NULA

User avatar
tricky
Posts: 4564
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Untitled Dungeon Game

Post by tricky » Sun Apr 19, 2020 6:50 pm

Wow, that looks great, I'm sure the Atari boys will be along soon ;)
I did have a few other versions of the compression that did a better job, but were about 20% (14 bytes) larger.

User avatar
lurkio
Posts: 2853
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Untitled Dungeon Game

Post by lurkio » Sun Apr 19, 2020 8:12 pm

ChrisB wrote:
Sun Apr 19, 2020 6:00 pm
Some updated screen shots
I continue to approve of this!

=D> =D>

User avatar
ChrisB
Posts: 76
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Untitled Dungeon Game

Post by ChrisB » Sun Apr 19, 2020 8:19 pm

Hi Tricky - How much better? 14 bytes is no problem at all. - I can give you 28 (or indeed 128) without any issue. The deflate is producing sizes about half of your previous implementation - but it is a touch slow to decompress. Faster would be better.

User avatar
ChrisB
Posts: 76
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Untitled Dungeon Game

Post by ChrisB » Fri May 01, 2020 7:43 am

Created a town screen for performing upgrades. Also tweaking the inventory screen. Battle screen left to do.
town screen.png

User avatar
tricky
Posts: 4564
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Untitled Dungeon Game

Post by tricky » Fri May 01, 2020 8:33 am

Looking good, not half the size, in the few tests that I did if the original shrank to 70%, about 60%, so only about another 15% but it is data dependant and I never wrote the decompressor. Does your compressor offer different rations/performance at compression time?
kieranhj wrote:@Kieran
would be a good person to chime in here as he and the other bitshifters have quite a bit of experience with compression.

User avatar
richardtoohey
Posts: 3979
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: Untitled Dungeon Game

Post by richardtoohey » Fri May 01, 2020 8:43 am

It's looking good! =D>

User avatar
simonm
Posts: 307
Joined: Mon May 09, 2016 3:40 pm
Contact:

Re: Untitled Dungeon Game

Post by simonm » Fri May 01, 2020 1:08 pm

On compression, we've used Exomizer in a lot of our projects. It's fairly fast, and compression ratios are pretty good.

Exomizer Homepage here:
https://bitbucket.org/magli143/exomizer/wiki/Home

Some beebasm ported example code here:
https://github.com/bitshifters/bbc-nula ... omiser.asm

Kieran can likely point you at the more recent versions of it if you need it.

User avatar
kieranhj
Posts: 914
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Untitled Dungeon Game

Post by kieranhj » Fri May 01, 2020 1:30 pm

Your game is looking really nice! Great job, there's certainly a lot of hard work that's gone into it so far. =D>

Try using the Exomizer 3.0.2 executable (from the website Simon linked) on your images and see what the file sizes come out as:

Code: Select all

exomizer.exe level -M256 mode1_screen.bin@0x0000 -o mode1_screen.exo
Exomizer is pretty fast as a decompressor but fairly chunky compared to Tricky's tiny routine. You'll need a minimum of 8 bytes of ZP and 250-300 bytes for the code, depending if you want the inlined version for speed or not. You can decompress almost-but-not-quite fully in place but sounds like you'd be decompressing from SWRAM not disc?

PS. The proportional font is a nice touch and give an extra degree of polish. I heartily approve. :-D
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

User avatar
ChrisB
Posts: 76
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Untitled Dungeon Game

Post by ChrisB » Fri May 01, 2020 4:08 pm

Thanks Kieran - I'll have a look/play.


User avatar
ChrisB
Posts: 76
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Untitled Dungeon Game

Post by ChrisB » Sat May 02, 2020 3:06 pm

Thanks for all your suggestions - we have a winner...

Here are the results for compressing my Map screen. Original data size is 18536 bytes

Code: Select all

Compressor	Code size	zp use	Compressed Size	Decompression Time (ms)
zlib		1336*		10	4273		146
lzsa2		281		1	4790		56
Tricky		96		5	7599		40
*Includes buffer - not requires for others.

The code sizes include some initialisation/wrapper code. I used the decompress_fast_v2.asm as the source for lzsa2.

So - impressed with lzsa. Even with the slightly larger compressed data the smaller code size actually means my total size has reduced slightly.

User avatar
kieranhj
Posts: 914
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Untitled Dungeon Game

Post by kieranhj » Sat May 02, 2020 3:47 pm

Interesting stats Chris, thanks for sharing. I must have a look at LZSA! Did you have time to compare the same image with Exomizer 3 by any chance?
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

User avatar
ChrisB
Posts: 76
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Untitled Dungeon Game

Post by ChrisB » Sat May 02, 2020 4:26 pm

Hi Kieran,
It compresses down to 4438 bytes - but I didn't try out the decompresser. Lzsa is "good enough". Perhaps another time.

User avatar
kieranhj
Posts: 914
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Untitled Dungeon Game

Post by kieranhj » Sat May 02, 2020 6:38 pm

Thanks for the info. I suspect the LZSA decompressor is faster than Exomizer so you’ve probably made the right trade off. I will get round to throughly testing them both one of these days!
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/

User avatar
lurkio
Posts: 2853
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Untitled Dungeon Game

Post by lurkio » Sun May 03, 2020 12:13 pm

ChrisB wrote:
Fri May 01, 2020 7:43 am
Created a town screen for performing upgrades. Also tweaking the inventory screen. Battle screen left to do.
town screen.png
Wow! I approve the **** out of this!

=D> =D> =D>

User avatar
Dave Footitt
Posts: 916
Joined: Thu Jun 22, 2006 10:31 am
Location: Abandoned Uranium Workings
Contact:

Re: Untitled Dungeon Game

Post by Dave Footitt » Sun May 03, 2020 9:01 pm

Not sure how I missed this - but it's looking lovely

Keep up the good work =D> =D> =D>

User avatar
ChrisB
Posts: 76
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Untitled Dungeon Game

Post by ChrisB » Sat May 16, 2020 8:51 pm

Time for another update. I've taken the plunge and removed the 65c02 instructions and reorganised the code to be able to produce a B+ version which I have running on my actual hardware. It's involved a lot of re-organsing of the code to try and make a version that will compile for both Master and B+ as the Shadow screen memory access is much more restrictive in the B+.

I've also tweaked to the combat screen to add some more graphics and variety.

I've also started trying to create "proper" cards and treasures to give progression. This is the major task left to do.

Outstanding work is:

Complete the cards and treasures (and balance)
Create a loader program with instructions (story is written - instructions to follow). I have a simplistic loader right now that needs adding to.
Revisit the logic for allocating rewards.
Add an ending screen.
Add some sound.

Optional things.
I might have a go at some background music.
A loading screen.
Main screen menu - possibly with a save system.

User avatar
FourthStone
Posts: 1002
Joined: Thu Nov 17, 2016 2:29 am
Location: Brisbane, Australia
Contact:

Re: Untitled Dungeon Game

Post by FourthStone » Sat May 16, 2020 9:36 pm

=D> \:D/ :D

User avatar
ChrisB
Posts: 76
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Untitled Dungeon Game

Post by ChrisB » Sat Jun 13, 2020 12:38 pm

Update time. I've completed the first balance pass and created "real" cards and treasures. I've added to the loader to autodetect ram banks and show instructions. Needs a menu screen and loader screen adding.

On the main game I've completes the prize allocation logic, and fixed a few bugs and some general code reorganisation. I have an idea to create more variety of names for the cards. There is also a simplistic "win" screen.

Sound is the next big thing and also testing for balance.

Post Reply

Return to “new projects in development: games”