• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By Angelic Ice
      I'm actually an intense user of Lua for scripting-related events, but there is one thing that bothers me a lot: Serialising an in action scene.
      Let's take a dialogue-system as an example. In Lua, I see these often realised via co-routines, and did that myself quite often, but it's a difficult act to serialise the exact state. I know about serialisers like Pluto, but those are not really clean solutions, a change in the Lua-version etc. and suddenly the behaviour is anything but defined. I don't think I would want to serialise the raw content of Lua's stack etc.
      This concludes to my question: How are these systems serialised?
      Using a state-machine could be one thing, but I fear that writing such code might be difficult for casual scripter that want to modify the game a bit on their own - being an inherent reason of me picking Lua, as it is simple to understand and learn.
      Any solutions to this? I would love to see implementations, prototypes, or articles of any measure. Maybe there is a different simple scripting-language that solves this better?
      Thanks for your time.
    • By Alexander Stopher
      Trying to get ideas here on how I could do this:
      I have created a game for a university coursework assignment using a custom game engine (internal to my university, but it's based on OpenGL).
      The game loads levels and menus from a file, this happens at initialization to increase performance while playing the game. At the moment the game loading time is 4.1s, but the loading time without the levels and menus is 0.961s- that's over 3s. As more levels are added the loading time will become longer and I want to add a loading screen.
      I've tried to add one, but loading the levels and menus is blocking everything else, including rendering the loading screen. This means that the loading screen doesn't appear until the game has loaded and is overridden by the main menu. The game loading is done via its update function and via calling initialization functions of the various game classes, and the loading screen is rendered within the game's render function (the rendering is done on a separate thread, according to the game engine's documentation).
      Any suggestions on how I can show the loading screen without the other loading activity blocking it from being shown?
      I know that I can use threading but am unsure how thread-safe the operation would be to init the game on another thread.
    • By zfvesoljc
      I have a particle system with the following layout:
       system / emitter / particle
      particle is driven by particle data, which contains a range of over lifetime properties, where some can be random between two values or even two curves. to maintain a smooth evaluation between two ranges, i randomize a "lerp offset" on particle init and use that value when evaluating curves. the issue is that i'm using that same offset value for all properties (10ish) and as a result i'm seeing some patterns, which i'd like to remove. The obvious way is to just add more storage for floats, but i'd like to avoid that. The other way is to generate a seed of some sort and a random table, and use that to generate 10 values, ie: start with short/integer, mask it, then renormalize to float 0-1.
      any other ideas?
    • By Garret Thomson
      Hey all,
      I just wanted to share a VS extension. It's useful for other people who are debugging multiple processes (aka server, player1, player2) with breakpoints that will break across those processes. It just puts up a (user defined sized) label in your window telling you which process the debugger dropped into. It's simple, but useful for rapid fire debugging for multiple processes to make it obvious that process you broke in. Just put some cookie text in your command lines and configure it from View -> Other Windows -> Process Hint.
      Feedback or questions welcome.
    • By dgi
      Hey all ,
      For a few days I'm trying to solve some problems with my engine's memory management.Basically what is have is a custom heap with pre allocated memory.Every block has a header and so on.I decided to leave it like that(not cache friendly) because my model is that every block will be large and I will have a pool allocators and stack allocators dealing with those blocks internally. So far so good I figure out how to place my per scene resources . There is one thing that I really don't know how to do and thats dealing with containers.What kind of allocation strategy to use here.
      If I use vector for my scene objects(entities , cameras , particle emitters .. ) I will fragment my custom heap if I do it in a standard way , adding and removing objects will cause a lot of reallocations . If I use a linked list this will not fragment the memory but it's not cache friendly.I guess if a reserve large amount of memory for those vectors it will work but then I will waste a lot memory.I was thinking for some sort of mix between a vector and a linked list , where you have block of memory that can contain lets say 40 items and if you go over that number a new one will be created and re location of the data would not be needed.There would be some cache misses but it will reduce the fragmentation.
      How you guys deal with that ? Do you just reserve a lot data ?
  • Advertisement
  • Advertisement
Sign in to follow this  

C++ DynaMix polymorphism library

Recommended Posts

There's a C++ library I'm developing and while it's not specifically targeted at games, all projects that I know of which use it are games.

It's called DynaMix. In short it allows you to compose and modify polymorphic objects at run time. This has proven to be rather useful in gameplay programming. Compared to more traditional ways to write gameplay, like scripting, it has some benefits (well, and some drawbacks).

  • It's C++ so it usually is at least a bit faster (and in the cases that I know of a lot faster) and less power consuming than scripts
  • You can reduce code complexity when you don't have a C++<->scripting language binding layer.
  • You can reuse utility code between the core and gameplay subsystems (instead of having to rewrite it in the scripting language.
  • Hotswapping is supported relatively easily achievable
  • Still, it's C++ so I guess it's a bit harder to write, and impossible to delegate to game-designers and other non-programmers

Because of this it has found a niche of sorts in mobile games, where the benefits from the performance and smaller power consumption outweigh the fact that the gameplay code is strictly programmer country (whereas desktop/console developers, might be less willing to pay this price)

The repository is here: https://github.com/iboB/dynamix

The docs are here: https://ibob.github.io/dynamix/

I have written about it before back when it used to be called Boost.Mixin. I have since rebranded it and removed the dependency on Boost. Recently I released a new version and I'm using this as an opportunity to gather more feedback and, perhaps, maybe new users.

So, any comments and questions are welcome

Edited by Bleys

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement