Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (636)
Games in Android Showcase (178)
games submitted by our members
Games in WIP (688)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Efficient entity system?  (Read 3410 times)
0 Members and 1 Guest are viewing this topic.
Offline SkyAphid
« Posted 2012-05-17 03:30:52 »

I'm remodeling my entity engine. My old one was just an ArrayList of entity inheriting objects, but it got real messy, real fast.

How do you guys go about it?

I saw something about hierarchies on the interwebz but I don't know how they work or what they are for :p

Give me long detailed opinions! Thank you Smiley

it just werks
Offline ReBirth
« Reply #1 - Posted 2012-05-17 04:19:13 »

My entity system even varies between projects :O

Offline theagentd

« JGO Bitwise Duke »

Medals: 597
Projects: 4
Exp: 8 years

« Reply #2 - Posted 2012-05-17 04:31:42 »

I usually don't even get that far. xd I'm using Artemis for one of my projects and that's working really well for me. Its site seems to be down though...

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline lhkbob

JGO Knight

Medals: 32

« Reply #3 - Posted 2012-05-17 05:08:40 »

I use this one:

It has a little more overhead as far as defining components, but it scales better and is more performant.

Offline Danny02
« Reply #4 - Posted 2012-05-17 16:43:50 »

cause performance should not matter that much for an entity system I prefer a less verbose and bloated system then entreri.
I took a look at the sources and it was just to much of configuration and setup.

One should perhaps write an entity system in an own DSL with scala, because I think one could come up with a lot of syntax sugar and it is then also easily integratable to the other game code in java
Offline Eli Delventhal

JGO Kernel

Medals: 42
Projects: 11
Exp: 10 years

Game Engineer

« Reply #5 - Posted 2012-05-18 17:33:40 »

I mostly use component systems these days.

See my work:
OTC Software
Offline matheus23

JGO Kernel

Medals: 123
Projects: 3

You think about my Avatar right now!

« Reply #6 - Posted 2012-05-18 17:38:20 »

I mostly use component systems these days.

Could you please explain, what that is? Cheesy I'm intrested...

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline iamtommo

Senior Newbie

« Reply #7 - Posted 2012-06-15 17:04:33 »

As opposed to an entity system which forces you to branch of entities which could have similar properties, a component based entity system allows an entity to implements certain functionality instead of everything above in the hierarchichal ladder.

for example a monster could implement this functionality: attackable, interactable, living.
instead of just branching down through: entity>living>attackable>monster etcetera.
Offline Roquen
« Reply #8 - Posted 2012-06-15 17:13:05 »

Component based is one composition design model of which there are as many as you're brain can come up which has become a fad.
Offline actual

JGO Coder

Medals: 25

« Reply #9 - Posted 2012-06-15 19:00:18 »

There's been a fair bit of discussion of the Component model on these boards, most of it negative. Although I had a lot of initial enthusiasm for them early on, the more I worked with them the less that I had. Although there are many flavors of Component systems most involve a system where you have a GameEntity which has no functionality other than to add/remove components. All  Entity behavior resides in Components which can be dynamically added/removed as the game runs.

My main issues are that this provides far, far more flexibility than I need (and that most hobby game devs need I suspect). This flexibility requires more complexity and makes things more difficult to reason about.

An approach I prefer is just have entity behavior within in entity specific classes (FighterJet, Missile, etc) and to use the Strategy Pattern for cases where I have related and/or shared functionality.

You are giving up some of the "dynamicity" of the E/C model (which I don't need any how) while still getting the benefits of a favoring aggregation over inheritance while working with a simpler set of code over all.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline sproingie

JGO Kernel

Medals: 202

« Reply #10 - Posted 2012-06-15 23:43:46 »

It's worth noting the difference between "component-based programming", which is simply composition within in an otherwise static object model, and "component systems" which assemble components at runtime.  Unless you're writing some kind of engine, you probably don't need to even consider the latter.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Dwinin (75 views)
2015-11-07 13:29:08

Rems19 (81 views)
2015-10-31 01:36:56

Rems19 (80 views)
2015-10-31 01:32:37

williamwoles (107 views)
2015-10-23 10:42:59

williamwoles (93 views)
2015-10-23 10:42:45

Jervac_ (112 views)
2015-10-18 23:29:12

DarkCart (137 views)
2015-10-16 00:58:11

KaiHH (118 views)
2015-10-11 14:10:14

KaiHH (158 views)
2015-10-11 13:26:18

BurntPizza (173 views)
2015-10-08 03:11:46
Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48

Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11 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!