Posts Tagged ‘nodejs’

Tile Risers Postmortem

Posted by (twitter: @etodd_)
Monday, December 28th, 2015 10:25 am

Friday 21:15

Fifteen minutes after the theme announcement, my friend Ben Homan walks through my front door. Not really my front door, I’m just a subletter. But this is a first. Normally he ignores our instructions to walk in without knocking. The first time, he texted me from the driveway.

21:30

Jesse Kooner walks in, also unannounced, bearing frozen pizza. Before he can even kick his shoes off, I loudly explain the theme: a never-before-seen tie between “growing” and “two-button controls”.

21:45

Jesse has no laptop. I dig out an old one from my closet. I plug it in and start working on a few Windows updates. 72 to be exact.

Meanwhile, we decide which technology to use. Jesse’s less code-focused skillset leads him to prefer Unity, while Ben wants to use the weekend as an opportunity to become more familiar with Node.js. We decide on Node.js. Jesse will provide creative input and artwork.

22:30

My roommates, a brother and sister, arrive home from an apparently underwhelming Christmas light show. The concept of a game jam is foreign to them, but they’re good sports. We spend a half hour playing QWOP with them.

23:00

Our design parameters:

  • Multiplayer. Otherwise, what’s the point of Node.js?
  • Probably 2D due to the limited timeframe. Although Jesse is more comfortable working in 3D.

Jesse originally suggested doing this competition a few weeks ago, when he wanted to create a mash-up of “Cookie Clicker” and a tower defense game. He resurrects the idea now, only halfway joking.

Ben likes the idea of a multiplayer vine growing game. I’m partial to a text-based social game about growing a social media brand. No one commits to anything yet.

Ben is not a big gamer, so I pull up a few famous HTML5 games on his laptop. Cursors.io. Agar.io. 2048. This last one interests me in particular, as it involves growing numbers.

23:15

I’m pitching Ben and Jesse on a multiplayer version of 2048. I envision a free-roaming world filled with numbered tiles to collect. Instead of collapsing numbers together against the edges of the board, players would find walls and structures within the world to collapse their numbers against.

23:30

  • How can two or more games of 2048 occur simultaneously on the same board? In normal 2048, the player controls all tiles on the board. We decide to give each player a unique color, and allow them to assimilate unclaimed, grayed-out tiles.
  • What happens when tiles from two players meet? We decide that whoever moves first gets to own the resulting collapsed tile from a move.
  • How do players traverse through the world? We toss around the idea of procedural generation, but eventually decide on hand-crafted, linear levels linked together via portals.
  • This raises the question: how do the portals work? And what happens to a player’s tiles once they exit a level?

Top right corner: our confidence that we’ll actually finish the thing.

Saturday 00:30

We’ve eaten two pizzas. We have a Git repository and a Slack instance which is ultimately only used to test out amusing Slackbot responses.

Although the game is 2D, we decide on a 3D art style with an orthographic projection, to allow Jesse to use his skills in Maya LT, which he promptly installs on my old laptop.

Ben works on the server with Node.js, while I start on the client with Three.js.

02:30

Ben heads home first, then Jesse. I pass out on my bedroom floor.

You can see we’re already struggling with the name.

08:30

I wake to find Ben working in the kitchen. He spends the morning building boiler plate for the server, while I work out some Three.js details.

13:30

I return from a run just in time to catch Jesse pulling up with donuts. After lunch, he and I spend the next few hours working out a pipeline between Maya and Three.js.

16:00

I tweet our first screenshot, featuring colorized instances of Jesse’s tree model displayed in a horribly distorted orthographic projection.

18:00

Without the server API to code against, I run out of things to do on the client. Ben finishes the data model, but he has trouble conceptualizing the rules for player movement. I haul my laptop over to indulge in some good old-fashioned pair programming.

19:00

Break for dinner. Burritos. Jokes.

21:00

