Jump to content

  • Log In with Google      Sign In   
  • Create Account


Shael

Member Since 30 Nov 2004
Offline Last Active Jan 15 2014 09:21 PM

Topics I've Started

Multiple Inheritance vs. Composition

09 October 2012 - 12:32 AM

I'm curious to know if other developers think multiple inheritance is bad practice and if composition should be used instead or if it's a case of "the right tool for the job". The question came about as I recently started work on my entity system again and have found myself with an entity class that has grown inheriting 4 other objects - most times I've only ever needed single inheritance. In my mind this doesn't seem too bad in terms of what is being inherited but I thought I'd just see what others have to say and perhaps improve on my design/skills.

My entity class at its most basic:

class Entity : public ComponentContainer, public PropertyContainer, public Serializable, public NetworkObject
{
public:
};

Basically an entity contains a list of components and properties, can be serialized and is networked. I suppose I could use composition and have the ComponentContainer and PropertyContainer as members of an Entity instead, but I found it more practical to be able to do the following:

entity.AddComponent<MyComponent>();

The Serializable and NetworkObject objects allow the Entity to implement it's own logic for file de/serialization , etc and for network de/serialization. A Component object also inherits these objects.

GPU Terrain Physics

20 August 2012 - 11:00 PM

How can terrain physics be handled when a lot of modern terrain rendering is done via the GPU?

Normally for brute force approach and small heightmaps you could create vertices on the CPU and load them into a physics engine as a collision mesh but with GPU approaches there isn't always a 1:1 mapping of vertex data on the CPU to whats displayed on screen (eg. hardware tessellation or vertex morphing). One idea was to generate a low-medium resolution version on the CPU to form the collision mesh but I'm not sure how practical this is as it may cause visual artifacts with physics objects sinking into the terrain or perhaps even floating.

What is the modern approach to this that games like BF3 are using?

Multiple Spatial Views

15 August 2012 - 10:31 PM

I'm wondering if there is any merit in using multiple spatial algorithms for visibility determination. What do more modern game engines do? Do they have "one system to rule them all" or various systems that specialize in different types of renderables/geometry present in the engine?

Software licensing for small business

12 February 2012 - 04:23 PM

Hi

I have a small business operating out of Australia where I've mostly been doing contract work. I have a registered business with ABN. Recently I got a job to create a program for a business and am now wondering if there are any legal things I should be aware of - such as if I should be providing some kind of EULA upon installation or some other license. I notice in most installations there is some kind of license at least saying that the developers aren't liable should anything go wrong with their system, etc. Is there a common license I should be using to keep me out of trouble?

Thanks

Creating an Engine API

02 February 2012 - 09:47 PM

I'd like to know what methods others have chosen to create an API for their engine. I have a couple questions to help get the ball rolling.
  • How do you organise your engine in the file system so that you can easily generate a copy of the source files required by the end user?
  • Do you prefer to use abstract interfaces for everything or do you export full classes and use PImpl idiom to hide implementation details and reduce virtual calls?

Currently my file system is arranged so that folders represent modules of the engine. IE.

EngineName
	 -> Source
		  -> Platform
					-> .h/.cpp
		  -> IO
		  -> Gfx

However, at the moment it would be a manual process to go through each module and copy out appropriate headers into a replicate folder structure for use by the end user in their project. I'd like to find an automated way of doing this Posted Image

I've been going down the track of exporting classes and using PImpl's but this does kind of make the engine code a little ugly-er and not as straight forward so I was questioning whether to go to abstract classes at the cost of potentially having a somewhat duplicate abstract interface for everything needed by the end user and suffering from virtuals.

Your thoughts and experience?

PARTNERS