Jump to content

  • Log In with Google      Sign In   
  • Create Account


Reactorcore

Member Since 26 Jun 2011
Offline Last Active Sep 24 2013 05:39 PM

Posts I've Made

In Topic: [Help] How do you properly organize game architecture?

06 July 2012 - 11:21 AM

I've never heard of a queuing system in programming before, what would one use it for and why?

The game I'm making is a singleplayer-only real time action game and it is not scripted in any strict way, besides how you start and how you end. You are put in a world, given a character and a big goal, which how you complete it, is completely up to you using the environment and other stuff you have. So from that standpoint, I could guess a queue system would be important for a game that is story driven or very scripted in how it unfolds, so in my case it would be irrelevant, right?

Sorry if I sound stupid, I'm a bit of a newbie-in-the-process-of-learning when it comes to programming.

In Topic: [Help] How do you properly organize game architecture?

05 July 2012 - 01:11 PM

Event systems have one downside, especially if you're using one big (or a couple*) central one(s) such as I do. It's not very performance optimized, since you've got a big middle hand between all objects that communicate via it. The flexibility added usually outweighs this problem imo and the more performance intensive algorithms are usually isolated in one of the modules. But keep in mind that they can be saturated if there's a lot going on in a real time game.


This is something I was very curious of when I was reading out about delegates and events, turns out that yes there is an overhead when doing this. I don't know if I'll be using events for the entity system, but two areas where events seem to be very good for are the menu system, which one should be able to evoke anywhere, even during gameplay, and the other is the metalogic of the game that deals with win/loose conditions as well as other major events happening during gameplay.

Not sure about the whole ZeroMQ thing. If I understood right, its something you can use for networking in your game, either between 2 programs on the same machine or between 2 programs over different machines? My game will not have online multiplayer, so I'm not entirely sure if its for me.

In Topic: [Help] How do you properly organize game architecture?

04 July 2012 - 07:52 AM

Thank you so much for your replies, everyone.

@ Canvas: I'm doing this in C# while using the Unity3D engine.
The things you talk about are pretty much the SOLID principles I've read somewhere, which reinforces how important they are.


@ DevLiquidKnight: Alright, UML will be useful, but not until I know how to design the architecture in the first place, so those books you recommended will be the first step.


@ Zoomulator: Your answer was very helpful. This is exactly the kind of information I was asking for, especially this bit:

Doesn't have to be UML, just atleast graph it out on paper so you have a rough idea how things are connected that is clear to you (and the future you). Some people like going with the top-down approach, all the way down. I don't remember which book it was that described the process, but it went something like this:
Start with a general overview of the whole system. Then for each object, make a general overview of it that's more specific. Re-iterate until it'd be easier to code it than to describe it, and so code it.


Also I really like how the event driven system sounds and is exactly what I'd prefer to build. Can you give any pointers on how you start building such architecture?
Again, I'm doing this in C#, if it matters.


@ L. Spiro: While I do agree with you that experience is a great way to learn, I'd argue that a good preparing education is a even better. Even now, I could just go ahead and start cowboy coding blindly and get something working, but it will be a mess and not robust, which is vital to this project of mine, because its meant to last.

I'd rather spend time studying and understanding how to properly use the tools I've got and have good understanding of healthy coding principles before starting to build anything. Doing otherwise is pretty much the same thing as shooting yourself in the foot. It will be frustrating and the end result won't be good either.

Sure, you could refactor constantly if you choose to develop your game in this brute-force like manner, but in the end that will also take time and effort, which you could have used to study the subject properly in the first place. Thats my opinion on this.

Anyway, I find your blog really helpful and not just the links you posted too, you've got some other very neat posts there too like, this one and that one, so I'm going to spend a good amount of time reading your blog, so thank you for writing it. Posted Image

In Topic: Recommended tool/library setup for my project?

20 October 2011 - 10:02 AM



-snip-

-snip-


XNA does and it doesn't. Everything in XNA is designed to come in through the XNA content pipeline, which is a right pain in the ass getting non-standard assets in, although I haven't used XNA since version 2, so it might have improved. If not, you need to write an importer, which is a bit of a pain in the ass.

That said, given that you are interested in portability, XNA probably isn't your best fit, so SDL.net or SFML.net or another 2D c# library may be a better fit.


Alright, I'll focus on that then.

Thank you very much, you guys have been a great help. Now I know where to go and what to do next. :)

In Topic: Recommended tool/library setup for my project?

19 October 2011 - 06:05 PM

XNA is still an option then, although it makes porting to Linux and Mac a bit tricky. For 2D projects, there are options in the pipeline, while you could also choose another library like SFML or SDL.net.


As to data driven design, think of it this way. The guts of your program are stored in data ( XML, Database, txt files, streamed from the web, whatever ) and your game code essentially "plays" that data.


That was a pretty piss poor explanation... ;)

All right, lets try with an example, say you were working on a RPG and you had an NPC class. In code it would often look something like this:

class Orc : Npc{
string Name = "Orc";
int Strength = "18/00";
int Intelligence = 8;
};

But if you were data driven, you would probably have it stored something like this:

<NPC>
<Name>Orc</Name>
<Strength>18/00</Strength>
<Intelligence>8</Intelligence>
</NPC>

So instead of your code defining what it an Orc is, it knows what an NPC is and how to read it from data.

Another approach to DD design, that many people don't think of as DD, is scripting. In essence, a script is just data.


The advantage to this approach is it pulls game specific data out of the code. This allows you first of all to more easily re-use code in the future, but more importantly it makes it a hell of a lot easier to update/tweak/playbalance/etc... your game, and makes writing tools much easier. It also allows you to offload gameplay issues to less technical people. Also, of course, it makes modding and extending your game a hell of a lot easier.


Yes! This is exactly what I need. :lol:
I hope XNA supports this type of structure, correct?

What about Love2D, whats the catch with that?
It looks really impressive, but I get the feeling theres something funny about it... in a sense that it might not be suitable for large games with intensive features (particles, lighting, extreme amount of content, large scenes etc.). And does it support data driven design?

In either case, this data driven structure system is perfect for my game and I'd go as far to say a must have for this project.
Incase XNA and Love2D is against it, I'll probably go with C# as the language of choice and use SDL or SFML as recommended by someone from another forum.

PARTNERS