Log In  


Cart #41510 | 2017-06-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
29

[UPDATE v2.0] Have you ever wondered why Yorgle is afraid of the yellow key, or who exactly is the Evil Magician? I mean whats his deal, has anyone ever even seen him before? Now you can finally go face to face with him and find out! There is one catch,.. you'll first have to locate him and his lair hidden deep within the Kingdom. Are you up to the challenge?

piColossal Adventure
version 2.0

A remake of and tribute to Adventure for the Atari Video Computer System

Code structure, construct definitions, sprite movement, collision, and animation routines copied from and/or very heavily influenced by Dom8verse (by Haunted Tie).

An evil magician has stolen the enchanted chalice and has hidden it somewhere in the Kingdom. The object of the game is to rescue the enchanted chalice and place it inside the golden castle where it belongs. This is no easy task, as the evil magician has created three dragons to hinder you in your quest for the golden chalice. There is Yorgle, the yellow dragon, who is just plain mean; there is Grundle, the green dragon, who is mean and ferocious; and there is Rhindle, the red dragon, who is the most ferocious of all. Rhindle is also the fastest dragon and is the most difficult to out maneuver.

Skill Levels:
selectable at cartridge boot or reset (see Controls)

Level 1: small Kingdom, no bat, 2 dragons
Level 2: full Kingdom, bat and 3 dragons
Level 3: full Kingdom, bat, 3 dragons and random object placement

Difficulty:
changeable through the in-game menu (see Controls)
*denotes default settings

Dragon Attack (Atari 2600 left switch):
*(hard) dragons attack instantly
(easy) dragons hesitate before attacking

Dragon Fear (Atari 2600 right switch):
*(hard) all dragons run from sword
(easy) dragons do not run from sword

Controls:
Level select screen:
X change skill level (rotates through 1, 2 or 3 with each press)
Z start game at chosen skill level

in game:
UP/DOWN/LEFT/RIGHT move player
Z drop item
X special use discoverable inside evil magician's castle
Z and X pressed together bring up an in game menu to change difficulty and reincarnate

in game menu:
UP/DOWN to change active selection
Z to select or toggle item
LEFT/RIGHT immediate/emergency menu exit

A word of caution with the in game menu is that the Kingdom is always operating in real time. In other words, the dragons and bat do not pause while the menu is open (or after you have been eaten for that matter).

This was for me a really fun game to recreate while learning how to make a game in pico-8. It took me about a month to build version 1.0 while teaching myself about OOP, collision detection, map changing and very low level AI logic.

Change Log:
2.0 code cleanup, token savings, changed chalice and secret room color cycle routines, changed message in secret room, added new secrets with new ending and extended storyline, added timer and statistics for new ending.

1.6 added collision flicker, grab object inside wall at edge of wall fix, movement in belly of the beast fix, bridge grab-in-use fix, string->table unpacker provided by cheepicus (thanks!!!), code clean up, and token reduction
1.5 add/drop sound effect correction by dw817 (thanks, dude!)
1.4 in game menu created, fix to black castle maze, nmsg transparency
1.3 difficulty switch init fix, blue maze fix, code cleanup
1.2 exits to nowhere peek fix
1.1 exits to nowhere fix
1.0 first release

29


If you were shooting for similarity, this cart is 99% accurate.

In the original Atari Adventure, there is a curious behavior when you walk into a wall. It does this shuddering of the player's square.

Other than that, for the MANY times I've played the original Atari Adventure, you have written a wonderful tribute !


Thank you. Yeah, that shudder as well as so many other of the charms of the original are on my to do list.


Heeeyyyy nice!


This is so well done.

I got stuck in the wall inside the white castle (red maze) when going south at that door. Was the cartridge like that? I kinda think maybe it was.

Warren Robinett did a GDC 2015 Postmortem where he talked about the AI for the actors, but alas he doesn't give the full list of chase/flee triggers, and his Adventure book isn't out yet.


1

Thanks! I don't believe you get stuck in the orginal.. I believe what should happen there is it lets you look into the next room but bounces you back into the red maze room with the exit to nowhere. This has been something I meant to do since writing the exit function but never got back to it. I will add that to my to do list!

