Whats a Singleton?

Started by
7 comments, last by Prozak 22 years, 3 months ago
I''ve heard something about this before, but I don''t get it, so, whats a singleton class? Is it helpful in game development?

[Hugo Ferreira][Positronic Dreams][]
"Research is what I''m doing when I don''t know what I''m doing."
- Wernher Von Braun (1912-1977)

Advertisement
Search the forums for "singleton". There have been some long and extremely informative threads about them recently.

"So crucify the ego, before it''s far too late. To leave behind this place so negative and blind and cynical, and you will come to find that we are all one mind. Capable of all that''s imagined and all conceivable."
- Tool
------------------------------
"There is no reason good should not triumph at least as often as evil. The triumph of anything is a matter of organization. If there are such things as angels, I hope that they're organized along the lines of the mafia." -Kurt Vonnegut
The Singleton it´s a pattern used to ensure that only one instance of a particular object can exist on the application. You can find more information about these and other design patterns on the book Game Architecture and Desing by Andrew Rollings and Dave Morris.
I thought it was a thin, usually knit, article of clothing... sort of like a "sweater-vest".
---------------------------
java-script security warning
---------------------------
A script wants to read the password(s) in the form.

Do you want to give the script access to your password(s)?
---------------------------
Yes No
---------------------------

(I should probably delete this mispost, but it has a quality of absurdity which appeals to me)

Once there was a time when all people believed in God and the church ruled. This time is called the Dark Ages.



Edited by - Arild Fines on January 16, 2002 5:41:09 AM
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
quote:Original post by Ignacio Liverotti
You can find more information about these and other design patterns on the book Game Architecture and Desing by Andrew Rollings and Dave Morris.

Or go with the canonical book on the subject: http://www.gamedev.net/columns/books/featuredbook.asp?productid=18


Once there was a time when all people believed in God and the church ruled. This time is called the Dark Ages.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
A Singleton is a discreet grouping of 2000kg...



ShadeStorm, the Day_Glo Fish
ShadeStorm, the Day_Glo Fish
Wouldnt that be 1000 Kg?

Once there was a time when all people believed in God and the church ruled. This time is called the Dark Ages.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
A singleton is a "group" composed with only 1 element
KEEP LOADED!!!

This topic is closed to new replies.

Advertisement