the only winning move is to what the fuck is going on

Ryuno-Ki @RyunoKi


Using I can create zip archive on-the-fly 😻

Imagine a web UI allowing you to describe stuff, then download a zip of that project to get started.

Bring your runtime and start hacking it.

have you seen the finnish air force flag?

susi has told me that šuši wats pleroma friends

susi on pleroma has no friends.

Ryuno-Ki @RyunoKi

And with this, I think I will wrap it up for today.

Plenty of ideas.
If you interested in something especially, let me know and I'll explain further.

(Sorry to people for spamming the local timeline)

Ryuno-Ki @RyunoKi

Plus, CSS allows me to take care for transitions and animations (something to implement in Canvas on your own or by a library).

I haven't looked into however. Opening the respective frameworks make my fan spin. Nope. Not even trying to use them with this hardware.

Ryuno-Ki @RyunoKi

I collect some minimal information like username and single or multiplayer upfront and then launch the game.

My personal niche: .

Most games are written in Canvas API with PNG tilesets and everything.
But those expose no APIs whatsoever.

I want to look into building accessible games. SVG has <title> and <desc> to put text in.

Ryuno-Ki @RyunoKi

Something I learned to value are to think of the UI as in terms of scenes. Like in a theatre.

I believe, taught me this.

Have every view (like you might say in Android or iOS) be a scene with things to put in.

Ryuno-Ki @RyunoKi

By using event listeners on document.body I can dispatch actions on the store and then have the data take care of the UI to update.

Ryuno-Ki @RyunoKi

Maxime / Xem is a person to stay close to. He assembled a lot of research and code gulf, that will teach you new tricks.

The tweet also mentions to come up with a demo as soon as possible so to gather feedback by others who play it.

I try to support Desktop Firefox and Chromium as well as Android mobiles and tablets (using Firefox).

Ryuno-Ki @RyunoKi

I can use this for transitions or key bindings.

Oh, and don't support only. For example, the French keyboard layout will make those players cringe.

Next to arrow keys (and on-screen buttons) is recommended:

Ryuno-Ki @RyunoKi

jQuery encouraged you to use : register and event handler not on every element, but on some further up the tree.

So if I register with document.body, I can catch almost everything. Looking at the allows me to decide what to do.

By coming up with a clever HTML API using data attributes ( ) allows me to declarative control the experience.

Ryuno-Ki @RyunoKi

Betting on the frameworkless movement ( ) has a drawback:

the DOM is edited quite often. Attached event listener would lead to a memory leak.

But there's a way out!
jQuery (no, hear me out!)

Ryuno-Ki @RyunoKi

By using Redux I can have easy debug by offering controls, to set up the game environment in a way I want. Then I can hack to my pleasure.

Since Redux is based on JavaScript primitives, it is JSON-serialisable. I can put it into localStorage and have a save button.
I can offer Redo and Undo thanks to Actions.

I can even go so far and have the state replay over the network (multiplayer!)

Ryuno-Ki @RyunoKi

According to the naïve approach of using innerHTML won't work. JavaScript will be injected, but not executed.

Instead, applying allows you to use a DocumentFragment, that can be inserted into the DOM and run the JavaScript.

So if I put everything into an iframe, I can have a preview next to the forms.


Ryuno-Ki @RyunoKi

Now, if you call Function.prototype.toString() you can see the whole implementation as string. This will break all closures, so you might need to include more that just the public API. But FP leans towards many small functions. By using function declarations (instead of function expressions), hoisting might play into your cards.

Then, you „just” need to take care for the data separately.


Ryuno-Ki @RyunoKi

If I take it a step further, I can use form inputs to accept the information, that make games special. Put them into a Store.

And generate code.

Yes, there are ways to do this proper with and everything.
But hey, this is JavaScript :D

You can create functions on-the-fly, e.g. using the Function constructor.

I'm going the route of assembling a <script> on-the-fly. That is, having the code as string.


Ryuno-Ki @RyunoKi

So if I have data and functions, I can build an interface.

It took to kick of the way how I want to do it. Namely the add, render and applyToDOM functions described there.

Combined with Redux, this is powerful.