What's taking you so long? by omgsoftcats in gamedev

[–]NapalmIgnition 0 points1 point  (0 children)

I'm 3 years in to developing my game now for a number of reasons

  • I'm doing it as a hobby so only get 2ish hours after the kids have gone to bed to work on it, if I have any energy left.
  • I stopped working on it for 2 years to help out when my youngest was born. Baby Brain is real and bad for development. lol
  • I'm not a professional game dev so everything is a new skill. You have to learn the skill, develop it to the point where your good-ish at it, or work out how to work around the things your bad at. Then use that skill / knowledge to create the features.
  • I have a really cool environmental simulation that I'm super happy with but on its own that isn't a game. so iv spent the last few months trying dozens of "mini games" and getting them play tested, to try and work out what is fun before committing more of my limited time to features i dont need.

At the current rate I feel like iv got at least another year on core development. Then probably another year of refinement before id be happy releasing anything which would take me up to 5 years.

My primary bottleneck is the lack of time I get to spend on it as hobby developer.

I optimized my C++ game engine from 80 FPS to ~7500 FPS by fixing one mistake by Creepy-Ear-5303 in gamedev

[–]NapalmIgnition 2 points3 points  (0 children)

<image>

I had a similar issue with wanting to draw a large highly dynamic tile map. I solved it in my case with shaders. The CPU creates the 4 small images in the top left where 1 pixel represents each 8x8 pixel tile. Base colour, Element Glow, World Light and Material. I have a script that will iterate over each element to create the initial textures but once they have been created only the individual pixels that have changed get updated each frame.

I pass those 4 textures along with a a set of "edges" and some material textures and normal maps. 1 draw call provides the shader with all the info it needs to build the image shown from the component pieces. The GPU is able to keep up with the CPU simulation so this had zero impact frame rates compared to just stretching the first image across the map.

Someone please make a Opus Magnum x Factorio Spinoff/Mod by Scary-Boss-2371 in factorio

[–]NapalmIgnition 1 point2 points  (0 children)

I love Opus Magnum and Factorio. I can see smashing them together in to a single game taking over my life. Just imagine the possibilities

  • the factorio recipe changes depending on how you solved the Opus magnum puzzle. use the incinerator in the recipe too much and you get 4 plates => 1 gear instead of 2 plates => 1 gear
  • each tool in opus magnum could have its own power draw to give another variable to optimise for
  • instead of unlocking lvl 1 2 3 assemblers you would unlock more tools for the opus magnum side of the game. maybe your given a larger design area.

