All posts tagged GameMaker Studio 2

Refining Collisions

Martin · 2 years

Up until recently, my nodes simulation had all the nodes colliding with each other with the same force, and each reacting the same way, regardless of size. I've tweaked that a bit now, so a node's size matters when it collides, and so the larger nodes can bully their way around (to some extent) while the smaller ones flit about in between.

It's a little hard to make out in this short GIF, but that's what's happening. Feeling pretty good about these changes!

Oh, and the nodes all look like single-celled organisms now.

553 93 0

Background Tiles

Martin · 2 years

I'm always on the fence as to whether or not I should use tile sets for my GameMaker game backgrounds, or if I should just use the objects which draw the background elements to do it instead.

I don't have pictures to share yet, but in my current project, I have a set of images that frame the edge of the play area. They are made up largely to look like natural rock formations, and so it'd be best if they aren't symmetrical left to right.

These graphics are the only part of the game that could realistically utilize tile sets, but I'm stuck as to whether or not I want to put the effort in to convert them to tiles. This scene will never change in the game, and there won't be multiple rooms that use the same tile set - it'll be once and done.

Still, having them as a tile set will make it much easier for me to make sure the patterns in the edge aren't repeated from one side to the other. And I will then let GameMaker handle whether or not to draw them, as opposed to either always drawing them, regardless of whether or not they're in the camera's frame, or rolling my own code to check. And then, on the off chance that I do end up needing to tile another room, I'll have them ready. Hmmm.

Well, I'll return to this soon I suppose. My dev time is just about up for the night, and there's a new season of The Great British Baking Show premiering on Netflix today. TV awaits!

445 80 0

Optimization Allure

Martin · 2 years

Whenever I'm working on a programming project, I often get caught up in little optimization routines as I go. It's hard for me to just code things to work, and worry about making them work good later.

So today, I wrote some improvements to the way my game project renders stuff. Nothing too fancy - just some checks to make sure objects are within the camera view before rendering - but it felt good to test it and see that small bump in frames per second go up.

I'm hoping that as I remove more of the debugging code, much of which is very slow primitive drawing, I'll see another improvement as well. But I need to stay disciplined and just keep working on the actual game!

558 83 0

Progress Screenshot

Martin · 2 years

Just a quick progress screenshot, showing some minor improvements to this thing.

Now each node draws a line to where it is trying to go, and though you can't see it in the still shot, they all turn much more smoothly towards their goal as they make their way there.

I'm working on finalizing most of the attributes each node will have, as well as how much each can vary to make a node unique. More soon!

526 83 0

Bumpity bump

Martin · 2 years

I've spent some time working on these colliding nodes some more, and they are better now.

I've tweaked some of the collision variables so that the bumps aren't as harsh, and made them more prone to being pushed around a bit by others.

Each node is a simple state machine right now, where one state is idle (the node appears orange) and the other is actively moving towards a randomly chosen target (the red dots, which are unique to each node).

Oh, and the nodes can bump up against the water surface now too, and leave a little ripple!

526 89 0

Node Collisions

Martin · 2 years

Here's another snapshot of the project I'm working on. So far, this is working about as I want - though I left it running for a while just to see what happens, and came back to a massively dropped framerate, so I'm assuming there's something wrong with it.

I'll have to test it more tomorrow, I guess!

612 83 0

Shader Sunrise

Martin · 2 years

I've been digging into the actual game-y parts of this project lately... in my notebook.

In the meantime, I've been working on improving my shader skills, and have employed a few of them in the existing parts of this project, which means - you guessed it - another update to my background imagery.

You can't really tell from the GIF, but I'm employing a shader to blur the entire background, since it's not meant to interfere much with the water, which is where the game takes place.

I've also re-worked the clouds once more, adjusting the way the blending works (which is still a procedural surface, created from a few layers of cloud noise adding/multiplying), so it now relies on a shader to blend the alpha, which gives me more control over the thickness and edge definition.

I'd like to add some more functionality to that later, so I can change the cloud coverage on the fly, and maybe add some sort of fakey depth effect. We'll see.

One final note: the speed changes in the simulation shown in the GIF are being done in-game, and not as a post edit. I added a debug button that, when pressed, speeds up virtually everything in the game (save for a few un-pictured elements). I might leave that in as a feature, if it proves useful (and practical to keep) in the final game.

623 88 0

Shaders In GameMaker Studio 2

Martin · 2 years

I'm pretty good at creating shaders in Blender, and I've made a few decent things in Unreal Engine as well. In GameMaker, shaders remain elusive. Why?

Well, Blender and Unreal both have intuitive methods for creating shaders. Blender has a node-based system where you connect different pieces of the shader program together and, based on how you do it, different effects are achieved. Unreal is similar, with a system called Blueprint.

GameMaker Studio 2, on the other hand, has none of this. If you want to create shaders in GameMaker, you have to either code them by hand, or find one that someone else has coded, and tailor it to fit your project. This can become especially difficult if you're not very familiar with GLSL, or you're trying to work from an example that was made with a different platform in mind.

I appreciate that it makes me think a bit more about what I'm doing on those other systems, and how to accomplish the things I take for granted elsewhere. I'm not very good at it yet, though!

858 79 0

Day & Night 2

Martin · 2 years

After a couple of days goofing around with this, I think it's in a pretty decent place. It now has dynamic clouds, drawn in 3D, and a moon that has phases!

I might come back and clean things up later, but for now, this is fine. My project doesn't even have anything to do with any of this stuff, it's just for the background!