Tag Info

Hot answers tagged

9

They're typically not even handled by the same machine, much less the same codebase. The user profile is handing by a service that deals only with users. The simulation server deals with in-game things. There may even be another session server that ties the two together. The simulation server has an ID that corresponds to each user, so its Player class ...


5

If it were me I would give each NPC agency of their own - if each one has a simple goal ( get as far as possible from Zombies/get as close as possible to humans ) that they act on, you can get quite interesting behaviours from relatively simple inputs without too much processing. The downside of this is that if you have a lot of them around you are going ...


3

I tend to subscribe to the theory that an entity is somewhat abstract and in the general sense doesn't really have much of any logic. If anything, an entity often exists as a wrapper around a complex set of systems that deliver specialized behavior based on outside factors. For example, two entities are constructed in the same way but one perhaps has an ...


2

The problems i have run into is i can't move the WorldEvent,WorldListener, or World classes into a separate package under the moniker World.my.game because of the static reference. Don't make the listener inside the World object static. A static class member means the object is shared across all instances of the type (all instances of World in this ...


2

Everything is an optimization of the 4x4 matrix when it comes to 3D math. A 3x4 is about saving memory because the last column/row for non-projection matrices is [ 0 0 0 1 ]. Pure rotational 3x3 matrices are extremely convenient because you can invert them by just transposing them. For animation and camera systems, quaternions are ideal for lots of reason, ...


2

I've researched this same issue, but for a different platform. What you're looking for is called a "sandbox." https://wiki.python.org/moin/SandboxedPython


1

It is possible to achieve this using an HTTP server since the application won't require frequent messaging. However, the problem with the HTTP is that it cannot send messages to the client unless it requests something. Therefore, you need to send regular requests to receive state updates (such as 'is it my turn', 'piece positions changed?' etc.). Also, you ...


1

If the only difference between the enemies are sprite changes and simple quantities (number of shots fired, rate of fire, etc), multiple classes would not be needed. This is exactly the sort of game Sprite-Kit was designed to make easily and quickly. Classes would be more appropriate if there was some unique behavior between the different kinds of enemy ...


1

The way I like to think about this problem is as abstracting the input. In order words, have the AI "press buttons" (not literally). It's pretty much the same as what you're suggesting, with the Entity being a fully functional puppet that can either be controlled by the player (using normal input) or by the AI (using your state machine). Modern game engines ...


1

The first decision has to come from what the gameplay requires. There are some behaviors that are going to require coordination, and will be easier and more efficient to implement in a centralized way. To look at it from a purely performance/architecture point of view, let's assume that you want individual behavior. It's unlikely that you can reuse a lot of ...


1

I think you might be overengineering, or at least abstracting too much away. While the GameEngine can certainly utilize composition in the form of services, I wouldn't treat the GameEngine as an Entity along with the rest of your game objects. If you are planning to have a 1:1 mapping of component types and services, I would definitely let each service ...



Only top voted, non community-wiki answers of a minimum length are eligible