The GDC 2015 talk Warren gave was excellent and I cannot wait for his book to come out. in that GDC talk he makes a comment that nobody would be interested in reading through the 6502 assembly source. I emailed him and told him I actually would be interested in seeing it.


I like what you did with the secret room, having the font match :) I THINK you get stuck in there when you try moving through the top center opening to go right but I'm not sure; I didn't have much of a chance to try it out, especially since it took me a few games to make it there due to that douchebag bat being a pain and all (oh well, that's like the original though!).

this cart is 99% accurate

Yep, there's only a few minor differences, which really aren't worth bringing up. Nice job :)


Thanks man! I was wondering how long it would take for someone to try and reach the secret room. Nicely done! Getting stuck using the top exit in that room is the same bug as getting stuck in the white castle. If memory serves me correct, it shouldn't happen in the secret room either.. it should just allow you to peek into the next room and then bounce you back allowing you to get to over and across the message.


I was wondering how long it would take for someone to try and reach the secret room.

Heh, that was one of the first things on my mind!

Nicely done!

Thanks!

Getting stuck using the top exit in that room is the same bug as getting stuck in the white castle. If memory serves me correct, it shouldn't happen in the secret room either.. it should just allow you to peek into the next room and then bounce you back allowing you to get to over and across the message.

Exactly right, that's the way it's supposed to be. Not a huge deal though, just reincarnate yourself, plus this is a warning to others about it.


I did a small update to version 1.1 which fixes the exits to nowhere bug so that you no longer get placed inside a wall. It doesn't let you peek into the next room like the original yet, but at least it wont leave you stuck anymore.


Yeah ! Finally won this game. Man, that is a BIG chalice !


@dw817 uhm,.. thanks,.. I think? haha

Updated to version 1.2 which adds the peek-into-next-room behavior to the two exits to nowhere. This will allow you to move past the message in the secret room, but be careful because it is still possible to get stuck if you bounce back inside the message sprite itself. You should be ok if you stay to the left or right side of the opening, but not in the center when bouncing back. I still need to figure out how to resolve this.


Very clever and a great play on the original.


Thank you very much sudoradish!

Updated to version 1.3 which fixes a difficulty switch initialization error (doh!), makes a small correction to the blue maze that became evident after the exit to nowhere fix, and did some general housekeeping to clean up some of the messier bits of code.


Heh - I may have posted for the wrong game. There are =2= adventurish style games in PICO ATM.

I did want to suggest you use the UP and DOWN arrow keys to highlight the two options of DRAGON DIFFICULTY. Then just use LEFT and RIGHT arrow keys to change the status for that particular configuration option.

No need to hunt down player 2-controls. :)


I wanted to faithfully simulate the left/right difficulty switches on the Atari 2600 itself. Having the menu selection as you described would not allow for toggling the switches during a game like you can physically do on the 2600. I would like to add some sort of display to indicate the switches have been toggled in game though.


Using 2-buttons to bring up a special occasion is a good idea of yours, k1ds.

Perhaps have a few options that appear when you select (A) and (B).

  1. Return Home
  2. Change difficulty switches.
  3. Save State (that would be neat)
  4. Load State

Also, I'm not sure but if you're trying to duplicate the BLUR you have when playing on an original TV set, it might be possible to run a 60FPS and flip between camera (0,0) and camera (1,0) or camera (0,1).

Not sure how that would appear though.


Thank you, the idea with the 2-button-activate was that I wanted the ability to reincarnate at any time (not just after you are dead.. for instances where you get stuck inside a wall/sprite, or if trapped by a dead dragon blocking your way), and I also did not want it to be triggered easily by accident. A menu here to change settings and load/save the game is a great idea. A little deviation from the original, but still allowing pretty much the same functionality. I like it! I will add to the to do list.


A great deal of my video game knowledge comes from LOAD STATE and SAVE STATE from many different game consoles. You can critically analyze any video game and learn everything you about its behavior with this.

I'm still hoping ZEP adds an option for "SAVE STATE" posting so when an error occurs in PICO, the author can be send not just a note or picture of it, but the actual program right where it occurs.

The state being auto-saved 5-seconds just prior to the error - so the owner can see the traced lines on the screen and follow it through to see the crash.

Will greatly help in debugging.

