Jump to content
IGNORED

Awakening (Completed) batari Basic game


rsiddall

Recommended Posts

If choosing to use multicolored sprites, is the kernel required to be DPC+? Is there a section where kernel choices are explained? 

 

Thanks in advance!

 

Update - I was able to cobble together the attached by using some of the examples people have provided: multicolored/animated sprites, collision detection, room scrolling, etc. I've got the "elf" shooting but think I may go with picking up treasures and just avoiding the enemies (no shooting).Awakening.bin

Edited by rsiddall
Link to comment
Share on other sites

@Random Terrain's bB pages has a section on kernel_options and a Kernel Options Chart that should help.

 

Quote

These are options for customizing the kernel for various needs. Generally, adding options will mean that some objects will not be displayed. Currently the options only apply to the standard kernel. These options will not work with the DPC+ kernel or the multisprite kernel.

 

player1colors
Set to use multicolored P1. Cost: loss of missile1.
 
playercolors
Set to use both multicolored players. Must be used with above (player1colors). Cost: loss of missile0.

 

 

  • Like 1
Link to comment
Share on other sites

This is a little orthogonal to your question, but you could also do multicolored sprites with the standard kernel by drawing both players on top of one another.  Takes twice the RAM for one sprite, and you'll need to resort to flicker if you want to reuse the players for anything else, but if, say, your game was mostly one sprite interacting with playfield graphics or something, it might be a handy solution.

  • Like 2
Link to comment
Share on other sites

On 6/14/2021 at 5:36 PM, SpiceWare said:

@Random Terrain's bB pages has a section on kernel_options and a Kernel Options Chart that should help.

 

 

 

Cool...I think this is the route I'm going:

set kernel_options player0colors pfcolors

 

Just wondering if you don't set kernel options, what is the default - is there one?

Edited by rsiddall
Link to comment
Share on other sites

14 hours ago, MrTrust said:

This is a little orthogonal to your question, but you could also do multicolored sprites with the standard kernel by drawing both players on top of one another.  Takes twice the RAM for one sprite, and you'll need to resort to flicker if you want to reuse the players for anything else, but if, say, your game was mostly one sprite interacting with playfield graphics or something, it might be a handy solution.

That might be another option to consider. Right now I'm using 2 colors on the player0 sprite (hat/clothes and face/feet) but could add additional colors (like white, to fill in the eyes) if I'm understanding correctly.

Link to comment
Share on other sites

48 minutes ago, rsiddall said:

Cool...I think this is the route I'm going:

set kernel_options player1colors pfcolors

 

Just wondering if you don't set kernel options, what is the default - is there one?

By default you get a kernel that allows you to use both player objects with a single solid color, both missiles, the ball, and a 32x11 asymmetric playfield. The kernel options modify this default, e.g. having to give up one of the missile objects to use player1colors.

  • Like 1
Link to comment
Share on other sites

1 hour ago, Karl G said:

By default you get a kernel that allows you to use both player objects with a single solid color, both missiles, the ball, and a 32x11 asymmetric playfield. The kernel options modify this default, e.g. having to give up one of the missile objects to use player1colors.

This sounds, unsurprisingly, like the early games Atari made. ?

 

Link to comment
Share on other sites

I've used RevEngs paddlemini mini kernel to add an "extra" multi-colored sprite below the playfield.  It was really meant to make paddle controller based games easier.  But, I just used it for the extra sprite.

 

 

It's limited in that you can't move the extra sprite onto the playfield proper.  It can only move horizontally just below the playfield.  Also, you must edit the mini kernel directly to put in your custom sprite.

  • Like 1
Link to comment
Share on other sites

3 hours ago, Gemintronic said:

I've used RevEngs paddlemini mini kernel to add an "extra" multi-colored sprite below the playfield.  It was really meant to make paddle controller based games easier.  But, I just used it for the extra sprite.

 

 

It's limited in that you can't move the extra sprite onto the playfield proper.  It can only move horizontally just below the playfield.  Also, you must edit the mini kernel directly to put in your custom sprite.

Awesome game!

  • Thanks 1
Link to comment
Share on other sites

15 hours ago, rsiddall said:

Added some columns to various rooms, broken columns, and change the stone color. Turned the bullets into a sword. Elf now hold the sword to kill the skeleton. Reworked the elf to "hold" the sword. Working out a score bug that sometimes resets the game.

AwakeningRev3.bin 8 kB · 4 downloads

Small update. Disabled the score momentarily (will continue to countdown past 0). Changed the PF/BK colors. Switched score fonts to "handwritten". Doubled the skeleton (Player1 -NUSIZ) but doesn't really make a difference to number of hits.

 

Have come to the conclusion this game looks like several others that have been done through the years. Not sure what the point of proceeding is.

AwakeningRev3b.bin

Edited by rsiddall
Link to comment
Share on other sites

Question about "kernel_options playercolors pfcolors"

 

Why isn't "player1color = $0E" working? (see skeleton). Skeleton is black/blue not white.

I also want to use "pfcolors" for different playfield colors (as seen in previous demos).

 

I simplified the code just to replicate the problem I'm having:

 

  set kernel_options playercolors pfcolors

 

  player0x = 34
  player0y = 74
  player1x = 112
  player1y = 32

 

