Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 May 2013
Offline Last Active Oct 13 2016 02:29 PM

#5264005 Draw 2D empty and filled circle

Posted by on 28 November 2015 - 02:04 PM

Well cosine and sine are you best friends when it comes to rendering circles. 

cosine of an angle equals the x- and sine of an angle equals the y-coordinate. 


Of course you can't generate a "perfect circle". It will always have edges. If you have more vertices the circle will look less angular and vice versa.

I hope this enough of a hint.


#5248489 C++ | Storing different types in a unordered_map

Posted by on 24 August 2015 - 05:33 AM

Thanks @ServantOfTheLord,

but I think I've got you wrong at some point.


I am not going to store every component in one array. Instead I wanted to 

have an dictionary of vectors. Every vector belongs to exactly one component type

as they're indexed by the component id.


Is there actually a reference for creating an ECS that is data oriented?

"Anax" & "EntityX" aren't or probably not sure. I'll give it one more look for sure.

Thanks to everybody who replied ;)

#5248431 C++ | Storing different types in a unordered_map

Posted by on 23 August 2015 - 05:14 PM


for my current project I need a fast data-oriented yet flexible entity component system which integrates good with my build system (Qt Build Suite, CMake's syntax gives me cancer).

I looked for some projects, came across "EntityX" and "Anax" and few more, but none was easy to integrate into my project. 


So I had to implement my own one. I thought it won't be as hard as it appears now.


My naiv approach was to create an "std::unordered_map" with an RTTI-ID as key and an "std::vector<IBaseComponent>" as a value.


Well, today I learned the principle of "object slicing".


So, how do I go about this?

I want my "Scene" class (aka "World" in some implementations) to hold every component in a contiguous memory block.

How do I go about this?

P.S: Are there any baseclasses for a "std::vector" ? :)

#5062093 Voxel-Engine | OpenGL + C++

Posted by on 15 May 2013 - 01:05 PM

Well, some nice discussion, but I want to hold it short:


Thank you all for answering, even it's not all about voxel terrain generation ^^

It's knowledge, thought, and anything you know is good.


Unbirds link seems very interesting to me, I need to take time to read it  :)



Thanks Techie,