And - I've got some ideas on building a PICO debugger besides. Something else to mill over. :)

Glad you like the menu idea. Looking forward to the updates !


I've updated to version 1.4 which adds the new in game menu. It will pop up when both buttons are pressed (Z and X.. O and X.. whichever your preference). From the menu, you can reincarnate, toggle difficulties, reboot the cart, toggle CRT mode, and toggle test mode. When test mode is enabled, it will automatically disable CRT mode. Because the game is always operating in realtime, it is possible to get eaten while the menu is open. Pressing the left or right arrow will cause the menu to be closed for an emergency get away if needed.

The menu shows options for load/save state, but they are greyed out as this is not yet implemented.

EDIT: HOLY SCHNIKES!! this update almost put me over the edge token wise. :)


I did want to point out that your game is superior to the original. I decided to fire up my Atari 2600 emulator, Stella, and compare that with yours.

The original does not move as smoothly as yours. I checked this by bringing up other Atari carts to see they had very smooth movements indeed - just not Adventure.

So, not only is this a tribute, but a credit to the very idea of Adventure; an improvement of the original model. Thank you !!

As for audio, you might check the original. The tones go UP when you pick up an item and DOWN when you drop. By carefully listening to the tones and fidgeting with PICO, this should be VERY close to the same sound they use when picking up an item.

... would be nice if I could copy screenshot to hex clipboard, or even audio bites. Hang on. Here it is.

Use this for lifting an item if you like. It's about as accurate as I can get - though I would welcome someone else taking a crack at it.

And of course, to drop an item, just reverse the 3-notes.


Thank you DW for those kind words, but I don't think I really deserve that credit. The original will always be superior because its the original. Pico-8 is leaps and bounds more powerful than the 2600 is.

EDIT: THANK YOU! THANK YOU! THANK YOU! for nailing down that sound. I suck at sound/music and did my best, but yours is very close if not exact. If you or anyone else feel like taking a stab at the other sounds, please be my guest.

Updated to version 1.5 with new add/drop sound!


I just never realized the original staggered when it moved. Not the dragons strangely, just the player. I suspect this was because it was checking for contact with walls - and this was the best way to do it for Atari at the time.

Not now, but if I have time tomorrow, I'll see if I can get you some more sounds. I know the dragon dying is a high pitch with minimal tone decay.

The winning sound I think can be reproduced effectively too, but you'll need to play 2-sounds at the same time. I'll dabble with it.

You might add FLICKER option to your list of both-button-options as the Atari always flickered badly any time more than two sprites were on the screen at the same time.

I think in the torchlit, dungeons just two sprites alone would cause flicker.

Also, by default, I think GOLDIE, no, YORGLE, the dragon was always scared of the gold key.

Compare the effectiveness of your code with the original instructions.

http://www.peterhirschberg.com/adventure/instructions.htm


sprite flicker is definitely on my to do list, but i've got to do some token reducing first I think.

That is correct about Yorgle and he is scared of the yellow key in my remake. Also thanks for the link to the instructions, but believe me, I've poured over them countless times while making this :) I'm pretty sure I've covered everything except for good magic losing effectiveness (due to sprite flicker and too many sprites on screen at once). If there is anything specific that I missed, please let me know.


You can cut a few hundred tokens right away by using a string->table unpacker on your rooms, like this:

function unpack(s)
 local a={}
 local key,val,l,vi,c,j,i
 l=1 vi=1 i=1
 repeat
  if i==#s+1 then c=","
  else c=sub(s,i,i) end
  if c=="{" then
   -- recurse and advance
   val,j=unpack(sub(s,i+1))
   i=l+j-1
   l=i
   -- note val is carried over
   -- and processed with the
   -- "," which should follow
  elseif c=="=" then
   key=sub(s,l,i-1)
   l=i+1
  elseif c=="," or c=="}" then
   if not val then
    val=sub(s,l,i-1)
    local fc=sub(val,1,1)
    if fc=="-" or (fc>="0" and fc<="9") then
     val=val*1
    -- cover for a bug in string conversion
     if(val<0) val=band(val,bnot(shr(1,16)))
    elseif val=="#t" or val=="#f" then
     val= (val=="#t")
    end
   end
   l=i+1
   if not key then
    key=vi
    vi+=1
   end
   if val!="" then
    a[key]=val
   end
   if(c=="}") return a,i+1
   key=false
   val=false
  end
  i+=1
 until i>#s+1
 return a