Main_Loop


  COLUBK=$32

 

  player0color:
 $FE
 $FE
 $C2
 $C2
 $C2
 $C2
 $FE
 $FE
 $FE
 $FE
 $FE
 $FE
 $FC
 $C2
 $C4
 $C6
end

 

  player0:
 %01110000
 %00110111
 %10110111
 %10111111
 %00011110
 %10100111
 %10011001
 %00111100
 %01100110
 %11111111
 %11011011
 %10111101
 %10000001
 %01000010
 %01111110
 %00111100
end

 

  player1color = $0E


  player1:
%00100000
%00100100
%00100100
%10011000
%10111100
%10011000
%01011010
%00111101
%00000001
%00101001
%00111100
%01111110
%01010110
%01111110
%01111110
%00111100
end

 

  drawscreen


  goto Main_Loop

skeleton_player1.png

multicolor_pfcolor.bas

Link to comment
Share on other sites

Okay, so if I change the kernel to set "kernel_options player1colors pfcolors" I can get around this? Basically want a multicolored sprite (player1), a mono sprite (player0) and the ability to color playfield and missile0.

Link to comment
Share on other sites

21 minutes ago, rsiddall said:

Okay, so if I change the kernel to set "kernel_options player1colors pfcolors" I can get around this? Basically want a multicolored sprite (player1), a mono sprite (player0) and the ability to color playfield and missile0.

 

Every valid combination is in the chart. You look down the chart, find what you want, click on it, then copy the code at the top of the chart and paste it into your program.

 

If you only want one multicolored sprite and a multicolored playfield, you'd look at the chart to find player1colors and pfcolors, click on it, then copy what you see at the top:

 

   set kernel_options player1colors pfcolors

   rem  *  Cost: loss of missile1.

 

To change the color of the plain mono sprite, look here:

 

https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#colup0

  • Like 1
Link to comment
Share on other sites

3 hours ago, Random Terrain said:

 

Every valid combination is in the chart. You look down the chart, find what you want, click on it, then copy the code at the top of the chart and paste it into your program.

 

If you only want one multicolored sprite and a multicolored playfield, you'd look at the chart to find player1colors and pfcolors, click on it, then copy what you see at the top:

 


   set kernel_options player1colors pfcolors

   rem  *  Cost: loss of missile1.

 

To change the color of the plain mono sprite, look here:

 

https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#colup0

Thank you for your help! I wanted to add a missile to my game but couldn't get it to show up using the "kernel_options playercolors pfcolors". Had to change everything around so that I now have "kernel_options player1colors pfcolors" and the ability to use a missile for the treasure. Since the sword is a ball graphic, I needed another option for the loot. I haven't implemented the collusion routine - just wanted to get the graphic on screen.

 

Updated .bin attached. Thank you again for helping clarify my options.

 

 

AwakeningRev4.bas.bin

  • Like 1
Link to comment
Share on other sites

Fixed the score bug and added player lives. Lose a life when hit by skeleton (does not decrease score). Lose all 4 lives, game ends. I've got the treasure moving around randomly in current room (picking up adds 5+ points). Need to figure out how to make the loot randomly appear in a new room once picked up.

AwakeningRev5.bin

  • Like 1
Link to comment
Share on other sites

Created a custom font for the score. Used RevEng's batari Basic font pack as reference. Same applies to "Old English" - I'm placing in the public domain. Feel free to take and use as your own.

Just unzip the pack to your project's directory, and rename the font you want to use to "score_graphics.asm".

 

"Old English" looks good for dungeon crawlers, rogue-like, fantasy, etc.

 

font.oldenglish.gif.e21d934e34d22447737f42dff24286bd.gif

rsiddal_batari_Basic_oldnglish.zip

  • Like 4
Link to comment
Share on other sites

Small update. Added startup, sword "swish" and treasure pick-up sounds. Added collision between sword and treasure to make it a little easier when loot reappears in hard to reach location. Included my custom font in this version, too.

 

Is there an example of a timer that I could look at to see how to turn an object(ball or missile) on or off for a determined amount of time?

 

 

 

AwakeningRev6.bin

Edited by rsiddall
Link to comment
Share on other sites

18 minutes ago, rsiddall said:

Is there an example of a timer that I could look at to see how to turn an object(ball or missile) on or off for a determined amount of time?

 

If I remember correctly, you'd do something like this:

 

   _Main_Counter = _Main_Counter + 1
   if _Main_Counter = 60 then _Main_Counter = 0 : _Missile_Counter = _Missile_Counter + 1

   ...
   ...
   ...

   if _Missile_Counter = [whatever number you want] then _Missile_Counter = 0 : [DO SOMETHING]

 

  • Like 1
Link to comment
Share on other sites

What RT said. Basically just remember that one cycle of your main loop (a single frame) with a drawscreen is 1/60th of a second, so you can use a counter to count the number of frames to time it however you like. If you wanted a half second, you would count up to 30, etc.

  • Like 2
Link to comment
Share on other sites

You guys are awesome! I've got the code implemented and it's working great. Technically you could stay in the same room indefinitely and wait for the treasure to appear but if the average player is unaware, it gives the appearance of randomly spawning in different locations. ?

 

Latest version attached!

 

 

 

AwakeningRev7.bin

  • Like 1
Link to comment
Share on other sites

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