Jump to content

Photo

Adventure... with a hot-air balloon


102 replies to this topic

#1 e1will OFFLINE  

e1will

    Moonsweeper

  • 347 posts

Posted Thu Jan 7, 2010 9:06 PM

You know when, in Adventure, you're eaten by a dragon, then the bat picks up the dragon with you in it, and takes you on a tour of the kingdom? Back in the early '80s, I thought that was the coolest thing in the world.

The only problem was, while you could sometimes pick up the bat and move it around, it was difficult to really control where to go, especially at the edge of the screen. I thought the perfect addition to the game would be an object you could pick up that would let you float above the walls and explore the kingdom. So my first try at a hack, back in 2003 or so, was to add a hot-air balloon to the game. If you found the hot-air-balloon and pick it up, you could float above the walls.

While I was at it, I tweaked a couple of the room layouts and added a room in the white castle (it always bugged me that there was an "exit" in there that didn't lead anywhere.)

Now, this was back before I figured out how to actually assemble, so the changes I made were extremely tedious: instead of just disassembling, adding some code and reassembling it, I was actually using a hex editor to hack in the instructions using machine language (e.g. $4C $7E $F6 to jump to a patched-in subroutine).

So even though I came up with some more ideas after that (like having the dragons breathe fire at you; adding a shield the player could use to defend against the fire, adding a torch to see better in the catacombs), the idea of hacking in all those instructions, byte by byte, was so daunting I just shelved the idea.

I did submit the hot-air balloon hack here a few years ago, but I made a fairly dumb rookie mistake in making the hot-air balloon so darn hard to find that it wasn't obvious to a casual player that it was even in there.

So tonight I'm finally fixing that mistake. Attached is the new-and-improved Adventure hack, with a much easier-to-find hot-air balloon. Enjoy.

(On a related note, a few months ago, I figured out how to compile assembly, and wrote a whole new game to make use of the fire-breathing, shield and torch (flashlight now) ideas. Except they're fire-breathing ducks, instead of fire-breathing dragons. If you like this hack, you might like that game too.)

--Will

Attached Thumbnails

  • Adv28B-01.PNG
  • Adv28B-02.PNG

Attached Files



#2 KevinMos3 OFFLINE  

KevinMos3

    Stargunner

  • 1,454 posts
  • Founder of the Timothy Dalton as Bond fan club
  • Location:Behind YOU!

Posted Thu Jan 7, 2010 9:14 PM

Cool! Thanks for sharing. I'm going to check this out now. :)

#3 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,386 posts
  • Bitnik
  • Location:Canada

Posted Thu Jan 7, 2010 10:44 PM

Yeah, totally cool! Thanks Will!

This sucker is going on my Harmony!

#4 Shannon ONLINE  

Shannon

    Born To Be Insane

  • 7,738 posts
  • Pac-man Fever
  • Location:Arcade

Posted Fri Jan 8, 2010 12:53 AM

Hot air balloon?? Cool idea!!

Edited by Shannon, Fri Jan 8, 2010 12:53 AM.


#5 Legend OFFLINE  

Legend

    Moonsweeper

  • 346 posts
  • Location:Antioch, CA

Posted Mon Jan 11, 2010 11:19 AM

Sounds cool.

I like Duck attack, but it would still be cool to see the fire, shield, and torch added in Adventure. Think that will ever surface?

#6 e1will OFFLINE  

e1will

    Moonsweeper

  • Topic Starter
  • 347 posts

Posted Mon Jan 11, 2010 3:35 PM

Sounds cool.

I like Duck attack, but it would still be cool to see the fire, shield, and torch added in Adventure. Think that will ever surface?


Quite possibly. Maybe I'll call it Dragon Attack!

--Will

#7 keithbk OFFLINE  

keithbk

    Chopper Commander

  • 213 posts

Posted Thu Feb 3, 2011 4:21 PM

Old thread, I know...but I've been toying with the CYOA (Create Your Own Adventure) program and wanted to learn some of the assembly language stuff (so I've been toying with that as well) to try to change some of the internals of the game itself.

One change I would like to employ is if a dead dragon is picked up by the bat, it becomes resurrected. It should be a relatively simple change to the program, but so far, all my attempts to change the variable have resulted in a non-functional game upon assembly.

Any suggestions?

#8 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,342 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Thu Feb 3, 2011 5:24 PM

Are you trying that with CYOA or something else?

#9 keithbk OFFLINE  

keithbk

    Chopper Commander

  • 213 posts

Posted Thu Feb 3, 2011 5:55 PM

Are you trying that with CYOA or something else?


I'm using CYOA to generate the code, then I play with the code in a text editor.

Basically (or, BASICally), the logic check should be something like this:

BAT pickup code
IF "item = dragon" and "state = dead"
THEN "state = alive"

Edited by keithbk, Thu Feb 3, 2011 6:55 PM.


#10 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,342 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Thu Feb 3, 2011 6:57 PM

Try this after MoveBat:

MoveBat:


LDA BatR+5
CMP #RDragonR
BEQ Res1
CMP #YDragonR
BEQ Res2
CMP #GDragonR
BEQ Res3
JMP MoveOn

Res1:
LDA #$00
STA RDragonR+4
BEQ MoveOn
Res2:
LDA #$00
STA YDragonR+4
BEQ MoveOn
Res3:
LDA #$00
STA GDragonR+4
MoveOn:



#11 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,342 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Thu Feb 3, 2011 7:02 PM

That doesn't show the margins. Hopefully this will show it better:

Attached File  LiveDragon.doc   5.5KB   104 downloads

#12 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,342 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Thu Feb 3, 2011 7:07 PM

By the way, if you look at my signature there is a thread for an Adventure hack called "MissAdventure Revised." In the first post is an 8k Adventure Assembly that Nukey Shay made. It is commented and is very nice for hacking. He also has newer versions of Adventure assemblies floating around AA.

#13 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,541 posts
  • Location:The land of Gorch

Posted Thu Feb 3, 2011 7:57 PM

Since the dragons are all the lowest object numbers (of the ones carriable by the bat), the method above can be reduced to 10 bytes...
MoveBat:
     LDX    BatR+5 ;use X as a pointer
     CPX    #GDragonR ;compare to whatever the last dragon is
     BCS    MoveOn ;object not a dragon
     LDA    #$00 ;restore normal state...
     STA    $04,X ;to the applicable dragon
MoveOn:

Edited by Nukey Shay, Thu Feb 3, 2011 8:01 PM.


#14 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,342 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Thu Feb 3, 2011 8:12 PM

Since the dragons are all the lowest object numbers (of the ones carriable by the bat), the method above can be reduced to 10 bytes...

MoveBat:
     LDX    BatR+5 ;use X as a pointer
     CPX    #GDragonR ;compare to whatever the last dragon is
     BCS    MoveOn ;object not a dragon
     LDA    #$00 ;restore normal state...
     STA    $04,X ;to the applicable dragon
MoveOn:

Nice!

#15 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,541 posts
  • Location:The land of Gorch

Posted Thu Feb 3, 2011 8:26 PM

It's shorter if the check is done in the pickup code. Only 6 bytes because X is already loaded and A is known to be zero.

AND    #$F8                ;2 Is the Bat within Seven Pixels?
       BNE    MoveBat_4           ;2 If not, No Pickup Possible
       STX    BatR+5              ;3 Store Object as Being Carried

;===========added portion...
       CPX    #GDragonR ;compare to whatever the last dragon is
       BCS    MoveOn ;object not a dragon
       STA    $04,X ;revive applicable dragon
MoveOn:
;===========

       LDA    #$10                ;2 Reset the Bat Fed Up Time
       STA    BatR+6              ;3
MoveBat_4: ;Move Object Being Carried by Bat


#16 keithbk OFFLINE  

keithbk

    Chopper Commander

  • 213 posts

Posted Thu Feb 3, 2011 8:49 PM

It's shorter if the check is done in the pickup code. Only 6 bytes because X is already loaded and A is known to be zero.

AND    #$F8                ;2 Is the Bat within Seven Pixels?
       BNE    MoveBat_4           ;2 If not, No Pickup Possible
       STX    BatR+5              ;3 Store Object as Being Carried

;===========added portion...
       CPX    #GDragonR ;compare to whatever the last dragon is
       BCS    MoveOn ;object not a dragon
       STA    $04,X ;revive applicable dragon
MoveOn:
;===========

       LDA    #$10                ;2 Reset the Bat Fed Up Time
       STA    BatR+6              ;3
MoveBat_4: ;Move Object Being Carried by Bat


This is great, guys! One of the things about the original Adventure that I always found lacking was that you can only encounter 3 monsters and nothing else. Once the three dragons are dead, there really is no more challenge to the game. By giving the Magic Bat the power of resurrection, the game becomes a bit more challenging and unpredictable...you may not want to so quickly dispose of that sword ;)