Jesse continues modelling. With the basic API done, I start working to make the client consume it. Ben works on an image loader. We want to design the levels in GIMP.

23:00

Ben takes off. I’ve got player movement, animations, and tile numbers done.

Sunday 00:30

Multiplayer works. Jesse and I play a few games against each other. It’s fun! It’s a game! We work out some issues with the level loading code and try to get an interesting level loaded.

02:00

Problem: it’s pretty easy for one player to gain the upper hand and quickly assimilate all the tiles on the board, making it impossible for other players to move and grow.

02:30

Solution! Players should only control tiles within a certain radius of their “center”. Outlier tiles are grayed out, free to be picked up by other players.

03:15

Fix implemented. Jesse heads home and I turn in.

09:15

Tweet another screenshot before heading to church.

At this point, I’m having an existential crisis about the name. I fire off a few panicked texts about it.

12:30

Ben and I are back to the grindstone. Jesse arrives with sandwiches and more donuts! Ben adds a cool username feature, but we eventually axe it to keep things simple.

15:00

Tweaks and bug fixes all day. Ben works on the level format, while Jesse lays out some levels in GIMP.

17:00

More polish. I put in Jesse’s cloud models and a “connecting” spinner.

19:00

We finally brainstorm a name: Tile Risers. Jesse whips up a logo in Maya. We go through seven iterations before everything lines up in our janky export pipeline.

20:00

I spin up a Digital Ocean droplet, allocate an S3 bucket, commit the production URLs, and start filling out the submission form.

21:00

Time’s up! Fortunately, we have another hour to submit. I later found out I misread the rules, and we actually had a whole extra 24 hours. At any rate, we were done. I commit two small bug fixes after submission, which is within guidelines.

Conclusion

Mirrored on my blog

Birds of Borg – small update

Posted by
Monday, December 21st, 2015 9:07 pm

I just updated the server part of Birds of Borg – it now shows more prominently, whether there is a chance of having a multiplayer game with a real opponent. I hope more players will have the chance of trying the internet multiplayer variant, because it’s way more fascinating to play against human enemies!
The game itself didn’t change at all, so I consider this to be within the compo rules.

Thanks for voting!

Birds of Borg – Post Mortem

Posted by
Tuesday, December 15th, 2015 9:44 pm

I visited the Ludum Dare site quite a number of times in the last years, and I learned most from various Post Mortems I read; now, after my first own Ludum Dare experience I will share my thoughts, and hope you will find some helpful thoughts.

Birds of Borg in a nutshell:

It was a fun ride, for a first entry to Ludum Dare I would say everything went extremely smooth, I even slept for 6 hours straight and had time to meet some friends. Way more that I thought would be possible.
First I thought going directly for Compo is way over my league, but on the other hand I wouldn’t have had the time on Monday to finish the job reasonably anyway.

Birds of Borg, landing page

What went well?

  • Way more than anticipated
  • I love JavaScript more and more, the more code I write (did mostly C, C++, Java, Perl before).
  • phaser is pretty awesome now. Docs are good, examples well done.
  • I like SFXR for quickly creating sound effects without too much experience with synthesizers.
  • Game Design can be time consuming, but I realized in time that I had to stop working on it and spend more time on code and media.
  • I DID finish, I HAVE a running game, and it ALMOST is actually really fun!
  • The multiplayer code is actually working extremely well. If you find any other players to play with, that is…

What went wrong?

  • Not much, really…
  • Except for there was too little time to do everything I wanted
  • No time for background music (tools, see below).
  • No time to change (and playtest) game design to incorporate the ‘growing’ theme.
  • The artificial intelligence is still not … really intelligent.

What best practises would I suppose (and did TOTALLY not adhere to myself)?

  • Try to get life out of the way, sleep enough beforehand, don’t get ill.
  • Never, ever start without knowing your tools, your libraries, your development environment.
  • As a coder, never underestimate the time it takes to create media.
  • Don’t underestimate the time for final deploying.
  • Never, ever underestimate the time it takes to debug multiplayer network code.
  • Have a good game design ready before starting to code.
  • Be satisfied. You will NEVER be satisfied with what you created. It could have been SO MUCH better.

