game design, code, writing, art and music

English По-русски

New UI, physics engine, particle system and music

It's been a long time since my last post, but there's actually been quite a bit of progress on my unnamed action adventure game. I've been posting small updates on Twitter regularly, and it's time to summarize all those changes into one blog post.

New UI

I have a vague concept of a slick fantasy-ish aesthetic for my game in my head, which I used to re-skin the existing user interface. Buttons, dropdowns and other elements now look like this:

New physics engine

YUME Engine (Generation 2, as I like to call it) has a new physics and collision detection system! Just like in Speebot, the engine uses swept AABB collision detection, which is both fast and accurate.

The difference is a new collision event listening system. Speebot had pretty simple rules for collision, as most of them only concerned the player character interacting with the world. In other words, I had to detect events when Speebot collided with the terrain, enemies, particles or power ups. Because of this simplicity I would just store all entities of a certain type (e.g. enemies) in an array and check for collision with the one player character entity each frame. Almost every entity could only collide with the player, and that's it. The notable exceptions are particles and moving enemies, which can also bump into the map terrain.

In the new game I expect things to get a lot more complex, so I had to provide a way for any separate entity to listen and respond to collision with any other single entity or group of entities. I introduced some specialized "tags", such as DynamicMovingPhysicsEntity and DynamicObstaclePhysicsEntity, which are used to describe an entity. If needed, a single entity can be both a moving entity and an obstacle to other moving entities at the same time. There is also support for arbitrary collision groups for handling collision between, say, friendly companion entities and enemy traps.

The way it's implemented, each Entity subclass (e.g. a destructible crate entity) can register itself for collision with specific entity groups (e.g. player, companions and enemies that can bump into and jump onto the crate) and particles (e.g. bullets that can destroy the crate), and the engine handles the rest.

This way I can program interaction between entities of the game world more easily and freely, and be sure that the game will only check collision between entities that require it.

New particle system

The particle system has also been rewritten.

In Speebot each particle group (white smoke, pink smoke, etc.) was drawn separately, because each particle was represented by a separate texture. Now all particle types are drawn in a single draw call, because only one texture atlas is used. This speeds things up a bit and solves some Z-buffering issues.

Separate particle groups can now be registered to participate in the collision detection, same as entities. The big advantage is that all the bullets in the game can interact with the world just as if they were entities, but since they're technically particles - all bullets can be drawn in a single draw call. This improves performance.

Also, animated particles are now a thing!

Journal, Inventory and System menu screens

The game's pause menu now contains 3 tabs - Journal, Inventory and System. The first two are not yet functional, but the layout is almost done.

Music

I've made a few tracks in SunVox for the future game. Here's one of them.

Oh, and I've also redesigned this website. Do you like it?

Next Article

Designing a custom scripting language for my game engine

Subscribe

Receive a notification on your device whenever there's a new blog post available, in order to:

Follow the development process of my next game.

Get notified of articles about the art and tech of designing games and engines.

Receive updates about changes to my games.

Subscription is free and takes just one click!