Jump to content

Spire of the Ancients (WIP)


Recommended Posts

The other day while standing on a particularly full and delayed train feeling miserable I vanity searched "Spire of the Ancients" and discovered to my insuppressible delight that there were a few small blogs / gaming news sites that had picked up this project at various stages. It's pretty exciting for me to see this acknowledged outside of this forum.


I've been hard at work getting the object drawing routines in place and optimised. Another unintended bonus of jumping to 144K is that now I have half a bank put aside for miscellaneous data I decided to spare a few bytes and make things a bit more lively by defining a little animation for the individual parts of objects. I think the addition of some small movement enhances the sensation of time, which is an odd thing to say, but when moving around and it's all very static it feels almost as if it's running in slow motion.


Anyway, here's a happy cultist as thanks to everyone. (the GIF is a bit choppy compared to the actual animation)


  • Like 10
Link to comment
Share on other sites

Nice animated sprite! By the way, do you have a Dimetric/Isometric graphics tutorial or know one somewhere?

Thanks. I don't know of any tutorials for that, I tend to look at existing games to see what they've done to make things work. If you haven't already seen it I posted a simplistic mockup on page 11 of a dimetric game. I think the key is to use colour to make the difference between walls and floors very distinct. To demonstrate, parts of the geometry in the below picture aren't immediately readable as walls or floors and it's only with the context of the surrounding lines that it makes any sense.


  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

Hi Smitty


any news?

I've got more of the enemies in place, but I need to sort the animations on a few of them so they're a scrambled mess of parts right now.


Inspired by Rikki & Vikki and watching Bob Ross on Netflix over Christmas I updated the title screen graphics (again) to add a mountainscape with some distant happy little trees in 320b mode. 320b is pretty interesting to work with

It does mean I had to gut the pseudo 3d ground graphics to make room but the background colours still give the 3d effect and I have a little room left for a couple of things.


This also freed up some room in my HUD graphics for different empty left and right hand icons to replace the blank item boxes. I think it looks a bit nicer and I intend to only allow some actions with empty hands such as extinguishing and lighting torches.

I've also got some room left over to add status icons for blind, deaf, poisoned, and confused. Whether I'm able to implement

A couple of those is yet to be seen.


With the recent updates regarding the Atarivox issues some people have been experiencing I've been motivated to overhaul my voice tracker so that I can build some good sounding Atarivox phrases.


I also have a plan to overhaul the way sound works so that the volume drop-off is much smoother as you move around sources of sound.


That's about as much as I can remember while I'm procrastinating at work, ha.

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

I've got another interesting little bug to try and work out. This one's a more annoying because it only happens on hardware for me.


It looks like almost like my topscreen routine is offset by half a frame with the top colours being for the ground effect (I haven't adjusted them for PAL) and the bottom of the screen being what should be the sky, not to mention that the character set and mode are wrong for the parts of the screen they're showing for. The screen is stable but everything is locked up.




Link to comment
Share on other sites

This is certainly a tricky one. I've commented out most of my topscreen routine and anything on the title loop that might be too time consuming but all that gives me is a blank screen where it seems to be kicking in outside the visible frame.

I'm trying to think of what might be different on hardware compared to A7800.

Link to comment
Share on other sites

Fixed it. I did not have bit 6 of CTRL so it was running in one of the test modes and I suppose that would have been causing the DLI to fire off at the wrong time. It also makes perfect sense that an emulator wouldn't care about a a single bit that should never be clear under normal use.

  • Like 1
Link to comment
Share on other sites

I too am glad it survived. I never had it running for more than 10 seconds at a time so maybe that helped. It makes me wonder if emulators should act as if DMA is disabled in that situation as it would make it more apparent there's an issue, and also it would be closer to what I was seeing.

I've heard of some homebrew that only works in emulation, it would be interesting to know if some of that could be down to that bit.

  • Like 1
Link to comment
Share on other sites

IIRC A7800/MAME spits out a warning about it on the console, but most people don't run the emulation in a way that they would see the messages.


I'll consider what to do for A7800. I'm not sure that just breaking the emulation is enough, as that might prompt people to try their code out on real hardware.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

I also have a plan to overhaul the way sound works so that the volume drop-off is much smoother as you move around sources of sound.


That's another thing ticked off the list. The map is no longer decompressed in RAM so that in its place are a couple of sound buffers that I can modify at will.


My new sound routine checks the priority of both sound channels, then if the sound I want to play has a higher priority than the lowest priority sound currently playing it will copy its data into one of the buffers, and then modify the volume values.

I already have a function that takes the 1D location value for the player and the object calling the function, converts them to 2D coordinates, and then returns the distance between the two so all I need to do is subtract that value from the volume data (except where the distance is greater than the volume where I just set it to zero).


At present it just plays a fixed test tone so I still need to add a sound selection based on a given sound code, and I also need to fix a bunch of small bugs where objects are expecting the old map format. It took me a second to work out that enemies weren't appearing because they're all misreading the map data and acting as if they were crushed by a wall.

  • Like 4
Link to comment
Share on other sites

I have an idea for how to implement part of my sound selection but I want to check I'm not doing something stupid or reinventing the wheel. Maybe this is a completely normal thing to do in assembly but I've never tried it.



I need to copy a chunk of ROM into RAM but I don't know ahead of time which part of ROM, and as far as I know I can't use 'Indirect Indexed' addressing with a full 16-bit address.


Potential Solution:

I'm thinking of storing the low and high bytes of the data I want to copy into part of the RAM so that I can then run code from RAM that runs through the copy loop using 'Absolute,x' addressing where the address given is the data address I force in. I should then be able to return from the routine and carry on as normal.

I think it would essentially look something like this:

$A0 - LDY 63
$B9 - LDA SomeData,y
$## - low byte of data
$## - high byte of data
$99 - STA SoundBuffer,y ;Why not just force which of the 2 buffers I'm using while I'm at it?
$## - low byte of buffer
$## - high byte of buffer
$88 - DEY
$D0 - BNE
$F5 - -11 bytes (Will probably need trial and error to get this correct)
$60 - RTS
Edited by SmittyB
  • Like 1
Link to comment
Share on other sites

Indirect Y addressing can totally access the entire 16-bit address space. Here's a copy routine that can handle up to 256 bytes. (a longer version can be written to deal with more than a page of data, if required.)


;** Read up to 256 bytes from an arbitrary location.
 lda #<mysound ; LOW address byte of the 16 bit address. (LOW "<" operator points LEFT)
 sta temp1
 lda #>mysound ; HIGH address bye of the 16 bit address
 sta temp2
 ldy #63 ; number of bytes in sound
 jsr datacopy


 lda (temp1),y ; 6502 accesses temp1 and temp1+1 as a 16-bit address, plus Y
 sta SoundBuffer,y
 bne datacopy
  • 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.

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.

  • Recently Browsing   0 members

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