Calin said:
You mean graphical artist skills? What are lame programmer art placeholders for?
No, i don't mean art, or anything visible in the final game.
I mean temporary debug visualizations. Temporary code we write only to visualize a certain problem which we can't understand using the traditional debugging methods.
A typical example is intersection or closest distance calculation between two geometric primitives. Box - box, sphere - box, sphere - triangle, etc. You may need this e.g. to plan obstacle avoidance for your units.
Such tests often have many special cases. It's a difference if the sphere is closest to vertex, an edge, or a face of our box. Each case requires its own code to handle it.
Thus, if you develop such test within your game, it's likely some special cases just do not happen at the moment. But it seems working, so you move on.
Three weeks later, when you have already forgotten everything about how your test works, bugs show up. So you have to work on it again, building up the forgotten knowledge again, taking a lot of time, to finally fix it.
A month later, another problem shows up, which went undetected before. Again you have to work on that damn intersection function…
Equipped with visual / interactive debugging superpowers, we can do much better:
We develop our function in isolation, independent of the game.
We make a GUI so we can move the box and sphere with sliders, editing numbers, or ideally transforming them with a gizmo. This allows us to test all special cases in seconds. It's even likely we stumble over failure cases we did not think of, while moving those sliders.
We also visualize the results in real time. A point on the sphere, a point on the box, and a line connecting them. We also have ability to rotate camera around our test model. And observing it from many perspectives, we quickly feel sure about our result to be the correct closest distance, and no shorter line should be possible.
Then we use our function in the game, and much more likely we never need to go back to it.
I hope this example makes sense.
Another one would be to visualize all the paths your path finder explores, not just the path which makes the final result. This way you can just ‘see’ how efficient or inefficient your algorithm is and how much work it does.
If we observe this visualization for each iteration of the path finder, we can also just ‘see’ HOW our algorithm works. We may have never heard about Dijkstra or A-Star, but we may understand how it works just by looking at our visualization of said algorithm. I grant you, this really is a low effort but powerful way to grasp some concepts quickly.
Also, application is not limited to geometrical problems. I often visualize data structures, e.g. graphs or trees. I may visualize pointers with an arrow. It can help to spot data errors visually very quickly, which would be impossible to find from looking just at raw numbers of the data itself, or stepping through the code with the debugger. There are many ways to make programming easier, but this one maybe is the most important. To me at least.
To visualize stuff, i can draw only 3 things: Points, lines, and triangles. I can color them, but i have no texturing or lighting. I do however have helper functions to draw arrows, circles, spheres, boxes.
Calin said:
>Let’s think of game engines like Unity or Unreal
offtopic, I have no idea what I’m going to use to draw stuff. Graphical engines in c++ are so tough to use.
Like you, i don't care about final assets or advanced rendering either. It's fine to use placeholders and boxes.
Again - i do not talk about graphics or even games. I talk about making programming easier and more efficient using visualizations and GUI to interact with the application.
Even if we have written this application ourselves, at some point we no longer know how it will behave in any situation. It may be much too complex to know all about it.
So all we can do is observing the application, to verify it behaves as intended. And to observe it, we need an interface of interaction.
Ofc. we could also write specific testing code, which verifies our app. We could create random test cases, run them 1000 times, and then we might be sure it works.
But both those options have their pros and cons, and they are not mutually exclusive. Work spend on one often enables to use the other as well.
It's offtopic, agreed. But imo it makes little sense to talk about higher level game dev concepts at this point, and i'm not the right one to talk about ‘Entities’ anyway.
Remembering your code you've showed me years ago, the code was pretty fine.
But you need to work an ability to manage a larger, growing project.
You need to split your single source file into multiple files, so you learn how to compile code from multiple files. (Maybe you already know.)
After that you're ready to include 3rd party code as well, e.g, the GUI i have proposed. There really is no reason to write this yourself - it's only for debugging.
There are many free and good open source libraries. You may use a rendering library one day. Or a physics engine, audio, network, etc.
In other words: No matter if you aim for an amateur or professional level, you need to care about some other things too, beside the actual programming problem you may currently work on.
This includes managing larger projects with many code files and eventual 3rd party libraries, and this includes general properties an application or game has, like processing input and having some GUI.
You should not postpone this, because not doing it holds you back in many ways.