Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (756)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Game Play & Game Design / Re: Game Object Component System on: 2009-09-01 03:00:30
I dig this idea but I'm confused about a few things.  The post linked to here from T=Machine mentions that the Flyweight pattern should be used for components (he said this in the context of adding functions to components but since functions are not relevant to Flyweight I assume that he meant the statement to be general).  Right below that it says "all data lives in Components; ALL data"...

So I've got a component for "Position".  It holds my Entities' 3D position.  For it to be flyweight wouldn't make sense since it updates its data to what is basically a random value constantly (creating a bunch of instances!).  Maybe he was mentioning Flyweight as only for cases where its useful?  I would not expect it to be normally useful but I might have confused the whole thing.

I'm also not sure how I could have, say, a Physics component/system, an Animation component/system and a Collision handling component/system and have them coexist safely.  I assume that individual systems need to synchronize with one another but aren't they supposed to be completely distinct?  Or is this an "as distinct as possible -- suffer through the synchronization" kind of deal.  How can three systems (potentially with order dependencies) update/utilize the same entity's position value?

( Is this similar to categories in Objective-C?  Or mix-ins in other languages?  Also see Groovy DOM-Categories : )

Finally, the analogy to RDBMS is spot-on.  I see the entity idea less as declarative-programming than procedural-programming (which undeservedly got a bad name after its popularity faded).  Of course, an OODBMS isn't usually a bad thing either.  If they work for your games needs then switching to db4o or something is smart.  I find it hard to use because of its object activation policy and I don't have serialization bottlenecks so I haven't bothered but if I did I'd switch DBMS in a heartbeat.

- Handyman
Pages: [1]
DesertCoockie (54 views)
2018-05-13 18:23:11

nelsongames (86 views)
2018-04-24 18:15:36

nelsongames (76 views)
2018-04-24 18:14:32

ivj94 (761 views)
2018-03-24 14:47:39

ivj94 (93 views)
2018-03-24 14:46:31

ivj94 (645 views)
2018-03-24 14:43:53

Solater (106 views)
2018-03-17 05:04:08

nelsongames (187 views)
2018-03-05 17:56:34

Gornova (428 views)
2018-03-02 22:15:33

buddyBro (1088 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!