#17 keithbk OFFLINE  

keithbk

    Chopper Commander

  • 213 posts

Posted Fri Feb 4, 2011 8:46 AM

Yet again, every time I do a compile with the changes I make, I get errors and the code will not play. I remove the code I inserted, compile it, and it works again...

I've been reading through all the programming 101 stuff and I'm trying to find out what I'm doing wrong...very frustrating.

This is the area I have been working with, trying to insert in the following area:

;See if Bat Can pick up Object.
LDA VBLANK,X;4 ;Get the Object's X Coordinate.
SEC ;2
SBC $CC ;3 ;Find the differenct with the Bat's
CLC ;2 ;X coordinate.
ADC #$04 ;2 ;Adjust so Bat in middle of object.
AND #$F8 ;2 ;Is Bat within Seven Pixels?
BNE LF908 ;2 ;If not, no pickup possible.

LDA WSYNC,X ;4 ;Get the Object's Y Coordinate.
SEC ;2
SBC $CD ;3 ;Find the Difference with the Bat's
CLC ;2 ; Y Coordinate.
ADC #$04 ;2 ;Adjust.
AND #$F8 ;2 ;Is the Bat within Seven Pixels?
BNE LF908 ;2 ;If not, No Pickup Possible.

;Get Object
STX $D0 ;3 ;Store Object as Being Carried.
LDA #$10 ;2 ;Reset the Bat Fed Up Time.
STA $D1 ;3

