Jump to content
fsuinnc

New IntyBasic Game WIP (Asteroids?)

Recommended Posts

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

 

post-111-0-09637700-1453679082_thumb.gif

 

Source and Rom if anyone wants to play with it.

SHIP_012416.BAS

 

ship_012416.rom

  • Like 6

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

: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

 

ship_012416.rom

 

SHIP_012416.BAS

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

  • Like 1

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