Page 1 of 1

How do spring components fit together

Posted: 16 Apr 2012, 11:27
by Das Bruce
I'm trying to write my own engine but the big problem I'm running into is confusion on how to organise all the different macro components (rendering, sim, etc). Can someone paint me a picture of how spring does it?

Re: How do spring components fit together

Posted: 16 Apr 2012, 12:29
by Beherith
Model-view-controller.

Re: How do spring components fit together

Posted: 16 Apr 2012, 13:25
by PicassoCT
Always the same answer.

Re: How do spring components fit together

Posted: 16 Apr 2012, 15:49
by FLOZi
<shotinthedark>
I imagine the answer for Spring is 'not that well' considering its heritage, though things have improved considerably with the refactors over the past few years.
</shotinthedark>

Re: How do spring components fit together

Posted: 16 Apr 2012, 16:35
by hoijui
to what flozi siad: first part true, second part not true (with minor exceptions like the new config system and to some extend the new logging system).

i agree with behe that model-view-controller is the most important concept you should keep in mind, but also all the other accepted general/OO software design patterns. other then that, you should think about stuff like... on what systems will this engine run on, what are the most important things.. for example.. will it be performance critical cause it runs huge numbers of units on big maps or the like?
and probably the most important and most complex thing you have to think about in the very beginning, is how you want to approach multi CPU/Core support/usage.
an other general recommendation i would make, is to design all sub-parts through as simple and clean interfaces as possible. and of course it would be best if you would be able to keep these interfaces stable (no changes there). all this work may be a bit boring in the begining, but if your work ever gets usable and maybe even successfull, and used by others, ... or even just for the sake of learning how to do things right, you will be very thankfull for that.

btw, this is kind of one of my key interest topics, so if you have more questions or want to discuss.. i'd be interested.

ouh... and if you are using C++ ... better just do not even start... please!

Re: How do spring components fit together

Posted: 16 Apr 2012, 17:47
by Karl
hoijui wrote:ouh... and if you are using C++ ... better just do not even start... please!
What is with Haskell,Erlang or other programming languages that uses pattern matching?

Re: How do spring components fit together

Posted: 16 Apr 2012, 21:35
by FLOZi
hoijui wrote:to what flozi siad: first part true, second part not true (with minor exceptions like the new config system and to some extend the new logging system).
Well I'm sure there's still a long, long way to go... but I didn't want to be too much of a debbie downer; ie. I sure do appreciate all your work. :-)

Re: How do spring components fit together

Posted: 16 Apr 2012, 23:34
by Das Bruce
hoijui wrote:ouh... and if you are using C++ ... better just do not even start... please!
Too late. :cry:

Re: How do spring components fit together

Posted: 16 Apr 2012, 23:43
by AF
Spring is a horrific mudball that compiled and ran oneday.

Since this heap of garbage managed to work and something desirable appeared on the screen, many many termites of the genus "Developus yankspankicus" and "Flamus ceepluspluses" have been shaping the mud into something resembling a termite hill in hopes that they will not be swept away by the unwashed masses

The most structured part of the engine is the lua bit

Re: How do spring components fit together

Posted: 17 Apr 2012, 08:34
by PicassoCT
now... why cant we have a big company providing a cathedral architecture, that is fixed and will collaps if only one stone is removed after building has ended.

Just accept what the world is, accept that you might not be alone on your engine. Write ComentCode before creating functions and junctions


//Function: Returns values this and this

//wahr(end) do

//if this is true then you goto do

//else

Also, while keeping to modell view controll, make sure you have something minmal that compiles at all times. Undefined Coment in Line 55: No point in sailing the red Ocean (thats how i call the codeblocks, youvegotErroz lines)
Also, draw a paperplan.. consider stuff that has to adapt, and stuff that will be fixxed.

Usual coding stuff applies.

Re: How do spring components fit together

Posted: 17 Apr 2012, 09:55
by AF
PicassoCT wrote:cathedral architecture
Image

No not the cruciforms, the pain, it burns, where's the ultramorph, no NO NOT THE THORN NO NOOOOOO

Re: How do spring components fit together

Posted: 17 Apr 2012, 16:52
by Cheesecan
Write acceptance tests for anything that is interactive. Use any technology that will save you time and allow you to work more effectively than other one man teams. Even if it is a pita to set up initially. Also don't develop an engine, develop a game. This last piece of advice is probably the most important.

Re: How do spring components fit together

Posted: 17 Apr 2012, 17:36
by PicassoCT
Image
This might sting a bit!

Re: How do spring components fit together

Posted: 17 Apr 2012, 21:39
by Cheesecan
http://scientificninja.com/blog/write-games-not-engines

It's food for thought if you ever find yourself embarking on that journey.

Re: How do spring components fit together

Posted: 17 Apr 2012, 21:59
by PicassoCT
excellent post - he has been standing guard to the gates of hell for so long, they built a drive-in-schwarma at his rear.

Re: How do spring components fit together

Posted: 18 Apr 2012, 00:24
by Gnomre
Nice picture find Picasso, but the eyes aren't nearly red enough

Re: How do spring components fit together

Posted: 18 Apr 2012, 06:07
by hoijui
what cheese said, and take hints from others, for example [Dr]WTF and his LSD space shooter relative to music game, where he uses very few, purely procedurally generated "content", which alloed him to do the whole thing in not too much time.

Re: How do spring components fit together

Posted: 20 Apr 2012, 15:32
by PicassoCT
Cheesecan wrote:http://scientificninja.com/blog/write-games-not-engines

It's food for thought if you ever find yourself embarking on that journey.
Thinking about this made me realize, that spring is capable of growing- wherever the devs want it to grow towards to. And even outgrow stuff. Like we did with ugly maps.. or ta modell support only..

Really nice blog.