Jump to content
IGNORED

Spire of the Ancients (WIP)


SmittyB

Recommended Posts

Just for you gambler172 here's a screenshot of the lighting being used to darken a room with a red slime in it.

 

How dark are 0 brightness colours on an actual TV? Though probably for the best for gameplay, it looks a little odd in emulation where the colours get crushed to 0 brightness but the silhouette still seems to stand out brightly from other things that are different hues. I've attached a second screenshot with the same area at the darkest it can go. I'm not really worried about it but if it doesn't look good I might avoid having completely dark areas with a couple of exceptions.

 

I've also been thinking about how to handle saving which is something I definitely want to implement but I have a few questions in my head.

Firstly are there any emulators that properly support high score cartridges that I can use to test with?

Secondly I'm not sure whether to limit saving to checkpoints or to have a save item, or both. Dying would probably force you to reload the last save so having a save item could allow the player to save in a bad place and get stuck in a death spiral. If the player reloads their save should they regain their health and other stats? It would prevent a death spiral but in combination with a save item could be abused by just running through everything, dying, reloading, then carrying on with a fresh set of health.

For high score cartridges is the allowed 25 variables per 'difficulty' setting or in total? If per difficulty then I could squeeze in a couple of different save slots. Is there a limit to how often the game should try and save, for example could it potentially damage a save device for the game to simply try and save every frame the player is on a checkpoint?

 

I'm also thinking of trying to squeeze a password system in somehow. Doable but would need some thinking to prevent having the player jotting down 25 characters with each being 1 of 256 symbols.

 

I think I'm leaning towards fixed checkpoints that refill all stats as a way of controlling progress and acting as a safety net so players don't lose all their progress because they fell into a pit and hadn't saved for the past hour. it would also mean I could reduce the amount of data needing saving (simplifying potential passwords) by using a fixed index of checkpoints.

 

I'm interested in what people think because this is the last big thing that I want to implement engine-wise before I focus solely on content and it could have a big impact on how the game plays.

 

This game gets seriously slicker and slicker

  • Like 2
Link to comment
Share on other sites

MAME keeps giving me the message "This cart supports external NVRAM using SaveKey. This is not supported in MAME currently". I've managed to get some save code working but I had to take out the device check first. Apparently I have to save and load to / from nothing for it to work and I don't know why.

 

I assume that on actual hardware if I were to try and load data from a device that has no previous save that it will just load an unknown state.

Link to comment
Share on other sites

AtariVox/SaveKey saving is different from High Score Cart saving.

 

Respecting the header, byte 58 defines the type of saving support as follows: 0 = None/Unknown, 1 = High Score Cart, 2 = SaveKey.

 

 

 

        SEG     ROM
HEADER  ORG     ROMTOP-128
        DC.B    1  ; 0   Header version     - 1 byte
        DC.B    "ATARI7800"     ; 1..16  "ATARI7800   "  - 16 bytes
        DS      7,32
        DC.B    "Your Name Here"; 17..48 Cart title      - 32 bytes
        DS      HEADER+49-.,0
        DC.B    $00,$00,256->ROMTOP,$00; 49..52 data length      - 4 bytes
        DC.B    $00,$00  ; 53..54 cart type      - 2 bytes
    ;    bit 0 - pokey at 4000
    ;    bit 1 - supergame bank switched
    ;    bit 2 - supergame ram at $4000
    ;    bit 3 - rom at $4000
    ;    bit 4 - bank 6 at $4000
    ;    bit 5 - supergame banked ram
    ;    bit 6 - pokey at $450
    ;    bit 7 - mirror ram at $4000
    ;    bit 8-15 - Special
    ;   0 = Normal cart
        DC.B    1  ; 55   controller 1 type  - 1 byte
        DC.B    1  ; 56   controller 2 type  - 1 byte
    ;    0 = None
    ;    1 = Joystick
    ;    2 = Light Gun
        DC.B    0  ; 57 0 = NTSC 1 = PAL
        DC.B    0  ; 58   Save data peripheral - 1 byte (version 2)
    ;    0 = None / unknown (default)
    ;    1 = High Score Cart (HSC)
    ;    2 = SaveKey
        ORG     HEADER+63
        DC.B    0  ; 63   Expansion module
    ;    0 = No expansion module (default on all currently released games)
    ;    1 = Expansion module required
        ORG     HEADER+100      ; 100..127 "ACTUAL CART DATA STARTS HERE" - 28 bytes
        DC.B    "ACTUAL CART DATA STARTS HERE"

 

 

 

