Strawberry Alert: Day 1

Published August 07, 2017
Advertisement

Strawberry Alert: Day 1

Today I have started working on the Week of Awesome V challenge. The working title for the project is Strawberry Alert. I generated it randomly and it is very unlikely to change due to time constraints.

The Project

The themes I want to try are Alien invasion and Castles. My intention is to create a side scroller where the hero must defend her castle from an alien invasion.

With this project I want to explore whether functional reactive programming can be successfully used in games. I intend to capture the user input and time effects into streams, apply map-reduce to these streams to generate the game state, and finally render that game state to the screen.

I will be happy if I can deliver something playable by the end of the week. Unfortunately, this week I'm back to work after vacation and I've got a few social commitments that I must honour, so I expect to be able to dedicate only about twelve hours more to the project.

So far, I have managed to put together a parallax background and the walking animation for the hero sprite.

The Art

I am using a hero sprite and castle tiles created by Jetrel. I still need to find sprites for the alien enemies.

The Tools

I will target the browser and create my game using JavaScript. My weapons of choice are:

  • pixi.js: a rendering library for WebGL and Canvas.
  • cyclejs: a functional reactive framework.
  • xstream: a stream library designed to work well with cyclejs.

The Links

The code is available on GitHub and, since it is a browser game, I will deploy my daily progress so that you guys can try it out.

 

Previous Entry Hexagons
4 likes 4 comments

Comments

JoshGrams

Looks like you managed to match the walking speed with the animation's foot movement pretty well: doesn't look all slidy like they often do. Nice!

August 07, 2017 07:07 PM
Scouting Ninja

Like that it's a browser game, already it works and easy for testing. And your game's name will really stand out.

August 07, 2017 07:09 PM
__Toz__

I've heard about functional reactive programming before but usually it's only mentioned in the domain of web development. It'll be interesting to hear what becomes easier and what becomes harder when you apply it to game development. I hope you'll do a post-mortem for that reason. 

August 07, 2017 07:16 PM
Avalander
49 minutes ago, JoshGrams said:

Looks like you managed to match the walking speed with the animation's foot movement pretty well: doesn't look all slidy like they often do. Nice!

Yeah, thanks! ^^ It took a bit of playing with the animation speed and moving speed. I found out that playing with extremely slow speeds made it easier to find a good enough ratio.

47 minutes ago, Scouting Ninja said:

Like that it's a browser game, already it works and easy for testing. And your game's name will really stand out.

Thanks! That's the exact reason I chose browser. Works on every OS out there, no need to install anything, just send the link and everybody can try it out.

40 minutes ago, __Toz__ said:

I've heard about functional reactive programming before but usually it's only mentioned in the domain of web development. It'll be interesting to hear what becomes easier and what becomes harder when you apply it to game development. I hope you'll do a post-mortem for that reason. 

Absolutely! During this week I won't spend much time discussing the challenges I find because I'd rather spend the little time I have working on the game instead, but next week I plan on writing a post-mortem and go into more detail.

One thing that I'm concerned about is that functional reactive programming emphasises immutable objects and mapping objects to other objects, so it's kind of easy to end up generating too many intermediate objects and reusing objects is not as easy as with more OOP approaches. We'll see how it turns out.

August 07, 2017 07:56 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement