Git Product home page Git Product logo

Comments (3)

sriharshachilakapati avatar sriharshachilakapati commented on June 21, 2024

I do have this in my plans, like implementing an extension mechanism. Some of my plans are to implement Box2D and Bullet3D extensions to enable physics based games. This is a great idea.

However, I do think that entity and scene system is an essential component. Any game (even card games for example) needs entities, and scenes are like levels. Do you have anything against it or want to implement one yourself? In that case, please create a specific issue on the entity and scene system.

from silenceengine.

Darkhax avatar Darkhax commented on June 21, 2024

The reason why I feel said systems should be optional, is that they don't work in ways that are beneficial to every game. Rather than forcing the extra dead weight for those games, you could just uncheck the box in the creator and not have them included.

from silenceengine.

sriharshachilakapati avatar sriharshachilakapati commented on June 21, 2024

This is now done, I've added a method SilenceEngine.runOnInit() which takes callbacks and runs them in the order of addition after the engine has been initialized.

This method adds a callback to be run after the engine is initialized. There can be many callbacks added via this method, and it is guaranteed that they will be called in the order they are added.

SilenceEngine.runOnInit((next) ->
{
    // Do the task here. After the task is done, invoke next,
    // which tells SilenceEngine that this is done successfully
    // and SilenceEngine can call the next on-init callback

    next.invoke();
});

Note that this only works if called before the platform specific Runtime is started. To make sure these gets called always, keep the calls to this method in the class initializer or the game's constructor.

Placing these calls in the static constructor will not work on Android, since the activity might not be destroyed from previous run and can cause issues.

I still think that entity and scene system needs to be in the core, and that is how everything (rendering and collision systems) are designed to work with. They are even the same for the card-like games and also dynamic games.

The tiled map package will be moved into a separate extension of course, in the next scheduled release.

from silenceengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.