The allocation table for SaveKey is worth noting if indeed planning to incorporate support for SaveKey; unfortunately, there is no 7800 emulator that supports it.

 

Dungeon Stalker (with source code) is a 7800basic game that incorporates successful Savekey support for the purpose of retaining high scores under four settings of difficulty. It may be helpful to take a peek at the code.

 

Regarding High Score Cart saving support, most of the Arcade lineup of original 'first wave' titles contain it. Source code to those game is available here for them: Ms. Pac-Man, Dig-Dug, Joust, Robotron 2084, Xevious, Centipede, Food Fight, and Galaga. I am especially fond of Xevious, as it plays quite a nice melody during the high score entry screen.

  • Like 1
Link to comment
Share on other sites

MAME keeps giving me the message "This cart supports external NVRAM using SaveKey. This is not supported in MAME currently". I've managed to get some save code working but I had to take out the device check first. Apparently I have to save and load to / from nothing for it to work and I don't know why.

 

I assume that on actual hardware if I were to try and load data from a device that has no previous save that it will just load an unknown state.

Assuming you're launching mame with a "hiscore" or "xm" device, the saving should work fine. The one thing you need to keep in mind is 7800basic games don't presently have code to format an unformatted HSC. Try playing a game of Xevious with the same "hiscore" or "xm" device, and save a score first.

 

I contemplated adding this HSC formatting code to 7800basic, but it didn't seem a worthy use of space, since most devices will already be formatted. If not, users will have games they can format it with.

 

And, yes, the savekey/hsc eeprom/nvram will return a bunch of uninitialized values if you try to read from a brand new save file.

 

No need to allocate an official atarivox/savekey space via the allocation-table in Trebor's post. That's an assembly thing. 7800basic uses the atarivox/savekey self-serve area.

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

I've managed to get a little HSC saving to work with a little testing. I've been mostly focusing on getting graphics for things to add to the game.

I've found that it's a lot easier for me to draw at half resolution and then scale up so the result is square pixels. I'm losing a lot of potential detail but I find that all my experience spriting goes out the window with double-wide pixels and I can't get anything looking how I want it to. Besides I think it doesn't look too bad.

 

I've created a new version of the ghostly 'Pnydt' enemy which is made up of 3 parts to save space. It's saved space all right but I think I'll need to be very careful about placing objects with multiple parts on screen. The compiler now very helpfully tells me I have a maximum of 12 objects per zone but my walls take up 7 alone and my code supports up to 6 visible things at a time (3 enemies and 3 objects) which could each be made of multiple parts. I can easily control how many objects are visible at a time but enemies could wander into the same spot (like the 2 red slimes in the screenshot), corrupt the display, and force the player to restart the game to fix it.

post-27819-0-06086300-1496344366_thumb.png

  • Like 4
Link to comment
Share on other sites

That screenshot is with it on. Without it the corrupted zone is just noise.

 

I am using double buffering though if that makes a difference to the zone protection. The corruption does flicker as the buffers are flipped but both are affected.

 

It could be something I'm doing wrong but I'm not sure what.

Link to comment
Share on other sites

That screenshot is with it on. Without it the corrupted zone is just noise.

 

I am using double buffering though if that makes a difference to the zone protection. The corruption does flicker as the buffers are flipped but both are affected.

I'll check out the code. Double-buffering splits the DLs up, and I'm guessing I need to account for that with zoneprotection guard bytes. Hopefully an easy fix.

 