end

-- global wall sprite flags
fwall=0 -- full wall (red sprite flag)
hwall=1 -- half wall (orange sprite flag)

-- create our kingdom as a table of all rooms(screens)
-- each room is a table with its screen position followed by a table
-- of exits l=left, r=right, t=top, b=bottom, co=castle out, and ci=castle in
-- an exit is actually the room number to display next, no value or false means no exit. 
-- kingdom map is 8 screens wide and 5 screens tall so screen positions are 0,0 to 7,4
k={}
k[1]=unpack("scr={x=3,y=4},exit={t=8,r=2,b=15,l=3}") -- light green hall under blue maze
k[2]=unpack("scr={x=4,y=4},exit={t=17,r=3,b=17,l=1}") -- dark green hall below yellow castle
k[3]=unpack("scr={x=5,y=4},exit={t=6,r=1,b=10,l=2}") -- dark orange hall above invisible maze
k[4]=unpack("scr={x=2,y=2},exit={t=16,r=5,b=7,l=6}") -- blue maze top center 
k[5]=unpack("scr={x=1,y=4},exit={t=29,r=6,b=8,l=4}") -- blue maze left side
k[6]=unpack("scr={x=2,y=4},exit={t=7,r=4,b=3,l=5}") -- blue maze bottom center
k[7]=unpack("scr={x=2,y=3},exit={t=4,r=8,b=6,l=8}") -- blue maze center 
k[8]=unpack("scr={x=3,y=3},exit={t=5,r=7,b=1,l=7}") -- entrance to blue maze
k[9]=unpack("scr={x=6,y=1},exit={t=10,r=10,b=11,l=10}") -- invisible maze center
k[10]=unpack("scr={x=6,y=0},exit={t=3,r=9,b=9,l=9}") -- entrance to invisible maze
k[11]=unpack("scr={x=6,y=2},exit={t=9,r=12,b=28,l=13}") -- invisible maze bottom
k[12]=unpack("scr={x=7,y=2},exit={t=28,r=13,b=29,l=11}") -- a blue side hall 
k[13]=unpack("scr={x=5,y=2},exit={t=15,r=11,b=14,l=12}") -- side hall below white castle 
k[14]=unpack("scr={x=5,y=3},exit={t=13,r=16,b=15,l=16}") -- wyatt, your kitchen is blue! (top entry room)
k[15]=unpack("scr={x=5,y=1},exit={t=14,r=15,b=13,l=15,ci=false},ci=26,co=15") -- white castle (crave case?)
k[16]=unpack("scr={x=2,y=1},exit={t=1,r=28,b=4,l=28,ci=false},ci=27,co=16") -- black castle
k[17]=unpack("scr={x=4,y=3},exit={t=6,r=3,b=2,l=1,ci=false},ci=18,co=17") -- yellow castle
k[18]=unpack("scr={x=4,y=2},exit={t=18,r=18,b=18,l=18,co=false}") -- yellow castle interior
k[19]=unpack("scr={x=0,y=0},exit={t=21,r=20,b=21,l=22}") -- black castle maze top left
k[20]=unpack("scr={x=1,y=0},exit={t=22,r=21,b=22,l=19}") -- black castle maze top right
k[21]=unpack("scr={x=0,y=1},exit={t=19,r=22,b=19,l=20}") -- black castle maze bottom left
k[22]=unpack("scr={x=1,y=1},exit={t=20,r=19,b=27,l=21}") -- entrance to black castle invisible maze
k[23]=unpack("scr={x=3,y=0},exit={t=25,r=24,b=25,l=24}") -- white castle maze top left
k[24]=unpack("scr={x=4,y=0},exit={t=26,r=23,b=26,l=23}") -- white castle maze top right
k[25]=unpack("scr={x=3,y=1},exit={t=23,r=26,b=23,l=26}") -- white castle maze bottom left
k[26]=unpack("scr={x=4,y=1},exit={t=24,r=25,b=24,l=25,co=false}") -- white castle maze entrance
k[27]=unpack("scr={x=2,y=0},exit={t=22,r=22,b=22,l=22,co=false}") -- black castle foyer
k[28]=unpack("scr={x=7,y=1},exit={t=29,r=7,b=12,l=8}") -- the other purple room
k[29]=unpack("scr={x=7,y=3},exit={t=12,r=1,b=16,l=3}") -- nothing to see here (red top entry room)
k[30]=unpack("scr={x=6,y=4},exit={t=6,r=1,b=6,l=3}") -- roll credits

