ultima Posted February 24, 2016 Share Posted February 24, 2016 (edited) A couple weeks ago I brainstormed an idea to create a star field here is the prototype. *fixed ver Zeitgeist Dystopia-Omega Dawn.bin Zeitgeist Dystopia-Omega Dawn.bas Edited February 24, 2016 by ultima Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted February 24, 2016 Share Posted February 24, 2016 What's with the irritating buzzing sound? Quote Link to comment Share on other sites More sharing options...
ultima Posted February 24, 2016 Author Share Posted February 24, 2016 What's with the irritating buzzing sound? Sorry I was testing with the volume off, it's fixed just delete the irritating version 1 Quote Link to comment Share on other sites More sharing options...
iesposta Posted February 24, 2016 Share Posted February 24, 2016 Observations: It is PAL 50fps It seems like a lot of code and use of rand for a small effect. (Cycles to do game things run out fast. You'll find out as you try ideas in batari Basic.) 1 Quote Link to comment Share on other sites More sharing options...
ZackAttack Posted February 24, 2016 Share Posted February 24, 2016 Looks neat. I'm so glad you aliased your variables with meaningful names. Seems like your code could be streamlined some.Isn't this: counter = counter + 1 rem generate starfield ballx = (rand&127) + 1 bally = (rand&31) + 31 __movestar a concise version of this: counter = counter + 1 rem generate starfield if counter = 1 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 10 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 20 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 30 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 40 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 50 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 60 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 70 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 80 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 90 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 100 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 110 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 120 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 130 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 140 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 150 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 160 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 170 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 180 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 190 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 200 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 210 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 220 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 230 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 240 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 250 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 __movestar I would think about splitting the screen into three horizontal regions (in addition to how you split it vertically down the middle already), randomly placing new stars in one of those regions and moving them along different trajectories based on the region. This would make it have a more immersive first person feel I think. 1 Quote Link to comment Share on other sites More sharing options...
ultima Posted February 26, 2016 Author Share Posted February 26, 2016 Looks neat. I'm so glad you aliased your variables with meaningful names. Seems like your code could be streamlined some. Isn't this: counter = counter + 1 rem generate starfield ballx = (rand&127) + 1 bally = (rand&31) + 31 __movestar a concise version of this: counter = counter + 1 rem generate starfield if counter = 1 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 10 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 20 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 30 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 40 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 50 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 60 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 70 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 80 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 90 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 100 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 110 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 120 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 130 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 140 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 150 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 160 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 170 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 180 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 190 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 200 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 210 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 220 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 230 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 240 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 : goto __movestar if counter = 250 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 __movestar I would think about splitting the screen into three horizontal regions (in addition to how you split it vertically down the middle already), randomly placing new stars in one of those regions and moving them along different trajectories based on the region. This would make it have a more immersive first person feel I think. star movement.png I refined it with no visible difference to: counter = counter + 1 if counter = 1 then ballx = (rand&127) + 1 : bally = (rand&31) + 31 if counter =10 then counter = 0 *this way the star will have some time to move. I will have a look at splitting the screen as soon as I have some more time. Thanks for the ideas it now has 3018 bytes in bank 1 lots of room to build on now Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted February 28, 2016 Share Posted February 28, 2016 The shots should go further. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.