Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Game Development Design articles  (Read 36191 times)

0 Members and 2 Guests are viewing this topic.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Game Development Design articles
« on: November 14, 2012, 08:34:25 pm »
Hey guys,

I recently decided to do some writing work on some game programming topics. The first article is finished and I'd like to show it to you guys – articles that don't get read are quite useless. :)

Further articles will follow irregularly, when there's time and I'm in the "writing mood".

Feedback is very welcome. It would be interesting to know if the article is of any real help for you and if you'd like to see more of that sort about other topics.

WEBLINK: Game Development Design

Laurent: Not sure if this fits into the projects section, as it's not primarily targeted at SFML. Feel free to move it anywhere you like. :)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Game Development Design articles
« Reply #1 on: November 14, 2012, 09:04:13 pm »
This is great. Especially that topic, just the day before yesterday I had a look at several articles concerning component-based game design :)

The third approach (self-attaching components) looks interesting, but it sounds too good with this short description. Do you plan to explain a little bit more detailed how it is implemented, or do you have links with deeper explanations? The behaviors still need to access the properties somehow, how is the recognition "automagically" performed?

Some remarks: You write "leave a commit" instead of "comment" (too much Git recently? :D) and the example EntityFactory::create_tree() doesn't return a value. Apart from that, the text is well-written, without much bla bla, and easily understandable. Continue like this!
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Game Development Design articles
« Reply #2 on: November 14, 2012, 09:31:08 pm »
Maybe it's more of a thread that should go into General forums.
I'll be sure to read them all thoroughly.
The beggining just cracks me up, 'preview' shows:
Quote
I’d like to congratulate you [...]
and then after a click the full rest of the sentence turns out to be:
Quote
for choosing one of the hardest and most difficult areas of programming.
which is so ironic and funny to me.
Quote
You write "leave a commit" instead of "comment" (too much Git recently? :D)
;D ;D ;D

Not that I disagree about mad inheritance but:
Quote
Multiple inheritance is really bad, because it can lead to severe problems (e.g. in the example above, TreeWithLeavesAndApples inherits Tree twice!).
I'm not sure about that so correct me if I'm wrong:
wouldn't that be ok since c++ will create two Trees withing TreeWithLeavesAndApples?
Or even better: wouldn't virtual inheritance fix that and create single Tree(actually mandatory if Tree is interface)?
Back to C++ gamedev with SFML in May 2023

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: Game Development Design articles
« Reply #3 on: November 14, 2012, 11:34:34 pm »
This is great. Especially that topic, just the day before yesterday I had a look at several articles concerning component-based game design :)
Good timing then. :)

Quote
The third approach (self-attaching components) looks interesting, but it sounds too good with this short description.
I was afraid it's not explained enough. I think a second part that covers some more implementation details or more detail in general would make sense. Besides that, I have a working implementation of the approach in a game; so it's nothing in theory only.

Quote
The behaviors still need to access the properties somehow, how is the recognition "automagically" performed?
Yes, the controllers do access the properties of entities, because that's what they are working on. The automatic attaching works by defining rules in each controller that tell what properties it requires. I will cover all of that in part 2.

Quote
Some remarks: You write "leave a commit" instead of "comment" (too much Git recently? :D) and the example EntityFactory::create_tree() doesn't return a value.
Not only recently, but always. ;) Thanks for pointing it out, both mistakes have been fixed.

Quote
Apart from that, the text is well-written, without much bla bla, and easily understandable. Continue like this!
Thanks for your feedback!

@FRex:
No, inheriting from multiple classes results in one single class. That's why it's problematic, especially when different base classes have one equal ancestor. I personally think it's okay (and required) for inheriting interfaces or utility classes. But inheriting from two full-blown classes is mostly a design flaw in my opinion.

masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: Game Development Design articles
« Reply #4 on: November 15, 2012, 02:42:26 am »
This looks quite interesting indeed. I was going for a sort of mixed approach of justified use of inheritance and separated entity work that relate themselves with either pointer or instances (when needed), but this got me to start thinking outside of my self-imposed box. I'd like to see a source code example to fully understand this approach.

Quote
I think a second part that covers some more implementation details or more detail in general would make sense. Besides that, I have a working implementation of the approach in a game; so it's nothing in theory only.

Indeed this would help a lot with further understanding.
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
Re: Game Development Design articles
« Reply #5 on: November 15, 2012, 06:58:40 am »
Yay !

I write myself some articles from time to time... (even if it's been a long time since the last one :p) and I really like to read someone else articles, especially about Component system !

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: Game Development Design articles
« Reply #6 on: November 15, 2012, 08:38:19 am »
Quote
I'd like to see a source code example to fully understand this approach.
The next part will not really include full source code. Like described in the intro, I will definitely add crucial parts as source, pseudo-style, to understand how things are meant to be. But hopefully the text will be detailed enough for the readers to continue in their source code.

Quote
I write myself some articles from time to time... (even if it's been a long time since the last one :p) and I really like to read someone else articles, especially about Component system !
Show them! :)

Lo-X

  • Hero Member
  • *****
  • Posts: 618
    • View Profile
    • My personal website, with CV, portfolio and projects
Re: Game Development Design articles
« Reply #7 on: November 15, 2012, 12:28:40 pm »
Quote
I'd like to see a source code example to fully understand this approach.
Yes me too :D

Quote
I write myself some articles from time to time... (even if it's been a long time since the last one :p) and I really like to read someone else articles, especially about Component system !
Show them! :)

Unfortunatelly, theses articles are in french (and a link is provided on the french forum.. somewhere :p)
I wanted to write some articles or translate existing in english, but I never had the time to. Furthermore, I'm not so good in Eglish :p

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
Re: Game Development Design articles
« Reply #8 on: November 15, 2012, 12:38:13 pm »
I read it and looks awesome. I'm waiting for the next part!

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: Game Development Design articles
« Reply #9 on: January 19, 2013, 02:48:48 am »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Game Development Design articles
« Reply #10 on: January 19, 2013, 02:57:23 am »
YES! So much win! ;D

Will there be more parts?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: Game Development Design articles
« Reply #11 on: January 19, 2013, 03:00:30 am »
Parts about the component system? No, I don't think so. About other topics? Yes, I'd like to do that. However, like stated in the opening post: When there's time, I'm in the proper writing mood and people can make use of the articles in any way. ;)

masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: Game Development Design articles
« Reply #12 on: January 19, 2013, 09:59:03 am »
Great! I've been expecting this one for a while now, after reading more on move semantics this seems like the best way to go on what I've been wanting to learn lately.
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Game Development Design articles
« Reply #13 on: January 19, 2013, 10:53:41 am »
Quote
use dynamic_cast<> in debug builds and reinterpret_cast<> in release builds
Isn't it rather "static_cast<> in release", if you're talking about downcasting? Or even boost.polymorphic_downcast ;)
Laurent Gomila - SFML developer

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 190
    • View Profile
Re: Game Development Design articles
« Reply #14 on: January 19, 2013, 02:25:50 pm »
Is there a noticeable overhead in using Property<int> instead of actual ints?