How do spring components fit together

How do spring components fit together

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Post Reply
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

How do spring components fit together

Post 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?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: How do spring components fit together

Post by Beherith »

Model-view-controller.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: How do spring components fit together

Post by PicassoCT »

Always the same answer.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: How do spring components fit together

Post 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>
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: How do spring components fit together

Post 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!
User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: How do spring components fit together

Post 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?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: How do spring components fit together

Post 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. :-)
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: How do spring components fit together

Post by Das Bruce »

hoijui wrote:ouh... and if you are using C++ ... better just do not even start... please!
Too late. :cry:
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: How do spring components fit together

Post 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
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: How do spring components fit together

Post 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.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: How do spring components fit together

Post 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
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: How do spring components fit together

Post 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.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: How do spring components fit together

Post by PicassoCT »

Image
This might sting a bit!
User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: How do spring components fit together

Post by Cheesecan »

http://scientificninja.com/blog/write-games-not-engines

It's food for thought if you ever find yourself embarking on that journey.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: How do spring components fit together

Post 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.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Re: How do spring components fit together

Post by Gnomre »

Nice picture find Picasso, but the eyes aren't nearly red enough
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: How do spring components fit together

Post 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.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: How do spring components fit together

Post 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.
Post Reply

Return to “General Discussion”