If I understand you correctly, you need a schema for your config file, another file that defines a list of all the expected fields and their types, and if necessary the structure. XML has its official schema definition file, while for JSON you may need to create one your own. Your config loader will read the schema first, and store the expected fields and types in a separate map.
When you load your config files, then comes the error handling. I would recommend raising the errors as early as possible, rather than populating it with default values that may not even work. Before it even reaches the `loadVehicleType`, KeyValues should only contain valid values, structures, and types. If you want to enforce some min-max range, I would put that check in the object's constructor, as it pertains to application logic.
So your step looks like this:
1. Load schema
2. Load config files
3. Check config files against the schema (field's existence, type checking, and structure)
4. Pass values to object constructors
5. Object validates for acceptable values.
Alternatively, you can also put range validation in the schema (step 3), if the schema supports it. Although, I wouldn't do that personally. For example, if I have a field "gravity = -2.8" in my config file, I would just accept that as is. Shit are going to be all over the place, but I am not going to dictate whether that is a good or bad thing. The solution to that problem is simply "well, don't put -2.8 for gravity".
Should I learn Unity or Unreal to the point that I can create a Pong Game and a Retro Game and then learn one of them more in depth? Or, should I learn Unity to the point where I can create any type of game such as a Shooting Game, and a Multiplayer Game and after I have mastered these, then learn the Unreal engine?
Either one of these would work. The employer will assume that you do everything wrong in your games. The reason why is that the employer has its own development process and methodologies that there is no way a junior programmer would immediately fit in or understand their process. Even if you have created a FPS, you won't create the same FPS in the company.
It's a good resume to show that you created multiple simple games. If you create one complex game, it's also a good thing. It shows that you have passion and that's a good thing to have. Don't sweat over what games to show off. Pong, pacman, tetris, failed attempts at MMORPG work just as effective.
The function GetWord() takes the tags as an argument and returns the word.
Shouldn't GetWord() return multiple words? What if there are multiple words with the same tags?
Hello: Tags: Greeting, Polite
Hi: Tags: Greeting
The 'best' way to implement this varies depending on the scope of this problem. There's already several solutions out there that can perform a map/reduce query, and that is perfect for situations like this. However, you do make this sound like a homework/exercise problem, in which using a 3rd party library/database probably wouldn't make sense, or beyond of what was being asked.
Yeah the bottom line is are you making this for yourself or other people to play.
Adding too much realism in games aren't as fun as people think. Video games are meant to be fun. So anything that prevents people from having fun, e.g. seeing their own entities get destroyed by their own projectiles, should be taken into consideration.
You could just brush that off and say that this is how you want your game. That's your choice, that's your game.
My share; also review code of others, who didn't get that feedback.
Could be a win/ win: both better synchronized overall code and learn from the other code "ways"
+1 for code review.
Code design is a personal preference. However, you are working on a team here. You are not the only one working on that code base. So, brainstorm the design/architectural choices.
Consistency, even if it's bad. It's easier to digest a consistently bad code, rather than reading a mix of good and bad practices thrown in together. For example, it is more frustrating to see code that uses snake_case_for_its_method_names with other methods in camelCase and even lptrHungarianCase mixed in together. If the code is already in Hungarian notation, even if you don't agree with it, keep it in Hungarian.
Modularity. Proper separation of controls between your classes and objects. If you are following the MVC pattern, don't put controllers stuff into your views and models. Views for rendering only, and models for that specific model-related logic only. Even though this makes your code more verbose, it will be easier to maintain.
The team lead is also partly responsible here. He or she should have established some common best practices when you start working there. I would go through this for every new team member we hire. The team lead needs to establish some process that works for the team. For example, recently we hired an engineer who likes to commit to the master branch directly, even when his commits are partially working. When you have automated build and testing going, this will flag a lot of errors for every commit. The remedy to this is to NOT remain silent and unload your frustration on the yearly review. The remedy is proper communication immediately. Establish a code review process before every commit, and make sure team members are fluent on the git protocols (resolving conflicts, branching, merging, rebasing, etc), or whatever code versioning tools you use.
Failure to establish this communication is the fault of the team lead.
If you haven't gotten too far in your engine development, you really should have a generic entity that respects the physics system. This includes all movable and collidable objects in your game. If your player can fall and stand on the ground, bump into other objects or walls, then I presume there are other objects too that share this same functionality. These objects should inherit from a common parent. This is where you put your collision code.
If you think about the sequence of steps, we can say that in order to fully instantiate this object, thread 1 needs to inform thread 2 that it has completed its part, and thread 2 needs to inform thread 3, and so on until thread N. So the chain of process is sequential that the threads must wait until the previous thread completes its job. To me, this sounds like something that you should do inside a single thread, rather than split the work into multiple threads and create unnecessary complexity.
So, I would go with the factory object idea. If you are concerned with the performance, you actually want to initialize all objects at the loading screen. Creating and destroying objects as your game/simulation is running and rendering is typically a bad idea, especially loading textures and accessing the hard drives. If you have to remove objects from the scene, you want to have a flag in your object that you can toggle on and off, rather than invoking the constructor/destructor, and have an object pool to manage inactive objects.
This way, all your objects are already fully initialized and ready to use before you enter your multi-threaded environment.
The reason why Redis is fast is not because it's a NoSQL Database, it's because it's an in-memory database. If someone implemented an in-memory, scalable SQL database, it will be fast too.
NoSQL does not have to be a KV-driven, or document-based database as people have started to commonly refer this as. There's also a graph database (e.g Neo4j). It's a bucket term for any kind of database that are not using relational tables to store its data.
What is the difference between redis and C# dictionary? Redis is a cluster of computers all dedicated to store your data in-memory, while C# dictionary only persist your data locally in one node. If you are running your code in multiple server nodes, you can start seeing a problem where some data might exist in one node, but a request tried to retrieve it from another node. That's what Redis is solving that it makes sure your data is available across the network.
You can put XML on redis since it isn't trying to format your data in anyway. Set the key to your document to any string, and the value to be your XML.
The best way to learn is just do it. It seems you have done your own research in what language and platform you want to use. Most beginners are still confused in that state.
People here can talk in length of best practices, for loops, OOP designs, etc, but without the context and experience, you won't understand why best practices are best practices. So my advice is just get your feet wet and build something.