You could probably cut a lot more---you're not doing a lot of code reuse. For example, the obj={} stuff code for each object has a lot of repeated stuff, and all your objects do their own SPR calls.


cheepicus!! thank you, sir! Yes, I agree with you there is lots of room for both improvement and token reducing. However, there is no telling how long it would've been before I would have thought about unpacking strings to reduce tokens. This saved 476 tokens, but we're not out of the woods yet..

Turns out there was a very very very minor bug in your unpack function. I printed out the values of j, and right before it crashes j is nil, so I changed your line 11 from

i=l+j-1

to

if (j) i=l+j-1

and that fixed it. The total net token savings from this is now 473!

EDIT: I cleaned up the object creation code to re-use all the bits that were duplicated across objects, as you suggested cheepicus, and did some general token clean up throughout the code (i'm sure there is more that can be found). This is now sitting at (drum roll please...) 7004 tokens for a total savings of 1,122 tokens. :) :) :)


If I just copy and paste the snippet I don't get that error. It looks like it would happen if there was an error in the string being fed to it (like, unbalanced curly brackets perhaps).


Ahhh, right you are. I later did find one room where I fudged adding the unpack routine and left in a curly bracket. I didn't notice that until later when I tried to enter that specific room. Now that that fix has been made, I took out the if(j) and your code does work as posted.


Sounds good, k1ds ! And by that I mean the LIFT and DROP sounds. I can't seem to get it exact. Would be very NICE if PICO had the audio capability of the ATARI. There are certain sounds I don't think can be reproduced.

I was checking out your other sounds. I think you are very close on the dragon defeated, dragon bellowing, and player eaten.

That just leaves the winning sound. It's definitely 2-sounds played together.


Updated to version 1.6 which finally adds the collision flicker/shudder of the players square aka "the ball", objects inside wall at edge of wall can now be grabbed, it is also now possible to grab the bridge while crossing over a wall rendering you stuck in the wall until you drop the bridge, added string->table unpacker provided by cheepicus (thanks!!!), code clean up and token reduction.


It has been a while. I contemplated whether or not I would release this, but here it is.. version 2.0!! I've added an all new hidden section with new styles of dragons, an upgraded/new weapon, and a final boss battle with the Evil Magician himself!!

Have you ever wondered why Yorgle is afraid of the yellow key, or who exactly is the Evil Magician? I mean whats his deal, has anyone ever even seen him before? Now you can finally go face to face with him and find out! There is one catch,.. you'll first have to locate him and his lair hidden deep within the Kingdom.

Are you up to the challenge??


I was wondering: How do I get to the evil magician's lair? Is there a specific room I need to go or any specific items I need?


Yes there is a specific item you need to take into a specific room. If you are truly stuck and would like a spoiler, let me know.


I am truly stuck. =(


RE: RE: Help
I figured it out all on my own! :O
So, I had to take the chalice into the easter egg room.


Hey there! I thought you might like to know I've added music to the secret area. Basically, once you enter the secret room while holding the chalice, music of my own composition will begin to play to set the mood. Though it sounds cool, (or at least I think it sounds cool) it does sort of take you out of that Atari atmosphere where there's no music and it's just sound effects. I don't know. I'll post the link to a video so you can check it out for you're self. Let me know what you think. By the way, if you want me to take the video down, I will happily do so. Also, tell me if the link's not working.

https://www.youtube.com/watch?v=aR71roPKuy0&t=622s


I think the music is great. It does take you out of the Atari atmosphere, but it adds a touch of Pico-8 to it. Glad to see that people are playing this and the secrets have been found. :D


As a kid who loved adventure, this is a great find. Congratulations.



[Please log in to post a comment]