[SDL] Where SDL goes in your game

Armond Sarkisian armond.sarkisian at gmail.com
Wed Nov 8 14:03:01 PST 2006


I want to thank everyone who participated in this forum. I have a better
idea of how I want to design my next app.

Thanks,
Armond

On 11/8/06, Lilith Calbridge <lilith at dcccd.edu> wrote:
>
> On the one non-game full application (presentation) I've written I
> created a class of SDLObjects.  The essence of the object was that it
> held a static object that was a pointer to my video display surface so I
> didn't have to keep passing the pointer to the objects.  Beyond that I
> had position markers and some state indicators; alive, visible, active,
> moving, move_type, etc along with associated functions.  And of course,
> there was the ubiquitous Draw() function.  Most of the other
> functionality/logic is handled by the program.  Some functions that were
> part of the system weren't part of any object.  But they were aware of
> the nature of the object.  That leaves things more flexible.  When it
> makes sense to add some functionality I decide where it belongs.
>
> I guess you could say that rather than top-down programming I tend to
> do inside-out programming.
>
> Lilith
>
> >>> On 11/8/2006 at 1:54 PM, in message
> <36e6d5110611081154t199435cdw426fcdec80a012cd at mail.gmail.com>, "Armond
> Sarkisian" <armond.sarkisian at gmail.com> wrote:
> > Hmm,
> >
> > So it is better to keep everything minimal under the fewest number
> of
> > classes. I must admit, I do tend to want to "over" organize my
> programs but
> > I will think this over. Anyone else have any other suggestions?
> >
> > On 11/8/06, Peter Mulholland <darkmatter at freeuk.com> wrote:
> >>
> >> Hello Armond,
> >>
> >> Wednesday, November 8, 2006, 5:43:55 PM, you wrote:
> >>
> >> > Hi everyone,
> >>
> >> > This is my first post in this forum and hoping to find some help.
> I
> >> started
> >> > SDL a few months ago and all is well except I have a problem with
> the
> >> entire
> >> > program's structure.
> >> >
> >> > When we create an SDL-based app, where do you put all the SDL data
> as
> >> far as
> >> > the entire program's structure is concerned. An example... suppose
> we
> >> have the
> >> > following classes:
> >> >
> >> > - GameObjects  ( super-class )
> >> >
> >> > - Ball ( derived-class )
> >> > - Paddle ( derived-class )
> >> <snip>
> >>
> >> My two cents. Please do not get Java-itis and write your games so
> that
> >> every little thing is an object. It's inefficient, it's difficult
> to
> >> follow, and if you have to port such code (as I do) it's a total
> pain
> >> in the ass.
> >>
> >> --
> >> Best regards,
> >> Peter                            mailto:darkmatter at freeuk.com
> >>
> >>
> >> _______________________________________________
> >> SDL mailing list
> >> SDL at libsdl.org
> >> http://www.libsdl.org/mailman/listinfo/sdl
> >>
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20061108/0be321c2/attachment.htm 


More information about the SDL mailing list