You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was hoping to be the first person to release a realtime game in scenic (that is continuous, not just discrete grid stuff like Snake), but you beat me to it. :)
Anyways, I was hacking on this last night and a couple of things:
You can really simplify the "constrain" behavior by using :math.fmod to just wrap the player or asteroid coordinates to the screen dimensions.
You can also use pattern matching in the shoot method to remove the case statement in the try_shoot stuff.
I'm a little weirded out by your use of protocols (instead of behaviors) for entities, but I like the idea and would subscribe to your news letter.
You need to add drawing twice (maybe more?) to gracefully handle entities overlapping edges and wrapping on the screen.
The really fun part about collision detection/updating should use worker processes.
Anyways, it's really awesome that you put up a nice PoC that's easy to hack on, and I'd love to talk with you more on this stuff. HMU on the twitters (same username).
The text was updated successfully, but these errors were encountered:
I was hoping to be the first person to release a realtime game in scenic (that is continuous, not just discrete grid stuff like Snake), but you beat me to it. :)
Anyways, I was hacking on this last night and a couple of things:
:math.fmod
to just wrap the player or asteroid coordinates to the screen dimensions.shoot
method to remove the case statement in thetry_shoot
stuff.Anyways, it's really awesome that you put up a nice PoC that's easy to hack on, and I'd love to talk with you more on this stuff. HMU on the twitters (same username).
The text was updated successfully, but these errors were encountered: