Jump to content
IGNORED

BruceLee 2600 rough demo in batariBasic!


splendidnut

Recommended Posts

What?  BruceLee for the 2600 written in batariBasic?  What madness is this?

 

image.thumb.png.54131a5ce3a3d61cf1544c8ba2706fc9.png

 

Previously, I had mentioned something about 'maybe' converting my little BruceLee demo to batariBasic.  Well, I've spent the past several days doing just that.  It was a bit of a pain to convert between the C code and bBasic, since they require different approaches and bBasic has a lot of gotchas that tripped me up.  Overall, it wasn't too bad, it just took me longer than I expected.  In some ways, the code has become a bit nicer and easier to work with and some improvements did come about because of the conversion.

 

I haven't converted over all my previous work yet, but I've gotten enough done that it seems reasonable to post a Demo Binary + Source Code for anyone who wants to mess around with it.  The code is a bit rough in places, but I tried to keep things clean and commented for the most part.

 

I've replace the 'multisprite' bBasic kernel with the display kernel from the original project.  At the moment, it's not really flexible nor easy to use, and all of the necessary background graphics data has been 'hard-coded' in the kernel.  I still need to figure out how to 'nicely' encode the screens in a way that would make things easy for others to create and edit.

 

With that said, here are some quick bullet points:

  • There's currently only one screen with just Bruce and the black ninja.
  • Only the bottom row of lanterns can be collected
  • Bruce Lee and the black ninja are working 'relatively' well.  But both are a bit more buggy than in the source project.
    • For some reason, Bruce can climb down off the middle and top platforms.
    • The black ninja likes to twitch/fidget before attacking... which is a bit of an elusive bug that is kind of interesting.

 

I may or may not set up a GitHub repo at some point.  And I may or may not continue work on this in the near future.  I just don't know yet.  Let me know if these things are desired.

 

Please feel free to ask any questions or start hacking away at it.  Any outside contributions are more than welcome.

 

Enjoy!

 

ADDENDUM:  Project originally started in this thread:  https://forums.atariage.com/topic/347106-bruce-lee-2600-concept-mockup/

 

SOURCE ON GITHUB:  https://github.com/splendidnut/BruceLee_bB

 

LATEST BINARY:

BruceLee_bB_20240319-NTSC.bin

 

Initial version:

 

BruceLee2600-20240214-bBasic-src.zip BruceLee_bB-20240214-NTSC.bin

Edited by splendidnut
Added latest binary.
  • Like 13
Link to comment
Share on other sites

I really liked the graphics. Congratulations!!!

 

One question, you mentioned that you converted your "C" code to Batari Basic. After this conversion, what did you think? Which is better, programming in "C" or Batari Basic?

 

Another question, is there any programming in "C" that you found a limitation in Batari Basic and you wrote a different code?

Link to comment
Share on other sites

Well, I just hacked Bruce Lee's look to make him look more like the C64 version.
The one with yellow skin is identical to the C64, while I lightened the original tone II of the natural skin a little more.

 

I particularly liked the distinct Bruce Lee look you created exclusively for the Atari 2600.

Captura de tela em 2024-02-15 14-47-45.png

Captura de tela em 2024-02-15 14-47-13.png

BruceLee_C64_Style.bin BruceLee_C64_Tone II.bin

  • Like 2
Link to comment
Share on other sites

7 hours ago, DevBR said:

I really liked the graphics. Congratulations!!!

 

One question, you mentioned that you converted your "C" code to Batari Basic. After this conversion, what did you think? Which is better, programming in "C" or Batari Basic?

 

Another question, is there any programming in "C" that you found a limitation in Batari Basic and you wrote a different code?

 

Thanks!

 

For me personally, programming in C is better, mainly because it's more structured so I can have nicely laid out 'if..else' blocks of code without having to resort to shoving everything on one line or using gotos to control flow.  I feel that seems to muddy up the code a bit.  The other issue I ran into is that subroutines in bB don't have local variables nor parameter variables...so I had to manually manage (keep track of) which temp variables I was using and passing around for each subroutine.  There was one or two cases where I did away with a subroutine and just folded the code into whoever was calling it.

 

On the flip side, those limitations pushed me a bit to rethink and rewrite things that may have led to the code being a bit more optimal, clear and/or easier for other people to follow.

 

Overall, it wasn't a bad experience, but there are definitely a few areas where I think BatariBasic could use some improvements.

Link to comment
Share on other sites

On 2/15/2024 at 3:23 PM, splendidnut said:

For me personally, programming in C is better, mainly because it's more structured so I can have nicely laid out 'if..else' blocks of code without having to resort to shoving everything on one line or using gotos to control flow.  I feel that seems to muddy up the code a bit.  The other issue I ran into is that subroutines in bB don't have local variables nor parameter variables...so I had to manually manage (keep track of) which temp variables I was using and passing around for each subroutine.  There was one or two cases where I did away with a subroutine and just folded the code into whoever was calling it.

Thanks for the answer! 🙂

 

Do you have any link or basic tutorial on how I can set up my development environment in C so that I can compile at least one Hello World that runs on the Atari?

Link to comment
Share on other sites

