Jump to content

Photo

First game, having trouble creating enemies/creating multiple enemies


6 replies to this topic

#1 P-Pickle OFFLINE  

P-Pickle

    Combat Commando

  • 2 posts

Posted Wed Dec 5, 2018 6:55 PM

I've recently got into batari basic programming and after following the Tinkernut demo and searching the wiki I feel lost currently. I'm making a simple side scrolling cowboy game and am having problems creating multiple enemies let alone just creating one. I've searched and found this thing called multisprite kernel but cannot figure out how to use it. If anyone would like to help I'll put below the .bas file. Thank you.

Attached File  cowboy_shooter.bas   6.9KB   10 downloads



#2 Lewis2907 ONLINE  

Lewis2907

    Moonsweeper

  • 297 posts
  • Location:Senatobia, MS

Posted Wed Dec 5, 2018 10:05 PM

Located at RT Site (
http://www.randomterrain.com)is where most of us go for information as well.

Have you looked at this yet for the multiple Sprite...

http://www.randomter...prite_9_objects

I would suggest starting with the standard kernel then moving onto the multisprite and DPC as those are more complicated. The Standard Kernel in my opinion serves as a good starting point. That is where I started out at and I'm still learning as I go. Hope this helps in your game.

Standard Kernel...

http://www.randomter...ss_coll_example

Edited by Lewis2907, Wed Dec 5, 2018 10:07 PM.


#3 Tony The 2600 ONLINE  

Tony The 2600

    Moonsweeper

  • 394 posts
  • 1.19 MHz
  • Location:Adelaide, Australia

Posted Wed Dec 5, 2018 11:55 PM

I agree with Lewis2907, it's a good idea to have a read on RT's site, it basically has everything. Also agree starting with the standard kernel and creating something simple rather then jumping into the deep in. Even if its just a little test program to learn the fundamental basics of how the 2600 operates.

 

Not sure your level of competence in programming but always best learning the simple things like variables, defining aliases and moving sprites assigned to the joystick aswell as AI to name a few. From there you can dig deeper into other kernels and learn the limitations of the system. There is things the 2600 just simply can not do.


Edited by Tony The 2600, Wed Dec 5, 2018 11:57 PM.


#4 Muddyfunster OFFLINE  

Muddyfunster

    Chopper Commander

  • 169 posts

Posted Thu Dec 6, 2018 6:18 AM

I've recently got into batari basic programming and after following the Tinkernut demo and searching the wiki I feel lost currently. I'm making a simple side scrolling cowboy game and am having problems creating multiple enemies let alone just creating one. I've searched and found this thing called multisprite kernel but cannot figure out how to use it. If anyone would like to help I'll put below the .bas file. Thank you.

attachicon.gifcowboy_shooter.bas

 

You also look like you are setting up your variables but then referencing them as "a", "b" etc, instead of the names you gave them. Using the names you dim at the start of your code will make debugging etc easier later.

 

having multiple enemies or anything in your game will depend on which kernel you use. The kernel basically sets the ground rules. Batari Basic has a few available, they each have advantages and compromises. 

 

As the guys posting above suggest, RT's site is a veritable gold mine of information and examples and I'd also suggest you work through the examples there.

 

Also the code snippets thread HERE is worth a look.



#5 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,245 posts

Posted Thu Dec 6, 2018 1:45 PM

The multi sprite kernel is not the best place to start making games with bB.  I'd consider getting comfortable with the standard kernel before dipping your feet in.

 

When I started messing with it I took an existing working example and played with the code until it was mine.  Feel free to do so with this code here:

http://atariage.com/...d/#entry4165992

 

You'll note I place all the player sprites in specific places and define graphics for them.  If you don't they'll cause artifacts on the screen or flicker.  Also, the playfield can get wonky if you don't load in a correctly sized playfield data right off the bat.  The graphical objects don't quite line up  nicely like they do in the standard kernel either.  You must also make sure there's at least a few lines between each virtual player otherwise flicker happens.  Lotsa gotchas :)



#6 Lewis2907 ONLINE  

Lewis2907

    Moonsweeper

  • 297 posts
  • Location:Senatobia, MS

Posted Thu Dec 6, 2018 2:49 PM

P-Pickle,

 

I did a little work on your program. I put notes in there to help explain what I did. It also helps someone else assist in debugging. I also added bank 2-8 and some simple bank switch so you don't have to use "goto" all the time. I changed the alias to match your intended designation like (room = h) I used room as it makes it easier to read through the code. I fixed your hostage, but I couldn't quite figure out you enemy and what you are planning to do. If you need some more help just post the code. I normally post all 3 codes below to help in debugging.

 

Also this is the Standard Kernel to jump or upgrade to MultiSprite / DPC takes some work and time if you decide to upgrade to those kernels. 

 

Good luck with your game, thanks.

Attached Files



#7 P-Pickle OFFLINE  

P-Pickle

    Combat Commando

  • Topic Starter
  • 2 posts

Posted Thu Dec 6, 2018 5:11 PM

P-Pickle,

 

I did a little work on your program. I put notes in there to help explain what I did. It also helps someone else assist in debugging. I also added bank 2-8 and some simple bank switch so you don't have to use "goto" all the time. I changed the alias to match your intended designation like (room = h) I used room as it makes it easier to read through the code. I fixed your hostage, but I couldn't quite figure out you enemy and what you are planning to do. If you need some more help just post the code. I normally post all 3 codes below to help in debugging.

 

Also this is the Standard Kernel to jump or upgrade to MultiSprite / DPC takes some work and time if you decide to upgrade to those kernels. 

 

Good luck with your game, thanks.

Thanks for this I'll check out the Standard Kernel on Random Terrain






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users