Errors related to physx3_x86.dll can arise for a few different different reasons. For instance, a faulty application, physx3_x86.dll has been deleted or misplaced, corrupted by malicious software present on your PC or a damaged Windows registry.
In the vast majority of cases, the solution is to properly reinstall physx3_x86.dll on your PC, to the Windows system folder. Alternatively, some programs, notably PC games, require that the DLL file is placed in the game/application installation folder.
Unity's recent controversy sparked a heated debate on game engines. Some said that everyone should immediately switch to a new engine, while others replied that switching engines can take months if not years. Some said that the best way is to roll your own game engine, to what others noted that this isn't a simple task. And, you know, everyone is right here: there's no single answer, everything depends on a specific case. But maybe writing your own engine isn't as hard as it sounds? Why would one do that anyway? What does it even mean to make a game engine?
I've never actually worked with any game engine except my own pet engine, which I've been slowly expanding for 3 years by now (it's about 100k LOC already) and successfully used it for over a dozen jam games and one releaased commercial game. However, I've seen people use other engines; I've seen people complain about other engines; I've seen people talk about their own engines; I've studied the source code of other (open-source) engines. So, I believe I have a few things to say on the matter, though, admittedly, my experience might be somewhat biased or unconventional.
Let's start with the elephant in the room. This has been discussed over and over, but it doesn't hurt to discuss it one more time. Here are a few reasons why you would ever make a game engine of your own:
For me personally, the last two points are the most important. First of all, learning is fun, and if you don't think so, you better begin: if you want to make games, you'll have to learn a lot anyway, so better start enjoying the process!
But now it is, now you're making your own engine. Suddenly, there is no frustration: you know exactly why the engine lacks a certain feature that you now need. You didn't implement it, simple as that. Why didn't you? Well, obviously you were busy with other things! You're making a whole game engine alone or in a small team, it is understandable that the engine lacks support some stuff. It is expected, even. You'll implement the feature when it's really needed. Of course you will. Just, probably, not right now. There are other things.
So, should you make a game engine? You tell me! If you want to make a game as quickly as possible, just pick an existing engine and be happy. If you want to grow as a game developer, secure your future projects, and you have all the time in the world, then make a game engine! In any other case, you'll have to decide for yourself instead of relying on an stranger from the internet :)
Good question! Is SDL2 a game engine? I'd say it isn't, it's really a platform abstraction library. Is OpenGL a game engine? Of course not, it is a low-level graphics API. Is stb_image a game engine? Certainly not, it is an image loading library.
So what is a game engine, what differentiates it from other libraries or APIs? Is it the combination of graphics, animation and user input? Well, one dear friend of mine was quite successful in making text-based games that run in terminal, which obviously lack any graphics or animation, yet they are perfectly valid games. So, anything with a user input is a game engine? For instance, is a calculator a game? Ugh, well, probably not, unless you're bored to death.
I propose the following definition: a game engine is any set of tools, libraries, and other stuff that is designed to help you make games. If you feel like this definition is incomprehensibly vague almost to the point of being completely useless, that's because it is. It is, but that's the whole point.
Look, if you're making a retro-style 2D pixel-art platformer, do you really need complex material graphs, continuous level of detail for geometry, global illumination, advanced UI, full-fledged 3D physics integrated with inverse kinematics, multiplayer support, etc, etc, etc...? You don't. The only things you'd need are handling user input, showing images on the screen, and probably some audio. That's about 2 to 30 days of work, depending on your experience and stubbornness. In any case that will be only 1% of your work; the other 99% are making the actual goddamn game.
But what if you want to make the next AAA hit with top notch graphics, physics, and whatnot? Well, then you need all those numerous complex features. The other thing you need is at least 5 spare years of your life to work full-time on your engine to implement all that stuff.
Okay, my definition of a game engine exists mostly to convince you that engines can be small. Let's be realistic, though: there are things that are expected from most big enough game engines, unless they are extremely minimalistic or specialized by design (which is a completely normal thing!). To name a few:
Strictly speaking, conventional programming isn't required for game logic. Visual scripting has been around for decades, and enables one to implement complex logic without writing any code at all.
Some people confronted me with strong opinions that visual scripting is also a type of programming. And, well, surely it is! Also drawing black and white squares, as well as doing simple arithmetics on large numbers are also types of programming. That's really not the point here.
However, supporting visual scripting in your engine requires writing specialized tools, which noticeably complicates the engine development. And, in my opinion, code is still the most general and versatile way to implement any type of logic.
You might also get away with supporting scripting in some language other than what the engine is written in (e.g. a C++ engine with Lua scripting and no direct C++ interface), but if you're already writing an engine, it's probably easier to simply provide a native API (i.e. in the language the engine itself is written with).
However, writing an engine still requires programming, no shortcuts here. So, which language is the best for writing engines? Honestly, it doesn't matter much, just pick any language you like. I'm using C++ because I've been using it for a decade and a half, it is a language I know the best, the language I love and feel comfortable with. If you are C++-allergic, pick Rust, or C#, or Python, or Haskell, or Java, or whatever. Seriously, it doesn't matter.
At some point you might need performance-critical code, and most languages have their ways of achieving that. Languages that are closer to the metal (like C++ or Rust) are typically more transparent regarding performance, but, again, you can do it in any language.
In my (probably not very popular) opinion, the best way to present an engine is as a programming library: something you include in your game project as a dependency, and use it as you wish. This will probably mean you need some build system support; though, depending on the size and complexity of your engine, you might get away with just some makefiles.
Let's say you've made a stub (empty) engine in a form of a C++ library, providing the engine's API in header files, and having some code that implements that API. You package it as a CMake project, or maybe supply a few makefiles, or maybe just supply the whole source code, expecting the engine's user to just add all the source files in the game project. What's next?
Most games need a window to run in. Even web games aren't an exception: the window may be the whole web page, or a certain canvas element the game is running in, etc. Probably the only exception are terminal-based games which use the terminal for all input and output (e.g. std::cin/cout in C++).
Creating a window is usually done via platform-specific means, like for example using the CreateWindowEx function from WinAPI. These plaftorm-specific interfaces are typically quite ugly and non-beginner-friendly, and you'll have to re-write the window creation code separately for each platform you're planning to support. Though, in most cases you also need a few extra things from the window, like a graphics API context, which is also created using ugly platform-specific interfaces.
Thankfully, there are libraries that do all this for you. In C++, you can use SDL2, glfw, sfml, or one of the many thousands of similar libraries. Just add them to your project, call the corresponding createWindow() function and you're done. Any other language has similar libraries or even built-in tools for doing that.
How exactly you expose a window in your engine's API is completely up to you and your programming taste. Maybe you'd have an engine::init() function that creates a window and stores it in a global variable. Maybe you'd have an explicit engine::createWindow() function that returns some object representing the window and allows further operations on it. Maybe you'd have a base engine::window class that the engine's user has to subclass. The possibilities are numerous, and, for most part, they don't matter much.
This while (gameIsRunning) loop is the core game loop. It is what makes your game run, what adds the time dimension to your game. Without it, the main function would simply return and the game would close.
Again, there are many possibilities in exposing the loop in the engine's API. It may be completely explicit, i.e. the engine's user writes while (engine::isRunning()) somewhere in their main function. It may be hidden inside the engine, e.g. in some engine::run() function, which in turn calls some functions that the user provides. Maybe the user subclasses an engine::application class and has to override some application.update() method that gets called from the application.run() method.
b37509886e