• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Alpha_ProgDes

Entity Component System used in Web Development?

5 posts in this topic

Has any of you used ECS in web development? I know that MVC is the big thing now in web development. It's even used in games. But I wonder how would web development be done if the ECS approach was used instead of say MVC (or any other approach).

0

Share this post


Link to post
Share on other sites

I'm not sure what it would buy you and it isn't really analogous to MVC. You could probably design an MVC system with a more ECS approach as opposed to a more traditional OOP approach. What are the strengths of ECS that you would like to see applied to web development?

0

Share this post


Link to post
Share on other sites

I'm not sure what it would buy you and it isn't really analogous to MVC. You could probably design an MVC system with a more ECS approach as opposed to a more traditional OOP approach. What are the strengths of ECS that you would like to see applied to web development?

 

Well I'm still trying to figure out this whole ECS thing myself. My question is more about exploring/learning/understanding if ECS can be applied/used in web development.

0

Share this post


Link to post
Share on other sites
"ECS" is just a buzzword for the OO concept of "composition", which is a key pillar of OO.
The arguments for "ECS vs entity-hierarchy" are just obfuscated arguments for "composition vs inheritance".
0

Share this post


Link to post
Share on other sites

I dont think its that simple.

ECS seems more like a move away from OOP back into procedural/relational with splitting up data structs(components/tables) and algorithms done on whole sets of those(systems/procedures). Putting back methods into the components could then be the counter-backmove or just half-move by people hanging onto OOP.

This article series gives a good overview of this: http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/

0

Share this post


Link to post
Share on other sites
Those T-Machine posts are really good for explaining entity/component systems as used in games, but I really strongly disagree with almost everything he says about OO in the process of explaining ECS...

n.b. you can have a structure with public data that's operated on by a system in an OO design... And composition should be far more prevalent than inheritance (which should be quite rare) in OOD.

When OOP took off in games, we were all new to it, and frankly, we sucked. The popularity of ECS exploded out of the fact that we'd all written these stupid OO-inheritance based entity hierarchies, that had all sorts of downsides. Eventually, we realized this was a mistake, and after admitting that our entity-hierarchies were crap, there were two paths ahead:
1) assume this was simply because OO is crap, and move on to the next misunderstood fad.
2) go back and actually learn some OOD, while also learning ECS, DOD, etc...

The author has taken path 1. He's moved on from OOP, but never had the chance to see it used properly -- almost all of his criticisms are levelled at code that's written with an OOP language, but doesn't follow OOD rules. All of the benefits and advantages that he lists for ECS can also be achieved with well written OO code.

Also, the author should make some comparisons to the Protoype paradigm, as well as relational and OO, as many "entity template" or function-sharing-via-systems mechanisms draw a lot of inspiration from that paradigm.

As a farcical proof - ECS is often implemented within an OOP language like C++, which means its possible to reverse engineer the final code into an OO-design, which you can adapt and generalize to see how this kind of structure should exist in OO... When you do this, your ECS is basically reduced to a bloated message passing and serialization framework.

At this point, please note: OOP does not have this concept of multiple aspects; it hard-codes all the aspects into one glob, and declares that the set of behaviours and values of data to be the single-aspected Class of an Object. C++’s Multiple inheritance and Java’s Interfaces can get you a small part of the way towards the aspects of an ES, but they quickly collapse under the strain in fundamental ways that cannot be fixed within OOP.

This is what I mean - not only has he apparently never heard of the SRP, but when trying to replicate his ECS structure (based on composition), he jumps straight to inheritance in his OOP toolbox, fails, then blames OO. This is a straw man argument.

only OOP programmers want to give entities hierarchical names. It can tunr out a pretty dumb idea, if you think about it: it’s usually an implicit refusal to let go of those OOP ways we’re so used to thinking in

Again, (falsely) suggesting a strong link between OO and hierarchies.

An ES takes a system where there are many things going on that are all independent, which OOP tangles up together, and pulls them apart and lets them live on their own.

argh, no! The bad OOP entity hierarchies that we were writing a decade ago do this, but that's because we were all just ad-hoc'ing our way into OOP without bothering to really study OOD first! Good OO has all the tools to let all these independent components be small, decoupled and simple. The most important tool in the OOD toolbox turns out to be the same as in the ECS toolbox: composition.

As Greenspun said, ECS systems end up being based around an ad hoc, informally-specified, bug-ridden, slow implementation of half of SOLID ;-)
I dont actually thing ECS's are that bad, but I just hate the fact that so many people have failed to learn how to use composition and SOLID effectively in OO, but think that the answer is to learn these exact same tools in another paradigm...
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0