Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Component oriented design
08-05-2010, 03:27 PM,
#1
Component oriented design
While working on the texture, model, sound managers(caches), I've noticed that the same pattern would be applicable to other objects(car, cardynamics, ...).

Joe, what do you think about going towards a component oriented implementation?
http://cowboyprogramming.com/2007/01/05/...-heirachy/

First rough concept of the track description file given available components(transform, drawable, body, surface):

t0 = transform
t0.position = 0, 1, 0
t0.orientation = 0, 0.15, 0.15

d0 = drawable
d0.transform = t0
d0.mesh = tree.obj
d0.texture = tree.png
d0.color = 1, 1, 1 # default color(no blending)
d0.doublesided = true

To make it collidable/dynamic add a body component (body and drawable are sharing transform and mesh):

s0 = surface
s0.bumplength = 1.0
s0.bumpamlitude = 0.2
s0.treaded = 0.7
s0.nontreaded = 0.4
s0.rollresistance = 1.0

b0 = body
b0.transform = t0
b0.shape = tree.obj
b0.mass = 0 # default mass(static body)
b0.surface = s0
Reply


Messages In This Thread
Component oriented design - by NaN - 08-05-2010, 03:27 PM
[No subject] - by joevenzon_phpbb2_import3 - 08-05-2010, 11:14 PM
[No subject] - by NaN - 08-06-2010, 04:20 PM
[No subject] - by joevenzon_phpbb2_import3 - 08-08-2010, 01:44 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)