I'm mulling over some sort of scheme for 7800basic that would allow you to split your DL memory across 2 areas. That would allow you to sacrifice most of the memory at $2200 for some extra objects, without needing cart memory.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Smitty

any progress?

Not recently, with the unusually hot weather here and just not being in the best of health recently I've not had the energy to really focus on it.

 

I've got a few ideas for puzzles and improvements that should be simple to implement. I'm also thinking that I'll make monsters harder to kill but more spread out to try and avoid the issue of having too many objects on screen. If necessary I might give in and build it with on cart RAM in mind so that I can just get on with making it work.

Link to comment
Share on other sites

I've simplified the way background colours are handled so while they're a bit flatter the dynamic lighting runs a lot smoother. I've also allowed objects to specify whether all or some of their palette gets darkened each frame so I can have some things appear to glow in dark areas like the pnydts and some spider-like monsters called tetrachs I've got the graphics for but haven't added yet. It also means fire will look right which will be important when I start adding puzzles around the lighting such as blowing out all the torches to reveal a secret passage.

 

The inventory system has been adjusted so that the same item can't be held in both hands. It doesn't behave exactly how I want for the first and last items in the list but I'll try and sort that out later. I also noticed that I had mixed up the select and reset switches so reset changed the left item and select changed the right but I've corrected that.

 

The next major thing I need to add is a list that keeps track of which stat items have been picked up so that the player can't just leave and re-enter to get as many stat-ups as they want. There won't be any grinding for experience in this game. You'll have to earn your upgrades and I'm planning to match the rewards with the risk so extra strength or a weapon for fighting some tough enemies, extra focus for solving a puzzle, and extra luck for stumbling on some obscure secrets.

 

Edit:

I've just been reading up on handling the keyboard / touchpad controllers and I think I understand it fully. Am I right in thinking that MAME can't be set to emulate other controllers with the 7800? If so then I'll post a test build soon and ask somebody to kindly test it for me and let me know if it actually works or not.

 

Edit of the Edit:

Attached the current test build. Normal controller in port 1, keypad in port 2, and attached is a picture of the layout I'm trying. Pausing won't work as my pause routine has stopped in general.

 

The working buttons should be the left and right item + / - buttons, and the run, hp up, and map buttons should set your right item to be the thing described.

post-27819-0-85370100-1499541416_thumb.png

post-27819-0-49476800-1499558420.png

game.bas.a78

game.bas.bin

Edited by SmittyB
  • Like 5
Link to comment
Share on other sites

I just dropped by to say how great this project is looking, and to remind you that we're following the progress and salivating. :D

 

Hopefully my bounce of the thread will let somebody see your edits and prompt them to help out with testing.

 

 

Edit:

I've just been reading up on handling the keyboard / touchpad controllers and I think I understand it fully. Am I right in thinking that MAME can't be set to emulate other controllers with the 7800? If so then I'll post a test build soon and ask somebody to kindly test it for me and let me know if it actually works or not.

 

You're right about MAME and alternate controllers. These still have to be implemented, and it's a bit a of catch-22, since 7800 games that use them don't exist yet. Plus the MAME 7800 driver needs some overhaul work to support swappable controllers, and I'm not really all that familiar with exactly how that would be done, or else I'd add them myself.

 

Is the game going to require keyboard controllers, or would they just be optional? I want everybody to get a chance to play this one, and I think if they're required to buy a less-used controller, it may dissuade some from getting the game. That would be a shame. (it would also mean that AtariVox/SaveKey wouldn't be a viable save device, since the second port would be taken already.)

  • Like 1
Link to comment
Share on other sites

The keypad is entirely optional. The keypad or a second joystick can be used in place of the select or reset switches for selecting items just to make things easier for people who sit more than a foot away from the console.

 

I'd be thrilled if MAME was updated to include other controller types because of the game ideas I intend to develop far in the future I can think of several ideas that would benefit from keypads, driving controllers, or gasp! Paddles!

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...