Jump to content
batari

Platformer source

Recommended Posts

Here is Gingerbread Man source stripped of all game-specific code except the platformer engine itself. If someone wants to build a platformer based on this, go ahead. I figured the physics model and background detection might be useful to someone.

 

I kept in the man sprite and second level screen data for illustration purposes, but please change these if you use this as a base for your own game.

 

Variables f-z are free. Enjoy!

platformer.bas

platformer.bas.bin

  • Like 1

Share this post


Link to post
Share on other sites

Thanks. Maybe I can use this as the skeleton for my platform game instead of reinventing the wheel. :thumbsup:

Share this post


Link to post
Share on other sites
Thanks! I assume the code will not work with the standard kernel?

I might make a version that works with the standard kernel.

Share this post


Link to post
Share on other sites
I might make a version that works with the standard kernel.

That would be cool.

Share this post


Link to post
Share on other sites
I might make a version that works with the standard kernel.

That would be cool.

Yep, that would be really cool!

Edited by Impaler_26

Share this post


Link to post
Share on other sites

I modified the engine to work with the standard kernel. One uses Superchip RAM to allow a playfield with the same block size as the original, and another uses larger blocks as found in the standard kernel. I decided to optimize each for bankswitching, so the game loop is placed in the last bank. This reduces the number of cross-bank accesses when reading playfield blocks. This code should still work if you decide to add pfcolors or no_blank_lines.

 

I also included a multisprite version optimized for bankswitching.

platformers.zip

Share this post


Link to post
Share on other sites
I modified the engine to work with the standard kernel. One uses Superchip RAM to allow a playfield with the same block size as the original, and another uses larger blocks as found in the standard kernel. I decided to optimize each for bankswitching, so the game loop is placed in the last bank. This reduces the number of cross-bank accesses when reading playfield blocks. This code should still work if you decide to add pfcolors or no_blank_lines.

 

I also included a multisprite version optimized for bankswitching.

This is awesome! Thanks! :thumbsup:

Share this post


Link to post
Share on other sites

Sorry if this is something simple but I am new to Batari Basic and am getting an error when trying to compile the samples you provided. The error is "Unknown Keyword: def". I have made a few changes to the playfield, but don't think that would cause an issue as I only changed a few "." to "X" keeping the correct number of characters in the line.

 

Thanks.

Share this post


Link to post
Share on other sites
Sorry if this is something simple but I am new to Batari Basic and am getting an error when trying to compile the samples you provided. The error is "Unknown Keyword: def". I have made a few changes to the playfield, but don't think that would cause an issue as I only changed a few "." to "X" keeping the correct number of characters in the line.

 

Thanks.

Sorry - you need the latest build for that, and it's not yet on the website. To install, unzip the file where bB is installed and overwrite the 4 executables.

 

http://www.atariage.com/forums/index.php?a...t&id=114295

Share this post


Link to post
Share on other sites
Sorry if this is something simple but I am new to Batari Basic and am getting an error when trying to compile the samples you provided. The error is "Unknown Keyword: def". I have made a few changes to the playfield, but don't think that would cause an issue as I only changed a few "." to "X" keeping the correct number of characters in the line.

 

Thanks.

Sorry - you need the latest build for that, and it's not yet on the website. To install, unzip the file where bB is installed and overwrite the 4 executables.

 

http://www.atariage.com/forums/index.php?a...t&id=114295

 

I thought I had the latest. I will give it a try.

Share this post


Link to post
Share on other sites
Sorry if this is something simple but I am new to Batari Basic and am getting an error when trying to compile the samples you provided. The error is "Unknown Keyword: def". I have made a few changes to the playfield, but don't think that would cause an issue as I only changed a few "." to "X" keeping the correct number of characters in the line.

 

Thanks.

Sorry - you need the latest build for that, and it's not yet on the website. To install, unzip the file where bB is installed and overwrite the 4 executables.

 

http://www.atariage.com/forums/index.php?a...t&id=114295

 

I thought I had the latest. I will give it a try.

 

That did it. Thank you for your assistance.

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