Birds of Borg, Gameplay

The theme was announced at 3am in Germany. I was sound asleep, because I only had 4 hours of sleep the day before (try to get life out of the way…), and I was getting a cold. At around 5am I read the theme, slept a bit over it, and at 7am I had an Idea and even the title for my game.
At first, I started with a trivial HTTP server written in node/express (basically as a warmup), noticed that my editor didn’t work like I wanted it to, and needed half an hour to correct this. The first game related stuff was choosing a font for the Borg theme; it’s not really reasonable to start this way, but I needed a distraction from my issues with the text editor. A (very) short landing page was created, and I included a trivial phaser example.
I hadn’t worked with phaser myself before, so it was learning on the go (never, ever start without knowing your tools…). It went pretty smooth, though, I added first sprites, got some placeholder graphics, and worked on the obstacle field. At about 10am I had a reasonably distributed field.
I started to learn phaser physics, got some more issues with my text editor (the linter), added multiple player sprites (at the beginning this should be temporary, but it turned out to stick to the end), and added collisions. Those collisions turned out to be tricky, as I didn’t want the blocks to move, and the players should really stop at the blocks and slide partially at the edges; in effect, I changed the collision scheme several times on both days. The birds also had to flock, so I let them accelerate if they were a bit behind the center of gravity of the flock. A first version was ready at about 12pm, but I worked 2 more hours on the collision scheme. For a break I read what others were doing and posting.
Next was a (trivial) artificial intelligence for additional sprites. I had it running short before 3pm. After lunch I added the life counters; a bit tricky, because they shouldn’t be rotated like the player sprites. At 5pm that was done. Then came the time counter, and the game logic. I also had to read quite some docs in order to get rendering order right (READY/SET/GO should be in front) and scaling right – in case you changed the window size. At 6:30 that was done and I was off for diner. Didn’t actually get home before half past 10 😉
After some cleanup, getting the number of enemies from the URL and having the possibility to display an error message, getting the font used in the game itself turned out to be tricky (docs are a bit wrong here).
At about 12am I had a working game, I finally created the real landing page with the borg theme. I created the background image from scratch in gimp using inspirations from openclipart; as I’m not used too much to gimp, it took me over half an hour to do so…
At 3am I created the first post about my current state, then worked on the AJAX code to display server statistics (like active players). Including socket.io for the game data was the next step. At half past 4 I finally went to bed.

At 11am the next day I started including network code in the game. First for waiting for other players, joining game rooms and waiting for the start of the game. I had to rework the sprite code quite a bit, because there was no room for remote controlled sprites. Getting that right took until lunch at 3pm. Afterwards I had to create the other players, create functions for sending and receiving sprite data (position,angle,health,etc.). That worked at about 5:30pm.
I changed a number of things at this point, scaling code was completely removed, now using standard phaser calls for that, collision code was changed again, etc. I also did some playtesting and fixed the network code – it was still very rough then. I noticed that I forgot to synchronize the background blocks position, that lead to all sorts of strangeness…
At 8pm I started to optimize the network code, rounding floating point data, only sending changed data, reducing name lengths. That was working fine at 9:30. At 10:30 I started working on the graphics (the birds and their animation). It took a while until animation really worked, the phaser calls had been changed from what I read in some examples. After midnight I created the sound samples with SFXR, and incorporated them in the game. At about 12:30 I started to work on a *real* artificial intelligence, which took until 2am, where I actually just stopped myself from continuing on that … semi-intelligent thingy.
Then it was cleaning up, zipping, deploying on my server, creating screenshots and the game entry on the Ludum Dare site, and it was 2:58am. Well, I didn’t touch the extra hour, but it was close. 😛

After voting was open I played a few games for calming down, and went straight to bed :-)

