Jump to content

  • Log In with Google      Sign In   
  • Create Account

ApEk

Member Since 01 Jun 2012
Offline Last Active Yesterday, 07:02 PM

Posts I've Made

In Topic: How do you manage object pools in your engine/game?

23 September 2014 - 02:53 PM

A simple pool is much safer, but can suffer from fragmentation. It is a double linked list of memory fragments.
This produces an overhead on each memory allocation, you attach a header to each allocation. So each alloc consumes requested memory + header size bytes of memory.
When you free a block of memory, you look at the last and next blocks. If either of those is free you join this allocation to it... kind of hard to explain.


Note that the memory overhead caused by link pointers can be safely eliminated through the proper use of unions and type punning.

In Topic: std::vector of pointers

07 August 2013 - 04:27 PM

@Crusable what SyncViews says is correct and you're trying to store temporaries in a vector, but I also see something else.

Although it is harmless, you seem to be using the auto keyword in your for loop here:

	for(auto iter = m_Map.begin(); iter != m_Map.end(); ++iter){
		(*iter)->render(scrRegion, scrSize, window); //<- does not go to the function
	}

But why not go the distance, since you are already using c++11, and use a range based for loop instead of explicitly using iterators?

	for (auto tile : m_Map)
        {
		tile->render(scrRegion, scrSize, window);
	}

Isn't this the nice?


In Topic: Sparse Voxel Octree vs. Gigavoxel vs. Octree

19 February 2013 - 01:53 PM

I have no experience with implementing these structures myself, but I do read alot.

http://maverick.inria.fr/Members/Cyril.Crassin/ - for many excellent pdfs about everything you want to know

http://www.forceflow.be/category/phd/ - excellent information about sparse voxel octrees using morton encoding

 

There are many more sources of good information I have not mentioned, partly because of my memory, but you could ask on http://igad2.nhtv.nl/ompf2/.

These topics are probably more popular there and the people more knowledgeable about the latest white papers.

 

Note that ompf forums are kind of slow as of lately D:


In Topic: New c++11 video tutorials, tell me what you think.

08 February 2013 - 02:39 PM

I hope you are prepared for some constructive criticism.

 

From what I have seen so far, 8, 10 through 13, I haven't found anything from the new c++11 standard. Don't encourage the use of using namespace directives without explaining what namespaces are, what they do, and how to use them first. Consider condensing some of the material, there are videos less than three minutes and two whole videos just for loops. Note somewhere in the playlist description, in the videos, or in the first video that c++11 won't be "covered" until "lesson 23" or some point in time.


In Topic: Rand is the same every time.

08 February 2013 - 01:19 PM

FleBlanc is correct. The variable arrayChooser never changes because you only call rand() once before the loop.


PARTNERS