Dev Log Entry 5: Diversions

This is a dev log about creating a game called Newtius in GameMaker Studio 2 (Indie edition). Starting with entry one might make this easier to follow.

After the amazing success of dev log entry 4, I ended up going on a little diversion today.


The first diversion was starting a new GMS2 tutorial for the “Arena shooter”, GML edition. As I did for Fire Jump, I had the written version and video version in windows next to each other. I got as far as Moving around a ship and having rotate toward my house before I stopped to do something else.

Before that though, I think I’ll mention this tutorial’s way to to accept keyboard input: in the “step” event all the code is inserted:


if (keyboard_check(vk_right) ) {
	x += 4;
}
if (keyboard_check(vk_left) ) {
	x -= 4;
}
if (keyboard_check(vk_up) ) {
	y -= 4;
}
// can also do this in one line without braces
if (keyboard_check(vk_down) ) 	y += 4;

This being in the step event means this is executing every “frame” of the game and since this project was set to 60 frames per second that means these if statements are executing 60 times a second.

This seems some how inefficient. I mean I’m not sure there would be no measurable difference in a game like this little “arena shooter” demo. And it could that’s how those “key pressed” events work on the back end with GMS2 anyway. But this still seems kind of unnecessarily redundant for a check to happen that often. Seems inefficient to me. But what do I know?

On a more complimentary sort of a note, in this same step event it only takes this one line to make the sprite rotate towards the mouse:

image_angle = point_direction(x, y, mouse_x, mouse_y );

And that’s all it takes.

My skills are….sharpened…

A friend of mine is something of a both C# and .NET generally enthusiast and has tried several times to get me into it enough to learn it. I was always reluctant because it always seemed much closer to a “real” language with all its void mains and pointers and pointers to structs. Gives me anxiety just writing about it.

But he was enthusiastic enough he actually offered to buy a C# book for me called The C# Player’s Guide, 5th edition. Well the book actually showed up this morning. So I thought why not check it out and see it how it goes.

Well I don’t have much to say beyond that. I only got 40 pages in. Just enough to learn I have to install Visual Studio 2022 and that C# does in fact have comments same as every other language. Not that interesting in other words.

I decided to re-purpose a GitHub repo from 2020 since I had already started a repo for C#. If you want to see it for some reason.

Also Newtius

Also in Newtius news I changed the ship icon to something else. Slightly different ship. Will be really hard to guess (not hard to guess).

Trying to maintain attention

I have a mixed history of success with trying to learn long term things. That includes programming, soldering/electronics, Linux, virtualization, servers in general and probably other things.

This time I thought I’d try maybe shifting between topics in the hopes I don’t get “stuck in the mud” on any one thing. Thus the more openness to the C# book. I’m trying this variation approach since dedicating to one thing only like C# only or GMS2 only doesn’t seem to have worked in the past. Maybe this time I’ll stay in it a longer than I have in the past (wish me luck).


The latest version/progress of Newtius can always be found at my GitHub repo:
https://github.com/tildesarecool/newtius

2 thoughts on “Dev Log Entry 5: Diversions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s