Hope you enjoyed the read; I guess you get a feeling how much time you can actually waste on network code… I hope you will be able to find playing partners, because that always seems to be the major issue. And playing against real world enemies is *definitely* way harder and more rewarding than against the AI…

There is a timelapse video for those who like to read less and get flashed more 😉

Thanks for all your games, and – ah – in case you didn’t do that yet – please

Matthias Hopf AKA emmes AKA mshopf

Birds of Borg – Development Timelapse

Posted by
Monday, December 14th, 2015 8:56 pm

Finally, find my (silent) development timelapse of my Compo entry Birds of Borg – it took a while, because I had to clean up the mess that happened from 3 Xserver crashes during the development :-X

Birds of Borg” is a single- and multiplayer action game done as a HTML5 Web game with phaser and node.js/express/socket.io.
The breaks in the video have been shortened to 3 seconds video time, regardless of their real length. In case you wonder how long I actually slept, there’s a clock in the lower right corner…

A Post Mortem analysis of the development process will be published later. Probably tomorrow.

Have fun, and try to watch in slomo if the rapid screen changes make you sick 😉

And don’t forget to play & vote!!!

Finally… 2 minutes before deadline X-D

Posted by
Sunday, December 13th, 2015 9:22 pm

I actually managed to finish and submit my game Birds of Borg 2 minutes BEFORE the deadline!

I think I went a bit over the top by creating a networked multiplayer game, even with (simple) match making. Game mechanics could have been more sophisticated, and originally I wanted to support the growing theme as well (growing a flock of birds), but that would have needed quite a few more hours. I hope you like the StarTrek related theme 😉

There will be a timelapse video, but first I have to clean it up a little – my Xserver crashed 3 times during development.

I’m really happy with the result nevertheless, given that it has been my first Ludum Dare, and that I personally never did anything with phaser before.

And NOW I’m exited to play all those games YOU guys have created =-D

And a little sleep would be reasonable as well…

Birds of Borg

a MMO experience.

Posted by (twitter: @@PUriTanner)
Sunday, April 22nd, 2012 9:17 pm

IT’s an  MMO* made with node.js/backbone/three.js/tween.js/underscore/…

… and all the good parts of javascript.

http://www.ludumdare.com/compo/ludum-dare-23/?action=preview&uid=12078

What is it all about?

You are in charge of an evergrowing world in a universe full of evergrowing discs.
But growth comes at a terrible price.

In the advent of your great growth-inducing politics the general disc-populace grows weary of overpopulation and overproduction.
You decide to take the best way forward.
WAR.
War against the unknowingly weak non-blue discs.
Carefully you plan your next aquisitions while balancing your infrastructure spendings with your investitions in green energy and hauntingly large disc-machines of war.

 

What does work:

  • Support for up to 51.00000000000002 players
  • Planets indicate their current production capacity by growing
  • Planets may revolt (red tint)
  • Military and a good investition in green technology help to overcome riots.
  • Attacking

What doesn’t work:

  • There is no chat or ranking.
  • You cannot transfer your all-killing-war-machines to a friendly planet
  • If you tab out there is a high chance your browser might die.
  • Simulation is a bit rough. Hadn’t had time to make animations
  • Same for graphics.
  • Player starting positions can be compromised from time to time. If you can’t grow your disc: reload the page

 

Oh, and the code is horrible. Iam not uber experienced and furthermore obviously needed to reassure myself that Diablo3 won’t ever become a game i could be happy with.

Thanks for your time. Have a blast!

 

 

 

 

If you still haven’t played it yet, here is a screen with lots of circles for you.

f this s. iam going to be a potato!

http://www.ludumdare.com/compo/ludum-dare-23/?action=preview&uid=12078

 

*at least in a realtivély tiny world it would be a MASSIVELY MULTIPLAYER ONLINE experience. Here it’s somewhat of a medium scale multiplayer app.

[cache: storing page]