Rules are made to be broken.
Player input and visuals
I decided to get rid of GameBoy style input limitation in favor of 360° walking, aiming and dashing. This will open up a lot of possibilities for puzzles and give more freedom in fighting. So in the end players will be able to play on mouse/keyboard setup or using their favorite gamepad and play with analog sticks to aim dash direction.
With this I need to get rid of smooth-follow camera I talked about last time. Right now the camera is locked on player. I got inspired by the game Awesomenauts, right now I have a similar cursor to theirs and your charactes is always in the middle.
A little white box is replaced with a robot guy from the original GrayScale prototype! Fun fact: head and legs are animated independently (2 different sprites) which saves me a lot of sprite animation drawing. Head will always follow a mouse cursor, that’s aim direction, and legs will animate independent of the head.
I started using TexturePacker to merge (almost) all the textures, which didn’t work well with luxe’s SpriteAnimation component. I drew all player animation frames in one file: head looking around, legwork and other animations are put in 16×16 grid, in 4 rows. TexturePacker treats that whole file as one “frame” in a frameset. Luxe’s SpriteAnimation component can’t guess if given packed texture is a mixture of actual frames and independent animations, which in my case it is. I had to modify this component a bit to correctly setup player animation.
— Darek Greenly (@Zielakpl) October 18, 2015
In the mean time I’m preparing some functions and variables to be used in new powers. One example would be grab/throw mechanic. My last GBJam game RUSH used it and it was pretty fun. I can already think of much more use cases for it.
On a side note, I’m just amazed that my XBOX One Controller is natively supported on Ubuntu! I remember waiting for the official driver to come out back when I had Windows installed… Linux never stops to amaze me.
After a few small updates to the GrayScale I’ve realised that my previous concept of timing and physics was completely wrong! In short: I believed that firing extra physics steps when the timer missed 1/60 th of a second was a good idea. But what changed?
I’ve also spent some time on graphics. Preparing terrain tiles for Tiled is difficult but the results are fun to look at and really speed up level design. The bit challange is to make compatible tileset that will work with Tiled, It needs many combinations.
Cmera from the last HaxeFlixel version of GrayScale was simply awesome:
- It smoothly followed character while it was moving around
- And limited the distance from camera’s center to character (deadzone), so player can always see where he’s dashing to.
You can find the example GIF of “old” camera movement in my previous GrayScale – dev log #1.
Until now only smooth-follow was implemented, and It looked pretty. But the gameplay is too fast for it. Player can quickly dash in a direction, and now not all enemies/obstacles in front of you are visible.
First try at implementing dead zone failed. I couldn’t get the character to stay still on-screen while player was moving straight. The sprite always stutters where it’s on the edge of dead zone but should remain still. I kept trying different camera settings:
Tight smooth follow, without deadzone
As you can see (or not) the character (white box) doesn’t stay still in one position, relative to camera view, when moving straight in line (tiny stutters). This won’t look good after I add character sprite to it.
Nerve wrecking arcade runner game about love and throwing crates.
Avoid bombs, grab and throw crates, run, jump and don’t loose hope.
Now go! Rush to your love!
|Jump/Dash||hold move & hit [C]||hold move & hit [K]|
|Start||Enter or Space|
easy? GAME ON
Save people from sadness WITH MUSIC!
You have 10 seconds!
People spawn at random places, bring music to their life by shooting notes at them. Happy people will keep on dancing, but sad people can die.
Game over when the timer runs out, so make people happy or wait for them to die… you monster.
README: Web version required WebGL in your browser. If for some reason it runs slowly or doesn’t run at all -> Download the native version for Windows.
- WSAD / ARROWS / ZSQD – walk around
- Mouse – Aim and left button to shoot notes
- +/- – change volume of the music if you don’t like it
I’ve been posting couple of GIFs around the internet from my GrayScale game but never explained how each thing works. This post was originally written at Snowkit.org. It is a good place to start, if you’re reading this then you would find some luxe-related things interesting. In fact I think I managed to create/discover at least one interesting thing about luxe that I wanted to share with you (physiiiics).
I won’t call myself an expert in programming and this post is in no way a tutorial on “how to do things“. With luxe you can find your own way of coding. I’m just sharing what I discovered and had fun with
GrayScale is a small game I made for GameBoy Jam last year. It was made in HaxeFlixel but I wanted more control over my code and be able to easily create lots of enemies with different abilities. After few hours of googling I stopped by a thing called “Component Entity System” and finally found luxe engine (and so far I love it!). You can read more about the project itself on my blog.
Movement & “fixed time rate“
Movement is the core gameplay in here, you can walk, run, dash and jump-attack. I organized each type to extend from one
Mover component so each kind of mechanics share the same base (which is really thin so far). With components it’s easy to make characters controlled by player or AI and make them move by similar rules. I can make new enemies that walk around and dash-attack the same way that player does. Movement can be basically used for moving any kind of objects around the world. This way I could use it to move projectiles, doors, platforms etc.
Some time ago I decided to keep updating GrayScale. It was created using HaxeFlixel, which is great for quick prototyping small games. Maybe it’s my limited knowledge of that framework but I discovered that It gave me too much problems while developing. Adding new enemy means lots of copy/pasted code or strict inheritance.
Next I found out that it tried to do most of the work for me. It’s usually not a bad thing, but when something goes wrong or when you start seeing performance issues on slower machines, you can’t quickly find what seems to be a problem. Another bad thing is that it laggs horribly while recording a video, I’ve seen at least 2 letsplayers who had issues with my game.
Then I found luxe engine.
Component entity system would solve my problems with creating new enemies/abilities. Direct GL calls everywhere (OpenGL/WebGL). No Flash. Plus I could add fancy GLSL shaders into the game, like explosion shockwave or changing colors in runtime without using thousands of different sprites.
Luxe engine enforces programmers to do most of the job, but thats OK with me. I have more control over what I’m creating. I define how physics work, how collisions are calculated in tile-based world.
Recently I’ve found this interesting Pixel Sprite Generator. You can create procedurally generated sprites on the fly. It uses ala 2D array of values to draw solid outline, “soft” body or an empty pixel. Provide just one mask and get milions of variations.
I can see it being used in rougelike games, besides procedurally generated levels: enemy sprites, weapons, items, EVERYTHING.
It is written in JS so I couldn’t help but port it over to Haxe!
JS version draws on canvas and Haxe on
openfl.BitmapData. Enough talking, go check live example if you’re not yet excited:
Live Example (keep refreshing that thing for new sprites!)
GameBoy Jam has ended some time ago and my game ranked #7 in the competition. Among ~250 submitted projects I find it as small personal success and I wanted to thank everyone who voted
I’ve had really great time during the jam. Seeing other people’s projects being built step by step was really interesting and empowering experience. I could follow many games progress from the scratch, many of them with different mechanics and ideas. Game jams are one of the best ways to get into creating and finishing your small games and I surely will attend to some of them in the future.
I read every comment added by players on Gamejolt and I came to conclusion that, while many players enjoyed the experience, GrayScale is not actually finished. It has a bit list of things that could be added, fixed and get more polished. In fact i have lots of abandoned ideas in notebook and Trello board.
I decided to keep working on GrayScale but can’t promise that updates will be frequent because I have my full-time job to take care of. But when an update comes – It won’t be small My goal is not to bloat this game with lots of features but add whats needed and limit what is not, trying to keep the balance right (woah, big talk!).
I’ve successfully compiled the game for Android! You can get the test build below, but I WARN YOU: this is just a quick solution, controls are sloppy, D-Pad is invisible (lower left of your screen) and It might not run on every device. If you’re still interested, link is below, let me know how it runs.
Right now GrayScale is available to play in Web (Flash player), Windows and Linux. It’s going to land on Android Market and possibly other platforms eventually. I don’t really have any Apple device right now but I might get them someday. Building cross-platform games with HaxeFlixel is really easy.
I’ve already published source code for this game so you can follow my progress or even remix GrayScale in your own fashion. Get it on Github.
Game will remain completely FREE on every platform and I’m not going to smash advertisement on it. I don’t want to put any price on my “first game ever”, this way (hopefully) more people could discover GrayScale. Besides I don’t know if I can legally sell anything like that in my country without having company – but that doesn’t matter now anyway.
In GBJam we’re creating GameBoy themed games. Only 4 colors and 160×144 resolution. This is the first jam I’m attending to so I’m really excited Anyway, here’s some early action GIF, there are still some things to do. Like, some enemies, more levels and little fixes. Follow my progress on GameJolt and twitter @Zielakpl. I’m going to post updates there more often then here.