Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 27 Nov 2013
Offline Last Active Today, 10:08 AM

Posts I've Made

In Topic: DirectXTK Audio not work

13 May 2015 - 08:04 AM

From my DirectXTK experience, the error "abort() has been called", usually means you haven't included this bit of code

m_audEngine.reset(new AudioEngine(eflags));

before working with your AudioEngine object.






edit: didn't read that it was the official sample that wasn't working... odd it works for me.

In Topic: Adding non ECS features in an ECS engine (tilemap)?

09 May 2015 - 06:38 AM

Thanks for the discussion guys, took me a while to get my head around these replies hence the late post...


Your post makes a lot of sense, thanks for taking the time to write that.

"So, question is to which layer(s) do Game::render and RenderSystem::update belong to?"
Game::render() is called from game::run() so yes I guess it is the top level of rendering.

"If "sprite" is your graphic primitive of choice for both ground and entities, then you will have a ground renderer and an entity renderer in the end, the first using a ground representation as input and the latter using game objects as input, and both yielding in sprites as output."

I think this is where I am confused.

I don't fully understand how Game::render works on scene objects (are objects things in game that *Do* stuff eg my player spaceship and enemy ship..?) Is the way I currently have it? Where by it calls m_systemManager.update<RenderSystem>(frameTime) correct..?

"It may iterate all drawables in the scene and invoke their render() method. That render() methods will be the second layer of rendering and perhaps already output the sprite primitives."
Can you give me an example of what you mean by this?

"and RenderSystem::update(time) should not exists as such."

Thanks I have removed that. I understand that the logic updates need a delay time to work out the correct movements, but for some reason thought the renderer did it, but I forgot that the game engine will be kept at my chosen fps, and therefore it will not matter if I pass in the time.


Are you saying basically label nothing as an actual entity, but just use components and systems to do the work? In this case I can't understand how to get the data into systems? Because so far I only understand the method of "for (entityx::Entity entity : entities.entities_with_components(component1,component2,etc))" for actually getting the entity data into systems...

@L. Spiro

I understand what you're saying and agree. If I had read that post before going down this route I would have stuck with how I was doing it, but I have spent months getting this working and now I feel if I turn back it does me more harm than good... either way I have learnt a lot so I feel it was not entirely a waste.

haha thanks

So rather than my old engine where a TILE was essentially a sprite that had a tile.draw() function, I will pass the data to a renderer that has something like drawTile(tile[1][2])? The other thing I am a bit stuck with was in the old approach I would put the tiles where they need to go using tile.setX(), tile.setY(), which updated the underlying spriteData structure which was sent to directXTK to draw. This way, if tiles are plain old data, how do I specify these additional needs, such as tile position X and Y.

Thanks all

In Topic: Adding non ECS features in an ECS engine (tilemap)?

03 May 2015 - 02:35 AM

Why do you need to use ECS to accomplish your goal (a game)?

Why does every class member start with “m_” except the “graphics” class member?  What kind of sloppiness is this?



L. Spiro



I love your posts Spiro. They are always incredibly helpful, but also strike the fear of god into me...


Why do you need to use ECS to accomplish your goal (a game)?


To be honest I am not good enough at C++ to know what I do or do not need... but when I was working with my original OOP game and wanted to start adding in enemies with different guns and shields and all sorts of fancy ideas in my head, posts that I found (not just on gamedev) kept saying ECS this ECS this ECS this so I wanted to see what the fuss is about and give it a go.


Why does every class member start with “m_” except the “graphics” class member?  What kind of sloppiness is this?


Well spotted, I did not even realize that lol.. I do not really want to use the m_ prefix at all. But I found when I was initializing objects in their constructor using initialized lists, I kept getting confused about the private member I was trying to initialize, and the passed in variable or object I was initializing it with... so I say in my head (m_ goes Outside the brackets...)


In Topic: What is this stuff called in c++

30 April 2015 - 02:24 AM



Yes it is similar to that. Its going to take me quite some time to understand what is going on there though. I need really basic examples that literally just do operations on numbers to make the link to an actual engines implementation.




Thanks a lot for your comprehensive explanation. Definitely clears a lot up for me better than what readings I could find on the net. I understand only what of templates was covered in the C++ book I read (Starting Out with C++ from Control Structures to Objects). I will revise that chapter to clue up on them again since the key things here seem to be templates.


Unless I'm mistaken, EntityX uses the CRTP in this case to generate a unique TypeID for the derived system. This is possible since by inheriting from Receiver<Game>, the compiler generates a seperate template instantiation. Somewhere inside the code, there is a static variable that is incremented every time a certain GetID()-function is called, but only once for every different instantation. Looks like this implementationwise:


Yes it does seem to be doing something like that when I step into the code. Now for once I actually have a clue as to what use the CRTP is.

Reading through the rest of your post while looking at the source code gives me a lot of help so thanks again.




That's the kind of key words I am looking for. Thanks.




It is primarily the strange looking code that I have not seen in my book before, combined with not knowing what this stuff is CALLED that I was struggling with. Your psot gave me a lot of what I needed too.


Thanks everyone I have learnt a lot, and have a lot of reading to do now on these new keywords.

In Topic: Dx11, directxmath and d3dx

25 April 2015 - 11:57 AM

And if you're going to use directXTK, you can also use SimpleMath which wraps DirectXMath