Tag Info

New answers tagged

0

I have written a few game engines, and I can tell you with reasonable certainty that this is a question you will be unlikely to be found on books. Editors are very closely related to their respective game engines, so I would say that editors will hardly follow a one-fits-all approach. If you are interested in writing your own engines with your own editors, ...


1

We use a component class with optional interfaces for IUpdatable and IRenderable that tie into the scene container which handles the component life cycle (when the game engine core says "time to render", the scene container updates all the updatable components, then renders all the renderables). Since we construct lists of updatable and renderable components ...


0

I'm not too sure if I understand the question correctly so forgive me if my answer if off, but this is how I would go about a turn-based event system. Firstly, the actions that are represented by strings and ids can be converted into something more object-oriented which would be something like: public abstract class Action { public abstract void ...


0

ouch ! ... eventing is normally pub sub ... I say "this happened" and you as a handler go "ok now i need to do ..." this presumably is like some sort of action list system in which case I would implement it as such. Does java have lambdas yet? I would have somehting like this in c# ... class EventManager { List<Action> actions; void ...


1

You can run your Python script using a spawn or fork-exec command and have the two programs running simultaneously, it will be invisible to the user. Or you can use a simpler exec command which will pause your main program while running the Python script. The exact name, implementation and functionality of both these options depend on the programming ...


0

There are a lot of specifics that make networked gameplay much harder to debug, but in very very general terms it comes down to 2 basic points: Error can arise from a much greater set of potential sources than client-only gameplay. It's hard to insert debug tools into live instances, especially when huge volumes of data are being manipulated. Usually ...


0

I think that a entity would register a listener with whatever was firing the events that entity wanted (much the way you register event listeners to swing components). The entity that was firing events would just make a ArrayList or similar of all the listeners registered to it and whenever it wanted to fire events, it would just iterate through the list ...


0

With just a couple of slight rearrangements, you could have: float a = (transform.position.x - Camera.main.transform.position.x) * Main.scale; float b = (transform.position.y - Camera.main.transform.position.y) * Main.scale; onscreen = a > -width && a < GameView.width && b > -height && b < GameView.height; It will ...


1

Keep an "on-screen tiles" collection that you update each time the camera moves and each tile has a reference to the objects in it. This was you only need to update the objects referenced by the tiles that are on screen (or just outside).



Top 50 recent answers are included