1 hour ago, DevBR said:

Do you have any link or basic tutorial on how I can set up my development environment in C so that I can compile at least one Hello World that runs on the Atari?

You probably want to check out cc2600:  https://forums.atariage.com/topic/360911-cc2600-news/  That thread has a 'hello world' style example.

 

I'd suggest my own Neolithic C compiler, BUT I don't have anything in the way of tutorials, mostly just early-stage game projects.  So I'd recommend cc2600 as it is actively being developed.

Link to comment
Share on other sites

The source code to this project is now on Github:  https://github.com/splendidnut/BruceLee_bB

 

Not too long after I posted the previous version, I added in 'Yamo' (The Green Yamo) and introduced a bunch of bugs that I needed to fix.  Once I got those all taken care of, I did a bunch of work to the kernel for supporting a semi-asymmetric playfield.  This allowed me to do a rough first pass at the first screen in the game.  So now there are two screens to traverse between (NOTE: only via the top platform).  Lanterns can be collected, but moving between screens will reset them.

 

It's still quite an early WIP, but I'm slowly figuring out how I want to do things.

 

Enjoy!

 

BruceLee_bB_20240229-NTSC.bin

 

  • Like 6
Link to comment
Share on other sites

In preparation for the ZPH showing, I spent this past week getting in some initial fight code.  The enemies can now hurt the player with their attacks.  I made the player blink red when hurt as a quick and dirty way of getting it functioning.  The player can now punch both enemies, knocking them back and scoring some points.  The player can also get points for collecting lanterns... moving between screens will reset them.

 

I've made an initial attempt at doing up the third screen and the blocking side-walls are now operational.

 

Also, there are some initial (placeholder) sound effects.

 

Enjoy!

 

 

BruceLee_bB_20240308-NTSC.bin

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

3 hours ago, splendidnut said:

In preparation for the ZPH showing, I spent this past week getting in some initial fight code.

 

Awesome, finally able to kick & punch the ninja and Yamo! I unfortunately had to bump the 2600 day to either this coming Tuesday or next Friday. Very looking forward to showing off your excellent updates to Bruce Lee very soon!!

 

Are you planning to include the option for the second player to control Yamo and have him do his yell? I always thought it sounded like a cow on the C64 when he cried out.

 

- James

  • Like 1
Link to comment
Share on other sites

26 minutes ago, ZeroPage Homebrew said:

Are you planning to include the option for the second player to control Yamo and have him do his yell?

That would be a smart thing for me to implement now as having that feature would really help out with debugging the fighting code.  Thanks for mentioning that!

  • Like 1
Link to comment
Share on other sites

ZeroPage Homebrew is playing Bruce Lee on tomorrow's ZPH stream LIVE on Twitch! Hope you can join us!

 

Games:

 

  • Like 1
Link to comment
Share on other sites

Minor update:

  - Fixed player kick action.  Now, if the player is running, the attack (fire) button will initiate the kick action properly.

  - Added check to see if player collected all lanterns on a screen when moving onto the next.  This is a first step towards handling overall game progression.

 

Sadly, I wasn't able to get the player-controlled Yamo code implemented yet.  I started to, BUT found that I need to rework the player/enemy logic first to help avoid duplicating a bunch of code.

 

Also, this might be the last update using an 8k ROM... looks like it might be time to bump this up to 16k.

 

Anyways, enjoy!

 

 

BruceLee_bB_20240312-NTSC.bin

  • Like 6
Link to comment
Share on other sites

I've done a bunch of work, and while it is mostly under-the-covers type of work, there's a couple of fun things that have been added.  Lantern tracking is now fully implemented and there's a prototype of a 4th screen (what I'm calling the 'garden' area).  Once all the lanterns have been collected from the first three screens, the player can 'drop' down to the garden area from the 1st (left-most) 'village' screen.  It's only semi-implemented at the moment, but you can at least see what it looks like.  NOTE: There's an invisible ladder in the middle of the new screen for development purposes.  Bruce needed some way to transport building materials.

 

Some updates:

 -  Initial pass at drawing 4th screen (garden area).
 -  Added lantern inventory tracking system and started working on game progression 'goal' system.
 -  Improved lantern collision detection.

 -  Switched to 16k ROM scheme.

 -  Added new kernel to handle user-defined walls (asymmetric wall kernel).  Currently used by 4th screen.
 -  Some refactoring of the player / enemy code to work towards supporting a player-controlled Yamo.

 

The project is currently clocking in around 10k and uses 6 different custom kernels.  The bank containing the graphics and kernels is close to being full, so there's definitely some rethinking that needs to be done in that area if I want to try and keep all the graphics stuff in a single bank.  I might be able to get one or two more screens in before having to do something drastic.  It seems that this project is almost begging to utilize either DPC+ or E7 for the extra RAM... for storing/modifying the playfield graphics (or drastically simplify things like the platform graphics, would be a shame though).

 

There's still quite a lot of work to be done, but I feel like this is a decent amount of progress.  I'm not sure what I'll work on next.

 

Anyways, enjoy!

 

 

BruceLee_bB_20240319-NTSC.bin

  • Like 6
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.

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