Re: new, tiny, modest game
Donny Viszneki <donny.viszneki <at> gmail.com>
2010-08-22 05:17:21 GMT
IIRC I was only that an image should not be loaded more than once
unless you have a good reason to unload it first
On Sun, Aug 22, 2010 at 12:54 AM, Saturn Almighty <6.saturn.6 <at> gmail.com> wrote:
> Right now it isn't written that well, and each object does carry its own
> image. If I separate the actual images (GLuint's), should each object then
> have some sort of reference to what image it wants? (Then again, aren't
> GLuint's just references to arrays of image data? I don't know if that is
> It will probably be a big project to code this better, but it will also be
> good experience and I can slowly creep away from n00b-iness.
> Thanks a lot,
> On Mon, Aug 16, 2010 at 10:21 PM, Donny Viszneki <donny.viszneki <at> gmail.com>
>> On Sun, Aug 1, 2010 at 1:35 PM, Nikola Whallon <6.saturn.6 <at> gmail.com>
>> > Here is a tiny demo:
>> > http://www.theoctoroks.com/gravity/downloads/
>> Hey great start! I especially like how you cannot directly escape the
>> planetoid's gravity and must reach escape velocity gradually with a
>> suborbital trajectory! There must be a bug though because once I fell
>> through the planet.
>> Some observations about your gravity_linux.tar archive...
>> gzip your tar archives!
>> If you already have a tar file, just use "gzip archive.tar" and it
>> will become "archive.tar.gz"
>> You can automatically gzip your tars with "tar czf archive.tar.gz <files>"
>> You can automatically ungzip your tars with "tar xzf archive.tar.gz"
>> You also have your entire Subversion repository in there! Yikes!
>> I also notice an extra file that doesn't belong called ._gravity_linux in
>> Generating dependencies automatically is important to prevent from
>> making unneeded updates to a Makefile and creating a more error prone
>> development process. Learn how here:
>> On Mon, Aug 16, 2010 at 7:34 PM, Nikola Whallon <6.saturn.6 <at> gmail.com>
>> > When loading images, I have a nice function in ImageObject that does
>> > that
>> > for everything, but I call it all over the places (for example, in the
>> > functions initShip, initPlanet, etc, each one loads its image). This
>> > makes
>> > quitting after checking if the image loaded properly rather difficult.
>> > Is it
>> > smarter to load all my textures at the beginning of execution?
>> Right now your game appears to have only one object per image, but if
>> that is not the case, it is important to abstract image loading away
>> from image referencing. So when an object asks the image API to use an
>> image, that image should only be loaded at that time if it is not
>> already loaded!
>> SDL mailing list
>> SDL <at> lists.libsdl.org
> SDL mailing list
> SDL <at> lists.libsdl.org