#18 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,342 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Fri Feb 4, 2011 9:51 AM

Are you putting these lines of code

       CPX    #GDragonR  ;compare to whatever the last dragon is
       BCS    MoveOn     ;object not a dragon
       STA    $04,X      ;revive applicable dragon
MoveOn:
right after this line of code?
       STX    BatR+5        ;3 Store Object as Being Carried


#19 keithbk OFFLINE  

keithbk

    Chopper Commander

  • 213 posts

Posted Fri Feb 4, 2011 10:00 AM

Are you putting these lines of code

       CPX    #GDragonR  ;compare to whatever the last dragon is
       BCS    MoveOn     ;object not a dragon
       STA    $04,X      ;revive applicable dragon
MoveOn:
right after this line of code?
       STX    BatR+5        ;3 Store Object as Being Carried


There is no "BatR+5" in the code, so do I need to define this somewhere?


I am trying to edit a txt file, just for clarification.

Edited by keithbk, Fri Feb 4, 2011 10:02 AM.


#20 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,342 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Fri Feb 4, 2011 10:20 AM

This one should work.

Attached File  Advent8k.txt   164.04KB   78 downloads

#21 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,541 posts
  • Location:The land of Gorch

Posted Fri Feb 4, 2011 1:10 PM

Yet again, every time I do a compile with the changes I make, I get errors and the code will not play. I remove the code I inserted, compile it, and it works again...

None of the user ram is labelled in your example. What disassembly were you using? It should be one of the text files that has all of the user ram defined up top. Otherwise, you'd have to adjust all the ram and rom pointers for any additions you make to the code.

I'd recommend looking at one of the previous threads on the subject that has a lot of source code and examples of sprite additions...like this thread:
http://www.atariage....into-an-8k-game

If you want to build a 4k game, there's a couple of files at posts 42 and 43 that has a bunch of romspace free.


A newer thread features tricks to "mix and match" display modes and resolutions, so you can create more detailed screens which costs no additional ram (in fact, some more was saved to use wherever you want).
http://www.atariage....ation-midscreen


Any of those disassemblies will execute quicker/more efficient than the original game did...and makes adding new objects or screens very easy.

#22 keithbk OFFLINE  

keithbk

    Chopper Commander

  • 213 posts

Posted Fri Feb 4, 2011 1:15 PM

I am using the CYOA (Create Your Own Adventure), which generates a text file and editing the text file.

It's nice because I can quickly change room graphics and I've done a bit of redesign of the sprites and rooms. Unfortunately, the text file that it generates is not the same as the one you were working on, so I'm trying to find the similar strains of code and work by comparing and altering.

#23 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,541 posts
  • Location:The land of Gorch

Posted Fri Feb 4, 2011 1:50 PM

...which is more difficult than just using one or the other. Trying to find correlations between them is always a nightmare costing you unnecessary time.

#24 accousticguitar OFFLINE  

accousticguitar

    Quadrunner

  • 6,342 posts
  • Sherlock made it to 15 before he left us.
  • Location:Idaho

Posted Fri Feb 4, 2011 2:20 PM

This utility will build sprites and rooms for the text file I posted above.

Attached File  Adventure Builder.zip   47.61KB   118 downloads

#25 keithbk OFFLINE  

keithbk

    Chopper Commander

  • 213 posts

Posted Tue Feb 8, 2011 2:23 PM

...which is more difficult than just using one or the other. Trying to find correlations between them is always a nightmare costing you unnecessary time.


Okay, I've been tinkering with your adventure_8k.zip file and put the code in the section (example follows):

BNE MoveBat_4 ;If not, No Pickup Possible. ;2
;Get Object
STX BatR+5 ;Store Object as Being Carried. ;3
CPX #GDragonR ;compare to whatever the last dragon is
BCS MoveOn ;object not a dragon
STA $04,X ;revive applicable dragon
MoveOn:

At this point, I am just trying to get the bat to revive the dragon in the game and have not altered any other code. I have been playing Game 2 and both times, the green dragon is killed, the bat takes the dragon, but the dragon does not revive. Am I doing something wrong?

It's definitely not a compile issue, as the game compiles properly and plays, but it does not produce the desired result.

Edited by keithbk, Tue Feb 8, 2011 2:26 PM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users