How to implements a ActorManager using orx?

edited September 2013 in General discussions
I want to know are there some good ways to implements a actors manager which manager bullets/enemy/leading actor for a classic shooter game?
It help to create the bullets for example then destroy it when it shoot the enemy or run out of bound, the same rule for enemy/leading actors when it died. This days i have learn orx in detail, it's all clock driven for all game logic, right? if so, how about using object's callback for this target? or are there good point about this feature. (Sorry for my pool English)

Comments

  • edited September 2013
    Don't worry for your English, it's fine and most of us aren't native English speakers anyway. :)

    For a classic shooter, I'd use a simple wave manager for spawning (either combining timelines and spawners or using your own logic code if those are not adapted).
    As for handling damage, the physics contact event is perfect for that. For objets going out of bound, you can also use a physics event or simply set a lifetime on your objects that would dispose of them after a certain time.

    Lastly I'd really recommend looking into Scroll, a C++ wrapper written on top of orx, as it helps a lot with object management (such as direct C++ class/config section binding) and also include a small but functional level editor.
    Using Scroll, you can handle a lot of object-oriented events directly from C++ virtual method (OnNewAnim, OnCollision, etc...).

    Faistoiplaisir started a forum thread a while ago on this topic.
    There are also other threads related to Scroll.
    Acksys wrote a couple of first tutorials about Scroll.
    You can look at a couple of game jam entries I wrote in the past, all using orx+Scroll, the code might be slightly outdated but the logic should still be valid:
    - Mushroom Stew
    - Breaktris

    I always use Scroll myself for my own projects. :)
  • edited September 2013
    I don't know how to compile the MushroomStew for linux, it seems as if it doesn't contain the premake4.lua file?
  • edited September 2013
    Yeah, Mushroom Stew was made a long time ago (over 3.5 years ago) and I wasn't using premake back then.

    I used the codelite project to compile on linux. That being said, orx and scroll have much changed since and Mushroom Stew might need some small fixes in order to compile with recent versions. :)
  • edited September 2013
    It seems Scroll is a C++ wraper. why no just use C?
  • jimjim
    edited September 2013
    C++ is lot more developer friendly for developing software and games. Its object oriented, and oop makes much sense while developing real life applications.
  • edited September 2013
    I really found C++ too complex for me to understand. I'm not sure if C will do it well?
  • jimjim
    edited September 2013
    That's true, C++ has many complex stuffs, but if you stick to basics, its not that complex.
  • edited September 2013
    The point is not about the language though, Scroll isn't just a wrapper, it's more of a thin layer bringing new features.

    Everything is exposed/explained in the links in my first answer. Faistoiplaisir tries to explains all the advantages in his forum post as well.
  • edited September 2013
    What kind of project do you keep when using Scroll?
  • edited September 2013
    I'm not sure I fully understand your question!

    I can show you the Scroll stub I currently use for my own projects if that's what you want.
  • edited September 2013
    Yes, that would be fine.
  • edited September 2013
    I'll try to post it on the orx-dev group in the coming days and I'll link it here too.
Sign In or Register to comment.