What I've been up to: The "I should post something on here" Edition

Uh. Hi. It’s been a little while, hasn’t it.

If you’re not following me on Twitter, you’ve been missing out on what I’m up to! I’ve been struggling with getting art assets done for ./Gather, so in my typical response to difficulty, I’ve shifted to another one of my projects and am working on WarPhase again! I decided using Game Maker as I had been was inefficient and started over from scratch using pure JavaScript and HTML5 with PHP for multiplayer! That means it should technically be playable from any device that supports HTML5, which is almost everything now, which is awesome.

I’m about 1/4 done with the core engine—the board, player pieces, mines, and debris are drawn to the canvas, there’s position checking, all the movement scripts work, and you can play as any player with the other pieces’ positions rendering correctly! Next I need to work on the cards. I’ve just started the deck functions, which includes filling the deck, shuffling the deck, and serving out the cards to the players, but I still need to work on getting the cards to draw and animate on the canvas so you can click them and make your moves and stuff.

TL;DR: WarPhase Online is being made from scratch with JavaScript and HTML5 and is making good progress.

If you’re interested in playing WarPhase physically and letting me know what it’s like or if it’s any good (I have no local friends and so have never actually played it), you can find out about and download the Print & Play version here!

Example: Get date format by class name and submit data via AJAX (with jQuery)

Example: Get date format by class name and submit data via AJAX (with jQuery)

For this example, we’re going to leverage a function in a namespace (APP.utils) named (APP.utils.getValueByClass()) that I wrote in my last post (Set a value based on the presence of a class name (with jQuery)). We’re going to get the value of an input (a date), determine the date format by class name, and submit the day, month, and year to our web server via AJAX and display the response (text…

View On WordPress

JavaScript forever!

когда много лет назад все вокруг ревели, что JavaScript — херня и со временем умрет, я не верил и спорил. они говорили, что готовые апплеты (библиотеки компилированных апплетов) + CSS + серверные языки уничтожат JavaScript на корню. я не соглашался. потом появился ajax и jQuery. и все заткнулись. а теперь есть Node.js и вариации. а все “спорщики” засунули свои языки куда подальше и забывают про свои PHP и прочее говно ненужное

Presented at at the Google WebPerf Special (London WebPerf Group), August 26th 2014.

Efficient JavaScript webapps need to be fluid and fast. Any app with significant user interaction needs to consider how to effectively keep memory usage down because if too much is consumed, a page might be killed, forcing the user to reload it and cry in a corner.

Automatic garbage collection isn’t a substitute for effective memory management, especially in large, long-running web apps. In this talk we’ll walk through how to master the Chrome DevTools for effective memory management.

Learn how to tackle performance issues like memory leaks, frequent garbage collection pauses, and overall memory bloat that can really drag you down.

Écrire du JavaScript véloce et à faible empreinte mémoire

Les moteurs JavaScript tels que V8 (Chrome, NodeJs) sont spécifiquement conçus pour une exécution rapide des applications JavaScript les plus complexes. En tant que développeur, si vous êtes soucieux de la consommation de mémoire et des performances, il est important que vous connaissiez les mécanismes mis en œuvre dans les moteurs JavaScript des navigateurs de vos utilisateurs.

via pompage.net