Tag Info

New answers tagged

0

I'm having difficulty because cells can have behaviour. They can be just a tile with no behaviour; a portal which sends the player somewhere (snake or a ladder); an exit, which has no behaviour but must be coupled with an entrance for rendering purposes (so the player would know what entrance the exit belongs to). But my instinct tells ...


-1

It's best to do all of this in the GPU using the World and View matrices, not by modifying where you draw the objects on the CPU. That way, you can change the camera arbitrarily (even zoom it in and out!) and it will just magically work. You can still do view culling as well to save on draw time. And none of your code for drawing the world will have to ...


0

The simplest method is to implement a "copy" primitive. Copy the game at the root of the search and run forward using the existing machinery. Repeat.


0

What I have done in previous projects is send all Entity class members to a central event hub and send a boolean variable telling whether contact has been made or not. the Entity itself then determines what to do by the provided information


0

You need to send events around. When the you have a contact, emit an event of type "contact" with data "entity1" and "entity2". Now your system that resolves the attacks listens to events of type "contact". Therefore, it can check if one of the entities was attacking, and if yes, using what weapon. Well, you can go on from there, depending on your ...


1

Right off the bat I think your units don't need neighbours. Zones should hold neighbouring zones but I would likely add a class called a zoneEdge that contains two pointers one for each zone sharing the edge. Each zone would hold a list of edges. Walking the edges would get the neighbouring zones. When it comes to pathfinding this will really help. Zones ...


0

Why not invert the relationship with the simulation system and allow it to be a hookable option in your entity design? For example, you have a LogicComponent that essentially allows you to associate a specific script (or even a list of scripts) to a given entity. During the initialization of your logic component, it runs an init method from your script ...


0

In one word: eventloop. In more than one word: event loops allow you to have a complex runtime behaviour with multiple "simultaneous" events, timers, signals and much more without the use of more than one thread. They are used among other things in microcontrollers. The open-source GUI library called Qt5 is based on eventloops. In fact, I am pondering ...


0

Input/Output What's the idea in collecting input and outputs? Do you filter it somehow? Sort? That may be costly to do so for every frame. And disadvantage for it would be to have implement every system in two/three places: sorting/filtering inputs sorting/filtering outputs reading inputs and generating outputs (the system itself) Implementation is ...



Top 50 recent answers are included