Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (856)
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 6110 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
« 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: 138
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

JGO Kernel

Medals: 518

« 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  

hadezbladez (703 views)
2018-11-16 13:46:03

hadezbladez (347 views)
2018-11-16 13:41:33

hadezbladez (688 views)
2018-11-16 13:35:35

hadezbladez (171 views)
2018-11-16 13:32:03

EgonOlsen (2362 views)
2018-06-10 19:43:48

EgonOlsen (2474 views)
2018-06-10 19:43:44

EgonOlsen (1463 views)
2018-06-10 19:43:20

DesertCoockie (2128 views)
2018-05-13 18:23:11

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

nelsongames (2572 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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!