Jump to content
Sprybug

Princess Rescue Batari BASIC Source Code

Recommended Posts

Alright, as promised here is the Batari BASIC source code to Princess Rescue.

The main reason for this release is for people to learn from.

Hopefully there is something in my source code that can help you make some pretty cool games with Batari

I knew it's big and can be confusing in places, and I'd be wiling to answer a few questions, but lets not go overboard.

 

Oh, in addition, thanks to Random Terrain for thinking this...

"please do not make a couple of small changes to this program, then try to sell it as your own creation."

 

Maybe I just have too much faith in my fellow coders. ;)

 

Thanks for all your support, help, praise, etc

-Chris Spry

PR_V2b.bas

Edited by Sprybug
  • Like 10

Share this post


Link to post
Share on other sites

I would hope not. Making a little change could actually cause a problem in the other parts of the program that would cause a cascading effect causing the end of society as we know it!

  • Like 2

Share this post


Link to post
Share on other sites

You might want to add "please do not make a couple of small changes to this program, then try to sell it as your own creation. THIS MEANS YOU HOZER!!!" :D

Fixed that for you! (then again, Hozer wouldn't even bother to change the code!)

  • Like 2

Share this post


Link to post
Share on other sites

Before I get question about the level data format and how the program uses it. I'll go ahead and put a post here about how it works.

 

Every level has two data tables since a data table that can be accessed at any point can only be 255 bytes long. I needed to do this style of data table because of the ability to scroll back and forward and change up the pointer. In the code you'll see for example for World 1-1 the two tables, W11A and W11B.

 

Every two bytes in the data table equals one column (top of screen to bottom of screen) of playfiled blocks along with possible player1 object initiation. The playfield is 11 rows, which is why it needs two bytes. The leftover bytes are used for information to where a player1 object scrolls onto the screen with the playfield. So for example:

 

First Byte 1 X

2 X

4 X

8 X

16 X

32 X

64 X

128 X

2nd Byte 1 X

2 X

4 X

8-248 Object to appear (in increments of 8 since the first 7 bytes of every 8th byte are used for the playfield)

 

So for example setting the 2nd byte in the series to 15 would give you 3 playfield blocks at the bottom of the screen in that column and tell the program that a "Fungi" is entering the screen and to initialize it.

 

You can get a multiple of combinations of playfield blocks by adding the values together. How they function in the program depends on what level you're in. The bottom row is the ground, the next 3 up are the pipe, the next one is brick, the next is power block, etc for x-1 levels where as-in the x-3 levels all the rows are platforms that you can jump through from below except the top row which is the power brick row.

 

Hopefully this gives you an understanding of how the playfield data works and now if you want to make some new challenging ROM hacked levels, go for it.

  • Like 2

Share this post


Link to post
Share on other sites

I REALLY appreciate the opportunity to see if you've made any improvements. My two way scrolling engines always result in artifacts when turning the other direction.

Share this post


Link to post
Share on other sites

Thanks for this awesome content!

Share this post


Link to post
Share on other sites

I would like to use the music from the dead screen on my game, if that's ok, and if it is i want to know how to get to play in the deadscreen on my game. thanks.

Share this post


Link to post
Share on other sites

I would like to use the music from the dead screen on my game, if that's ok, and if it is i want to know how to get to play in the deadscreen on my game. thanks.

All the music data is in different data statements. Look for the routine labeled "mariodeath". You can see in that routine how it calls the data and jumps to the routine to play the music. You'll have to follow to where it's gosubing to figure it all out. The data is in "DeathMusic" and the ability to play it in a game cycle for 1/20th of a second is in "PlayDeathMusic". The game runs on 3 drawscreens (most of the time) per game cycle which is why it plays the notes for 1/20th of a second instead of 1/60th.

Edited by Sprybug
  • Like 1

Share this post


Link to post
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.

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...