Log In  

Cart #simplestarfield-1 | 2022-09-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA


Arrow keys to move.

P#118113 2022-09-28 15:24 ( Edited 2022-09-29 00:47)

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.
P#118117 2022-09-28 16:32

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

P#118125 2022-09-28 18:52

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.

P#118126 2022-09-28 18:58

Very Satisfying. Great job!

P#118128 2022-09-28 19:37
1

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:

Cart #simplestarfield_mod-0 | 2022-09-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

P#118129 2022-09-28 19:58

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

P#118140 2022-09-29 00:42 ( Edited 2022-09-29 00:42)

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.

P#118141 2022-09-29 00:43 ( Edited 2022-09-29 00:44)

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

P#118142 2022-09-29 00:49

You are very welcome, @kellercode. We can all learn from each other in here. :)

P#118164 2022-09-29 16:20
1

Cart #fekutiyufo-0 | 2022-09-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1


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

P#118166 2022-09-29 17:02

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

P#118173 2022-09-29 19:14

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 05:25:38 | 0.055s | Q:37