• 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
bubbaray97

Entity System

8 posts in this topic

So for those of you building Entity Systems out there...I have a question about design.    I think for the game I'm working on it would be a great system to use given all the "exceptions" my rules for units seem to have so being able to have componets that I can swap out would be a big benefit to me.

 

Question is though do you try to treat everything as an entity or keep the "basic stuff" (i.e. title screens, main menus, dialogs, etc) as more traditional classes.    I guess what I'm asking is do I need to make like a MenuSystem which acts on MenuComponets and be able to have a DialogComponet (which may be the only thing a given entity had).    Or not worry about that and just save the entity system for actual gameplay elements.

 

I ask because when I look at the various example out there they are all focused on the actual gameplay objects and so I wasn't sure what the "right" way to go about it might be.

 

I'm sure there is no hard and fast rule here, just trying to get an idea for best practice before I redo everything

 

Thanks all

0

Share this post


Link to post
Share on other sites

[quote name='bubbaray97' timestamp='1357247329' post='5017248']
I'm sure there is no hard and fast rule here, just trying to get an idea for best practice before I redo everything
[/quote]

 

Do whatever makes the most sense to you.  Games fit the Entity System paradigm very well, but GUI's might not, and, if that's the case, don't attempt to use Entities for your basic menu screens.

 

I personally probably would just keep the game play within the Entity framework, and keep the typical menu system out of it. 

1

Share this post


Link to post
Share on other sites
Agreed. Typically an entity is any interactable object within the game world, so if your menu system is not integrated with the game world then you're probably better off separating them according to what belongs to the simulation and what belongs to the UI. There's no real rule, though, so if it makes sense to design your UI using entities then go for it. :)
1

Share this post


Link to post
Share on other sites

Right. Do what makes sense.

 

But I wonder what benefits there would be to implementing your UI elements as entities. I would think that UI elements are not a part of the game simulation, thus wouldn't be represented by entities within that simulation.

 

As far as your question about "traditional classes," component/entity systems /are/ traditional classes. They're just a specific way of organizing your relationships between classes. In my opinion if you implement OOP in the manner intended, most of your programs will tend to look like entity component systems in that you avoid deep hierarchies, keep classes small and single-purpose, etc.

Edited by smr
1

Share this post


Link to post
Share on other sites

Thanks all.   Very in line with what I was thinking, but figured I'd check with the experts biggrin.png

 

and yes smr I know they are "traditional classes"...I ment to seperate them from the way more hierachial class setup which I guess I should have been more specific...

 

Thanks again

0

Share this post


Link to post
Share on other sites
But I wonder what benefits there would be to implementing your UI elements as entities. I would think that UI elements are not a part of the game simulation, thus wouldn't be represented by entities within that simulation.

I was thinking of some of the more unique games I've seen where the UI actually is a part of the simulation. (Gimmicky, I know, but I always thought it was cute when I saw it.)
0

Share this post


Link to post
Share on other sites

When in doubt, try to do less. Nobody needs something which is not required by the game in the works.

Multiple iterations might be the key in better understanding the problem, the requirements and thus the solution. Overengineering is a serious problem.

2

Share this post


Link to post
Share on other sites

UI's fit the lessons of the entity system quite well actually, even though they should be part of the state system in the game. The entity system comes in on the items that are on a screen as you can decompose all the actions a button should have into components which would allow you to attach these to other elements on the screen. For example a text field and a button would share a TextComponent which deals with setting the text on it.

0

Share this post


Link to post
Share on other sites

I managed to fit my UI system into my Entity system quite easily. You see all my entities are connected to a script, some entities can be visible (Player) others, invisible (Camera entity). I have my Menu Entity spawned in the world, and in it's corresponding script, I have a binded C++ function I call, something along the lines of;

 

[code]function OnLoaded() {    ShowUI("TestMenu.html");
}[/code]

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