Noob here, memory management query

Hi There,

I am new to the ORX world, happy to be here, I'm coming from javascript and haxe background. What attracted and gravitated me towards Orx is it's data-driven concept.

And I'm thinking about going the pure C way rather than C++. And last few weeks I've been wrestling with the C.

What worries me most than anything else is 'Memory Management'. Coming form garbage collecting scripting languages to mother of programming languages is bit intimidating.

I'm hoping Orx takes care of memory management, if not, would you learned Orx masters show me the way to how to do it.

Thanks a lot

Comments

  • Hi QualityPlay. Welcome here! Iarwain can probably give you a better overview, but from my usage, I have very rarely ever had to do any allocation of memory for any reason. Orx takes care of cleanup very nicely. I reckon take a look at some sample code projects written in Orx, to get a feel for how little you really have to code.

    I can send you some examples if you would like.

  • Hi @qualityPlay and welcome here.

    As @sausage mentioned you won't have much memory management to do for using orx, if any, however a good rule of thumb is to keep things symmetrical: if you create something with orx, you're probably going to be responsible to delete it as well.

    That being said, all the internal memory management and bookkeeping will be entirely invisible to you. Most of the time you'll only deal with object creation/deletion and that's about it. Resource management will be handled by orx, for example.

    If you have any other questions, don't hesitate!

  • Thanks guys, that's great news for me.

    @sausage, Yes, I'm defiantly like some examples.

    @iarwain, Will go through some examples code, I'm getting a feeling this won't my last post asking for help.

  • @qualityPlay Have you already had a look at the wiki?

    We've also recently started a series of video samples, the first episode can be found here:

    A second episode is in the making and should be posted very soon.

  • @iarwain, Yes, going through the wiki. Do we have any tutorial or tips on creating a parallax background.

  • @qualityPlay I should probably have mentioned to take a look at the Beginner's Guide http://orx-project.org/wiki/en/guides/beginners/main which takes you through a load of game features and not a single thought to memory management

    Also the wiki has loads of other tutorials: http://orx-project.org/wiki/en/tutorials/main

    Finally you can pick through some of my projects here:

    https://gitlab.com/users/sausagejohnson/projects

  • Haha our posts crossed over. A parallax effect tutorial is here: http://orx-project.org/wiki/en/tutorials/scrolling

  • edited July 26

    @sausage, Thanks, Will go through the docs, your projects looks great.

    @iarwain, Is it OK to expect a HTML/webGL target in near future? it's not a deal breaker by the way.

  • Ah yes, there is discussion around this. Yes we are planning to use emscripten to bring Orx to the browser.

  • Yep, we've been talking on and off about HTML5 target for at least the past 3 or 4 years, but we haven't gone much further yet.

    Personally, I don't have any real needs for it, so it's rather low on my own todo list. That being said, if someone wants to help with adding support for it (which should be much easier now that emscripten has matured), I'll be happy to lend a hand.

  • edited July 27

    @iarwain, Thanks for giving us ORX, I hope someone takes up the HTML5 target challenge.

    @sausage, Been going though Orx tools and few discussions and your 'Tiled to Orx' tool link not working...
    http://orx-project.org/wiki/_media/tutorials/community/sausage/tiledtoorx06.zip

    Also, can we get a widows installer for the @ainvar's exporter, as I don't see any instructions for windows setup.

  • Ah right. I'll get that fixed. Not sure why it's gone. I can't find it either.

  • I think we lost all the tools during the forum conversion last year. I'll have to fix this up. I'll add a job to trello and get it sorted out.

  • Thanks,

    Can all the tools work in Windows setup, do we get .exe installer or we have to use git repository.

  • edited July 29
    There are two tools that I maintain directly inside orx repository: orxcrypt, that allows encrypting/decrypting as well as merging config files, and orxfontgen, that allows bitmap font generation in orx format from ttf files.

    Other tools are all community made and receive various levels of maintenance depending if people are still around or not, unfortunately.

    We should maybe add a wiki page that lists them and in which state they are, what do you think @sausage ?
  • Yep good idea on the wiki page.

  • @qualityPlay I updated the tool and fixed the download links. You should be all good to get it now.

  • @sausage, Thank you very much.

Sign In or Register to comment.