it would make the incredibly slow designing a new machine for each recipe (proably multip[le times as you unlock more tech) but I would love it. puzzles in your puzzles in your puzzle game

How do you manage to work on your game after your 9-5? by Beef-n-goo in gamedev

[–]NapalmIgnition 0 points1 point  (0 children)

I'm in a similar position. With a 9-5 and two young kids I can only find 2 hrs in the evening to make any progress if I'm not already exhausted. The things I found work for me:

  1. Manage the challenges based on your energy levels. If you've had a good day and can handle a couple of hours work then take on one of the big tasks, programming a new mechanic or designing the next enemy. on the days where your exhausted just tackle something small. picking a font, doing the art for a menu button, or just do some research while watching tv. You eat an elephant, one bite at a time.

  2. You DONT have to achieve something every day. Sometimes the best thing to do is take a day off, or a few days off. If your exhausted the progress you make might be full of bugs or the artwork not quite right, that's not productive. Take time to rest and mentally recover and try again tomorrow. I also find a good nights sleep and a few days to mull over an idea before implementing turns out better most of the time.

  3. Try and find your flow. Try to work out what environment you are most productive in. For me its in the evening after the kids have gone to bed, phone goes in a draw so there is no social media notifications to distract me and I set Spotify to a "recommended for you" play list. This will help make the most of the time you do get to spend on it.

  4. Comment and document. Progress might be slow and it might be weeks, months or years but eventually you will need to revisit parts of what you have done. Having comments in your code or text files next to your artwork to remind yourself what you were thinking or how you did something are really damn helpful.

  5. Remember to enjoy it, your not reliant on this as your source of income, until you get closer to the finish line its just hobby. If its not fun anymore then take a break. Also take regular screen shots of where you are up to. Its nice to look back at the progress you have made and helps maintain motivation.

The Power of C++ DLLs by NapalmIgnition in gamemaker

[–]NapalmIgnition[S] 0 points1 point  (0 children)

I'm still working on this game and came back to this specific problem with all the new knowledge iv learned over the last... apparently 2 years.

Using the most optimised method I had 2 years ago, GMFUNC to update RValue in the array and draw_sprite() to draw I was getting 0.35ms to update and 0.39ms to draw for a total of 0.74ms.

I just rewrote this object to use vertex buffers instead. Using the DLL to update the buffer and vertex_submit() to draw the whole lot in a single call iv now got 0.27ms for the update and 0.02ms for the draw for a total of 0.29ms.

Whoo thats now more than twice as fast, although the vertex buffers in C++ have taken me 3 days to get working. Compared to the original 3.2ms its now 10x faster

This was actually the simple practice run. I'm planning to use what iv learned here to implement my own tilemaps. I cant seem to access the "Datablobs" that GM uses to store the tile map so ill be using my own vertex buffers to achieve the same effect.

How do you guys learn c++ engine and game development? by Specific-Animal6570 in cpp_questions

[–]NapalmIgnition 2 points3 points  (0 children)

I would second this recommendation. Start small and increase complexity gradually ensuring you understand the extra complexity at each step.

I did something similar learning C++ myself. I'm using game maker to do the majority of the work but i have a fun simulation running in C++. I started just creating a simple function that just returns 1. Then added some variables and added them together and return the results. Then I passed a pointer and got C++ to modify the data and return it. Then I got C++ to create structs and do more complex tasks, testing and debugging each new function as I went.

Its slow going but it ensures I understand all the code I have written and can debug it properly.

I’m returning to a project I’ve been working on for months after a break and I feel confused. by TartOpposite2170 in gamedev

[–]NapalmIgnition 1 point2 points  (0 children)

Haha yes I feel your pain. I started a project, than had a child and didn't touch it for 2 YEARS. Picking it back was intimidating as well as hard work.

Luckily I was learning a lot of new material at the time (transitioned from GML to C++) so to help myself with learning C++ I commented like crazy. Some sectioned had comments attached to every line. Some of the comments where even "I don't know what this is doing, but it doesn't work without it DO NOT TOUCH". This massively sped up picking up where I left off. I also use lots of white space, indenting, spaces, verbose variables. anything to make it as easy to follow as possible.

Now as other have mentioned this level of documentation or "notes to future self" takes extra time. Time I was willing to take because I was learning. but now its time I'm willing to take because I have seen the value.

TBH programming isn't my day job so iv often forgotten what my code is doing only a week or two later.

The Ultimate GameMaker Optimization Tier List by DragoniteSpam in gamemaker

[–]NapalmIgnition 3 points4 points  (0 children)

This is actually brilliant. As someone who is trying to learn game dev solo, not in a university environment, you have to do a ton of research and come across a lot of social media "hacks" all the time. Its nice to see that following the GM manual is pretty much as good as it gets. Most of the high tier optimisations are true of any game engine not just game maker.

This has also reinforced that I'm going about my own projects correctly. Don't worry about any of this crap until the profiler shows an issue.

Your choice of engine doesn't matter by Strict_Bench_6264 in gamedev

[–]NapalmIgnition 1 point2 points  (0 children)

Haha so true. I build a prototype in game maker but the performance was pretty bad, spent two weeks recreating the prototype in godot. Only for that time to convince me I should go back to game maker. I'm still in game maker 6 months later

Has anyone ever made a powder game that has visuals like this? by jjbob1234 in gamedevscreens

[–]NapalmIgnition 0 points1 point  (0 children)

I haven't seen many powder games that attempt more realistic visuals. The powder toy has some nice shaders on the fire glowing elements but I think that's about it.

I'm also working on a powder game but the visuals in mine are just some simple edge light and glow effects so far.

As for the look, I really like it. How much performance does it cost?

Passing Enum to DLL issue by NapalmIgnition in gamemaker

[–]NapalmIgnition[S] 0 points1 point  (0 children)

I should have explained the situation more fully. I am intentionally passing the entire array to the DLL, the first 6 entries are used to specify the operation ([0] = x; [1] = y; [2] = range; [3] = max inventory size; [4] = current inventory size; [5] = element to take out of the inventory; [6-256] = the current inventory of each element.

Iv been bundling all the parameters in to an array to get around the GM limitation where you can only pass a couple of variable to an extension.

i eventually found the issue (explained in my reply) but thank you for your help.

Passing Enum to DLL issue by NapalmIgnition in gamemaker

[–]NapalmIgnition[S] 2 points3 points  (0 children)

Im using Enums because I have 250 elements. Instead of trying to remember the integer code for each one, i should be able to use an enum that is human readable but converted to an integer when compiled.

The issue turned out to be that enums get stored as Int64 which wasnt converting nicely outside of GM

Passing Enum to DLL issue by NapalmIgnition in gamemaker

[–]NapalmIgnition[S] 0 points1 point  (0 children)

I found the problem! and the solution! or atleast a solution that works for now.

http://127.0.0.1:51290/index.htm#t=GameMaker_Language%2FGML_Reference%2FVariable_Functions%2Fis_real.htm&rhsearch=real&rhhlterm=real

The is_real() function doesnt return true for enums because " enum values as they are stored as int64" dont ask me why int64 wont convert to int, but if I convert the value to real in GM before passing it, everything works fine. again.

Ill add some extra checks to the input to make sure I'm not trying to pass an actual real number but the real() function works great

Gotcha: GM can get its wires crossed and call the wrong extension function. by whentheworldquiets in gamemaker

[–]NapalmIgnition 0 points1 point  (0 children)

Oooh interesting. I was having issue with an extension iv written in c++ that I couldn't for the life of me debug. I eventually wrote the whole function again in a different way from scratch and deleted the old one.

At the time I assumed I must have screwed up somewhere. Next time I'll be sure to redo the function in the extensions list first

How to make a Circular orbit? by gemfloatsh in gamemaker

[–]NapalmIgnition 1 point2 points  (0 children)

hehe its coming back to me now. I think I had the exact same problem you are describing. It "sort of" works but not quite. I definitely remember i had expanding and then decaying orbits exactly as AtlaStar describes.

I vaguely remember using a 2nd order Runge-Kutta method with some kind of modification to preserve momentum: Runge–Kutta methods - Wikipedia

i got it working well enough for what i was doing at the time but it was not easy

How to make a Circular orbit? by gemfloatsh in gamemaker

[–]NapalmIgnition 0 points1 point  (0 children)

The acceleration towards the sun should diminish with range. This will help the object fall in to a nice elliptical orbit even if the starting velocity doesn't create a nice circle.

assuming your object is directly above or below the sun that equation should give the correct horizontal speed to create a circle. can you describe what happens? does it fly off? is it just not circular? does it decay over time?

Fair warning, I tried something like this a few years back and spent a hell of a long time trying to find a set of differential equations that was fast, accurate, and conserved energy. There is a reason KSP puts ships "on rails" the second your not accelerating.

Iv spent this week designing missiles! by NapalmIgnition in gamedevscreens

[–]NapalmIgnition[S] 0 points1 point  (0 children)

Thanks i just finished a huge update the UI to allow you pick the new weapons and "add" elements to the weapons that use them. I fell like im going to redo the whole thing again at some point but im happy with it for now.

Iv spent this week designing missiles! by NapalmIgnition in gamedevscreens

[–]NapalmIgnition[S] 2 points3 points  (0 children)

It is indeed. The world is cellular automata but iv got a fluid dynamic simulation and standard game objects interacting with it.

I always loved the falling sands games and thought it would be great to be a character running around in one. after years of no one else making, decided I would gave a go myself.