Arrow keys to move.
Nice.
I would suggest some things:
- xspeed/yspeed in _init() is inside the for-loop
- You could color the stars depending on starspeed - so stars far arway are darker
- you can use a "setstar(x,y)"-function which set the x,y and the random speed - this should save some tokens. And you can set here a star-color depending on the speed.
@GPI Thank you! I didn't catch the thing about x/yspeed. I did think about coloring it different as well as making other shapes, but I liked the look of the white against the black. I know I could have done it more efficiently, if I did it again I probably would have used tables within tables.
Table in tables use more tokens. for example a starx is one token, a star.x are two tokens.
so your methode can be the better version, when you run out of tokens.
There are actually several shades you could use, @kellercode ... You might be able to slip some distance colors in there too.
Let me see, like this:
@dw817 I do enjoy the look of the shades of blue, but I also like the look of the white and black version. I tried making one with shades of grey, but it looked pretty bland in my opinion.
Sure thing, @kellercode.
You can also do shades of B&W if you like.
Now you just need to wrap a great little shooter or space tactical game around this.
@dw817 Thanks for the feedback by the way, I've been quite impressed with how supportive and nice the pico 8 community is! I probably will make a shmup using this as a first game.
You are very welcome, @kellercode. We can all learn from each other in here. :)
I played a little with the source code :)
some suggestions:
- tables start with 1, not 0 - your code works, but keep it in mind. when you do something like this:
a={} a[0]=1 ? #a |
will return zero for empty table!
-
count(table) can be shorten to #table
- only a personal thing, you declare/define global variables in _init() - I personal would do this outside every function. So when you read the code you can easier recognize global variables.
And maybe this playlist is something for you:
https://www.youtube.com/watch?v=81WM_cjp9fo&list=PLea8cjCua_P3Sfq4XJqNVbd1vsWnh7LZd
@GPI I might look into those tutorials in the future, but right now, I'd rather learn how to do things by myself using the manual and general-purpose tutorials.
[Please log in to post a comment]