Jump to content
  • Advertisement
  • entries
    10
  • comments
    30
  • views
    3143

Strawberry Alert: Day 1

Avalander

828 views

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.

 



4 Comments


Recommended Comments

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!

Share this comment


Link to comment

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

Share this comment


Link to comment

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. 

Share this comment


Link to comment
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.

Edited by Avalander

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By ERASERHEAD STUDIO
      A new entry in the devlog for 13 Ronin, a retro 2d samurai fighting game, this time it's about implementing the logic for the computer player.
      Happy coding!
      https://www.eraserheadstudio.com
       
       
    • By Znippy
      Hello everyone!  
      This is my submission for the Frogger challenge.
      The final build for the project can be found here!
      I hope I have fulfilled all requirements for this challenge. Sadly, I do not have time to create a gameplay video. I am not sure if this is a must. I have added a couple of screenshots from my blog series.
      My post-mortem post will be done next week. 
      As I already mentioned on the project page, I also could offer a Linux build if somebody needs one!
      I hope you like it and I am excited to see your high scores!
      Please tell me if there is anything missing!
    • By phil67rpg
      I am made a lot of progress in my game but I have hit a small snag. in my code I am using an AABB collision detection. I have also used exit(0) to debug my code.it tells  me where in my code where it is getting access to. I have put exit(0) in the AABB collision detection and it accesses it just fine. but when I put only drawcollision_one function in the AABB collision routine it does not draw my collision sprite  animation. when I put drawcollision_one in the display function it works just fine. when the planes collide nothing happens but the exit(0) is accessed when the planes collide. here is the code I am working on.
      void drawcollision_one() { glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, texture[3]); glBegin(GL_POLYGON); glTexCoord3f(0.0f + screen, 0.0f, 0.0f); glVertex3f(0.5f, -0.5f, 0.0f); glTexCoord3f(0.167f + screen, 0.0f, 0.0f); glVertex3f(0.5f, 0.5f, 0.0f); glTexCoord3f(0.167f + screen, 1.0f, 0.0f); glVertex3f(-0.5f, 0.5f, 0.0f); glTexCoord3f(0.0f + screen, 1.0f, 0.0f); glVertex3f(-0.5f, -0.5f, 0.0f); glEnd(); glDisable(GL_TEXTURE_2D); } void timer(int val) { screen += 0.1667f; if (screen >= 1.0f) { screen = 1.0f; } glutPostRedisplay(); glutTimerFunc(500, timer, 0); } void coll_plane_one() { //draw bullet float x = -5.0f + horizontal; float y = 0.0f + vertical; float oWidth = 1.0f; float oHeight = 1.0f; //draw plane float xTwo = 5.0f + horizontal_one; float yTwo = 0.0f + vertical_one; float oTwoWidth = 1.0f; float oTwoHeight = 1.0f; if (checkCollide(x, y, oWidth, oHeight, xTwo, yTwo, oTwoWidth, oTwoHeight) == 1) { drawcollision_one(); } }  
    • By Shaarigan
      Hello Community,
      I'm passionated game developer and doing some hobby board game authoring in my spare time. I'm now at a point that there is need for some artworks for a new game I'm currently prototyping that need to match a certain art style, so I'm looking for a reliable Artist/ Illustrator to help getting the artwork done for a few cards.
      The card game is a collectible strategy card game where each player has a preconstructed deck of cards with the goal to decrease every other opponent's life points to zero. So far so convinient the game comes with a clue; in order to skip any randomness caused by throwing a dice or flipping a coin, players do some kind of Tarot Fortune telling to determine the result of certain situations. Away from classic taro cards, there are some other game related constelations like The Omen, The Herald or The Horseman which each has certain meaning based on current situation.
      The cards have a minimalistic but also detailed art style and this is my current problem. While my knowledge using Photoshop is at a level I could design my cards very well, I'm not talented enougth to do the art except the example picture I already did.

       
      So anybody who likes card games/ board games like I do and would be able to draw/sketch or however reach the art style of my current sample image and willing to help for 10 to 15 different images would be welcome.
      The game will, once be completed in design and balancing, presented to an agency to be or be not approved for further potential customers in order to get produced or otherwise put to Kickstarter. However, as always I do this for joy not profit so don't expect any financial outome.
      Please contact me via Discord or PM for interest or further questions. I expect a minimal netiqeutte for example to be honest, reliable and all but foremost tell me if and when I could expect first results so I wouldn't be waiting all day for a never comming reply
      Thanks in advance
    • By Jamesgz
      Hey my dudes,
      Me and 4 friends are third year compsci students. Three of us are pretty good at drawing. We are hoping to make a 2d roguelite game with unity during the next few months. We are still brainstorming. At the moment, my idea is to create a card roguelite game:
      First, you would need to choose 2 heroes to enter the dungeon with the goal of finding a treasure. The treasure found gives you extra bonus in later runs. You can choose between mage, gunner, rogue, paladin, warrior and fighter. Each hero has their own unique cards. And there are common cards that every heroes can get(like hearthstone).
      The progression system would be like slay the spire’s. You can choose your own path, but every paths leads to the boss. It would use procedural generation. After defeating an enemy, you get to choose a new card out of the three options. There would be shops, random events, elite enemies, etc
      The combat system is where i need some suggestions on. There would be two piles of deck. One for each hero. I can think of two good combat systems:
      1. Before every enemy encounters, you can choose what cards to use from your deck. Cards not used would not get discarded. Cards are drawn from the deck only if they break or due to special card’s effect. Every card have a durability number. Ones the durability reach zero, the card would break and can no longer be used. Events/enemies can modify the durability of the cards.
      2. Card not used this turn would get discarded. Once the deck is empty, the discard pile gets shuffled and copied to the deck. Card/item effects can increase the number of cards you draw.
      How can I make the game more interesting? Any suggestions would be appreciated.
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!