Jump to content

Photo

New IntyBasic Game WIP (Asteroids?)

IntyBASIC Asteroids

11 replies to this topic

#1 fsuinnc OFFLINE  

fsuinnc

    Moonsweeper

  • 425 posts
  • Location:Chapel Hill NC.

Posted Sun Jan 24, 2016 5:53 PM

I am starting to see why games take so long to finish.  you never reach the end but you want to start start working on something different.

 

Anyway, I was messing around with the Colorsquare demo/line drawing example from GroovyBee and I can't say how exactly but I ended up with something that is starting to look a little like Asteroids.

 

totally concept at this stage. there is no collision detection, the astroids don't blow up and split into two but I think it looks kind of neat.

 

If you try the ROM it should display a screen with a space ship on it.

 

Left side of disc rotates ship counter clockwise. Right side of disc rotates ship clockwise. Up on disc fires thruster to move ship. There is some overlap so you can rotate and move at the same time.  Pressing any button will fire the gigantic torpedo. (Color Square Bloxel)

 

When you fire the first time the "Asteroids" will show up. This is just to randomize their speed and directions.

 

Thoughts??

 

shot0016.gif

 

Source and Rom if anyone wants to play with it.

Attached File  SHIP_012416.BAS   15.08KB   106 downloads

 

Attached File  ship_012416.rom   6.56KB   115 downloads



#2 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 9,736 posts
  • Busy bee!
  • Location:North, England

Posted Sun Jan 24, 2016 6:03 PM

:lol: :cool: Thats something I hadn't though about using coloured squares mode for. You'll definitely have to use sub-pixel movement to get it to feel manageable. The ship is way too fast at the moment.



#3 fsuinnc OFFLINE  

fsuinnc

    Moonsweeper

  • Topic Starter
  • 425 posts
  • Location:Chapel Hill NC.

Posted Sun Jan 24, 2016 8:07 PM

:lol: :cool: Thats something I hadn't though about using coloured squares mode for. You'll definitely have to use sub-pixel movement to get it to feel manageable. The ship is way too fast at the moment.

 

I am still not sure what sub-pixel movement is. Is that just changing the X,Y positions using fractions (i.e. #X = #X+0.2) so it really only moves every 5 steps?

 

I have made some small modifications to slow down the ship and added a counter to show collisions with the ship and any of the rocks.  I am on my laptop so I just have the keyboard arrows for control but I find I can scoot around the screen and avoid the rocks pretty well (all things considered).

 

I actually started off with a Star Castle idea thinking the colored squares could help me draw the "castle" and I would have 8 sprites for the ship, the bad guy, the sparks that chase the player and the players shots using another colored square for the bad guy's shot. somehow I got side tracked into asteroids.

 

I am thinking I can start with large Rocks. split them in two when hit if there are any sprites available or just one smaller rock if I'm at the limit and once the Rock is down to it's smallest size, rather than shoot it, perhaps you will have to hit it with the ship (mining it for essential elements or something) within a short time or it will dissappear and be replaced with a new large rock.

 

of course, I am still a long way off. Having fun though  :D

 

Attached File  ship_012416.rom   7.06KB   120 downloads

 

Attached File  SHIP_012416.BAS   15.77KB   87 downloads



#4 5-11under OFFLINE  

5-11under

    River Patroller

  • 3,240 posts
  • Location:Ontario, Canada

Posted Sun Jan 24, 2016 8:45 PM

There's a good explanation of sub-pixel movement somewhere here... I'm sure someone (or you) can find it... .

 

Basically, for example, make x_location be a 16 bit number. Do any math using all 16 bits. "Print" only using the upper 8 bits. This example could be referred to as 8.8 (the first 8 represents the integer, and the .8 represents the "decimal", although all math and such is done in binary. Depending on your requirements, you could pick 5.3 or 8.3 or whatever you want or need. Use speed and acceleration numbers in your math... add the acceleration (or deceleration) every cycle to the speed. Add the speed every cycle to the position (just like in somewhat real life). In some cases, acceleration will be 0, then just add the speed to the position.



#5 Rev OFFLINE  

Rev

    A.K.A. Revolutionika

  • 15,381 posts
  • Location:NC

Posted Mon Jan 25, 2016 1:47 PM

Nice start.

#6 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 9,736 posts
  • Busy bee!
  • Location:North, England

Posted Mon Jan 25, 2016 2:06 PM

I am still not sure what sub-pixel movement is. Is that just changing the X,Y positions using fractions (i.e. #X = #X+0.2) so it really only moves every 5 steps?


Yep! I have a part finished tutorial on it for IntyBASIC. I'll try and finish it off this week. You could use the same technique in your bike game for silky smooth motion.

#7 fsuinnc OFFLINE  

fsuinnc

    Moonsweeper

  • Topic Starter
  • 425 posts
  • Location:Chapel Hill NC.

Posted Mon Jan 25, 2016 2:34 PM

Yep! I have a part finished tutorial on it for IntyBASIC. I'll try and finish it off this week. You could use the same technique in your bike game for silky smooth motion.

sounds good.  I look forward to the tutorial.



#8 fsuinnc OFFLINE  

fsuinnc

    Moonsweeper

  • Topic Starter
  • 425 posts
  • Location:Chapel Hill NC.

Posted Tue Jan 26, 2016 4:33 PM

SO I have tried reading about this in some of the threads I could locate.  I do not know if I understand it (at all) but I am thinking that we are talking about syncing the movements better with screen refresh so that if it move 10 pixels in a second my current method, which doesn't look at screen timing or refresh or vblanks or anything might have the sprite in one place and then a second later display it suddenly 10 pixels down the road (or whatever) whereas if I new the screen was refreshing 60 times each second and I could update the position each cycle then I could add .1666 pixels to the position each cycle and the object would appear to move 1 pixel each 6 cycles or so and would end up in the same place, 10 pixels away after 1 second but would look much smoother in getting there.

 

Admittedly, I don't understand how to make that happen right now, but is that pretty much what we are talking about?  because it does sound like the animation would be much better.



#9 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 9,736 posts
  • Busy bee!
  • Location:North, England

Posted Tue Jan 26, 2016 4:44 PM

I'm not sure how much you'll glean from this assembly language version we discussed a while ago :-

http://atariage.com/...pixel-movement/

Its not directly applicable to IntyBASIC because you can't "add with carry".

#10 fsuinnc OFFLINE  

fsuinnc

    Moonsweeper

  • Topic Starter
  • 425 posts
  • Location:Chapel Hill NC.

Posted Tue Jan 26, 2016 6:28 PM

I'm not sure how much you'll glean from this assembly language version we discussed a while ago :-

http://atariage.com/...pixel-movement/

Its not directly applicable to IntyBASIC because you can't "add with carry".

 

Yes, I read through that last night. 



#11 Rev OFFLINE  

Rev

    A.K.A. Revolutionika

  • 15,381 posts
  • Location:NC

Posted Sun Feb 28, 2016 11:14 AM

How is this Asteroids game coming along?

#12 fsuinnc OFFLINE  

fsuinnc

    Moonsweeper

  • Topic Starter
  • 425 posts
  • Location:Chapel Hill NC.

Posted Sun Feb 28, 2016 12:41 PM

How is this Asteroids game coming along?


Sadly i have done almost nothing on this or anything Intybasic for about a month. I am hoping to get a grasp of sub-pixel movement of sprites before i move forward. I am trying to clean up and update some of my Stunt Cycle code but thats about it. Just coming off my busiest season at work so hoping to get some time on this soon. (Thanks for the interest.)
  • Rev likes this





Also tagged with one or more of these keywords: IntyBASIC, Asteroids

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users