sofia,
@sofia@chaos.social avatar

project officially launched.

if i manage to create a working game till midnight, the snake will eat a delicious apple (i will get a bottle of moderately fancy iced tea), otherwise it's @nordern 's tea to uses as he pleases.

the type of game is strictly confidential 🕵️.

sofia,
@sofia@chaos.social avatar

okay, i didn't get to finish it today. i'm still pre-MVP, but i think i figured out a good way to manage game state and -logic. also i learned how to do JSDoc type annotations, and i'm kiiinda using TypeScript?

anyway, i guess it wouldn't be real software without overly optimistic time estimates, and the tea is still safe with @nordern 😇.

sofia,
@sofia@chaos.social avatar

nevermind, my brain is still pretzels. i'm trying to have an immutable data structure that is passed through, but using a class structure for that may be a really bad idea. the references and back-references just get extremely confusing and weird.

why do i do this to myself 😫?

promovicz,
@promovicz@chaos.social avatar

@sofia Lack of a highly specialized DSL, maybe? But yes, it gets bad. This is because we program in linear text.

sofia,
@sofia@chaos.social avatar

@promovicz linear text? you mean like long functions as opposed to cross-linking class structures?

promovicz,
@promovicz@chaos.social avatar

@sofia No. Subtle brainworm: if we created and edited our programs as in-memory graphs instead of text, then most confusion about reference would go away. And that is most confusion I get about data structures.

(See research project „Subtextual“ at MIT - but it takes digging)

sofia,
@sofia@chaos.social avatar

@promovicz ah that makes sense.

also i misread your "this is because" as "this is why" 😅.

promovicz,
@promovicz@chaos.social avatar

@sofia .o(complicated code 🤝complicated sentences)

sofia,
@sofia@chaos.social avatar

new plan: snenk 2, written in (mostly?) functional SayNoToClassesScript. i am actually confident that i can do this.

@lispegistus @promovicz you probably overestimate the scope of the project, i just discovered the worst possible way to combine classes and functional programming, tried to stubbornly push through while also procrastinating and prematurely generalizing 😅.

sofia,
@sofia@chaos.social avatar

behold! the worlds worst snake game:

https://opensofias.github.io/snenk/

i should probably implement WASD, among other things 😅.

sofia,
@sofia@chaos.social avatar

sips iced tea mmh, pomegranade 😋!

sofia,
@sofia@chaos.social avatar

added:

  • WASD
  • input queue

also stylesheet import was broken for a little bit, sorry 😅.

sofia,
@sofia@chaos.social avatar

added: biting-your-own-neck protection (so pressing the opposite direction of where you're going gets ignored)

sofia,
@sofia@chaos.social avatar

prevented enqueueing direction by auto-repeating keys.

btw: you can press space to trigger a step. i used it before i implemented automatic movement but it didn't hurt to keep in 😛.

tomorrow: gamepad support 😇?

sofia,
@sofia@chaos.social avatar

oh yeah, an SVG renderer shouldn't be that hard either. oh, and i wanted to add mouse/touch queueing. that could be pretty fun, especially when playing on higher speeds.

also also it's written pretty much dimension agnostic, so i guess the only thing standing in the way of 4D is writing a renderer and keymap for it 🤔…

sofia,
@sofia@chaos.social avatar

added feature: queue indicator. excessive queuing feels a bit like cheating, but it's fun! :D

it also gives you a taste of what i'm planning for the mouse/touch controls. should be fairly straightforward to implement, too 😎.

sofia,
@sofia@chaos.social avatar

snake peek 🐍👀

to my knowledge this is the first snake game that does this, which is kinda cool.

this took me way too long to get right, except it's not right yet. the code is confusing, and the fact that i use integers for my vectors has come to haunt me a bit 😬…

recording of in-development version of snenk. it shows that you can click to enqueue snake movements in that direction (it always moves along dimension with the biggest difference). there is a bug where when you click towards up or the left, it enqueues one step short of where it should go.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ethstaker
  • osvaldo12
  • magazineikmin
  • GTA5RPClips
  • rosin
  • mdbf
  • Youngstown
  • Durango
  • slotface
  • everett
  • kavyap
  • InstantRegret
  • thenastyranch
  • provamag3
  • tacticalgear
  • modclub
  • cisconetworking
  • tester
  • cubers
  • khanakhh
  • ngwrru68w68
  • normalnudes
  • megavids
  • anitta
  • Leos
  • JUstTest
  • lostlight
  • All magazines