auron777

Member
  • Content count

    18
  • Joined

  • Last visited

Community Reputation

128 Neutral

About auron777

  • Rank
    Member
  1. I've been working on a game project, Deity, with a team of other students for the past 15 months and it was released to the public this morning. Here's the release announcement video: [media]http://www.youtube.com/watch?v=dVPIb1O9f2o[/media] The game is now freely downloadable at [url="http://www.deity-game.com/"]our website[/url]. Give it a try and let us know what you think! [u][i]Game Description:[/i][/u] Deity is a stealth action game developed by a team of students at DigiPen Institute of Technology. Deity features unique gameplay mechanics, requiring only the mouse to play and was inspired by games such as Diablo and Batman: Arkham Asylum, encompassing stealth action in an isometric view.
  2. [quote name='SFloyd' timestamp='1302272041' post='4795961'] This is a very nice Framework. I set it up, I am modifying it to incorporate windowing and input handling, but overall this is a really nice project you have here. I really hope you have tutorials come out, or that it gets more attention, like it deserves. [/quote] Hi SFloyd, Thanks for the input! You can check out the other engine project I'm working on, called [url="http://code.google.com/p/delectable/"]Delectable[/url], for windowing and input handling. The engine was designed to run on top of the framework and focuses on the higher level stuff that Chewable doesn't incorporate. It also has XML serialization utilities and I might look at integrating a graphics engine like Ogre or Horde3D in the future. Delectable is not as polished as Chewable and could use a bit of refactoring. I don't have much time to do it all at once right now because I'm developing a game with a bunch of other peple (more details and links to it over the next couple of months!). The game utilizes both the framework & engine and a lot of the improvements made to the projects have been based off of feedback from the development process. Feel free to message me or reply on this thread if you have any questions.
  3. [quote name='Ravyne' timestamp='1301450478' post='4791992']The bottom line, from my perspective, is that you should consider good 4-year universities, universities with gaming or media-focussed programs, and Digipen. None of the other gaming options are worthwhile, in my opinion.[/quote] I would have to agree with Ravyne. In my opinion, your ability to learn about game programming and computer science related material is usually only hindered by your drive and motivation to excel. Being in any university will provides you the guidance and direction, but ultimately, the rest is up to you. However, the one one thing I feel that people don't bring up enough when asked the "game or regular university" question is what you can learn out of the classroom[i].[/i] I would say that the greatest benefit to studying at a gaming focused course is NOT about the math, physics or CS material they teach - it is the experience of producing a game. You would not likely get this opportunity at any other university and no structured course can ever teach you how to effectively and efficiently work in a team. Learning the dynamics of performing in a game development team is [i]invaluable[/i] and I feel it's essential skill to work in the industry. I'm biased towards DigiPen because I'm currently a student there and the experience has been fantastic so far. They teach you the lower level hardcore stuff and you don't have the liberty of using commercial or open source engines for any of your projects. Plus, being able to find a group of other students who are as passionate about you as developing a game is amazing - which extremely difficult to do in other schools.
  4. [font="arial, sans-serif"] [size="5"][b]The Chewable Framework[/b] [/size][size="2"]Chewable is designed to make your life easier.[/size] [size="2"]Inspired by XNA, it aims to provide a C++ component-based framework to make game development easier, providing the foundation for getting a game up and running.[/size] [size="2"]It is intended to be a minimal library so it does NOT include features for windowing, input, graphics, audio. However, it is fairly easy to plug these systems into the game. As such, the project does not rely on any external libraries to compile (with the exception of Google Test for the unit tests project, which is not required), making it easy to setup.[/size] [size="5"][b]Chewable Features[/b] [/size][size="2"]Chewable implements the following key features:[/size] [list][*]Fast Event/Delegates[*]Object/Object component management[*]Game state management[*]Object/Object component registry system[*]Component system[*]Services system[*]Math Utilities/Wrappers[*]High-Precision Timers[*]Logging & Profiling Tools[*]Custom assertion system[/list][size="2"]There are a number of other useful utilities included.[/size][/font] [font="arial, sans-serif"][size="2"] Currently, only MSVC2008/2010 on Windows is supported. Feel free to contact me if you're interested in implementing support for Linux or Mac.[/size] [size="2"]Tutorials will be done over the course of the next few months.[/size] [/font] [font="arial, sans-serif"]Link: [url="http://chewable.googlecode.com/"]http://chewable.googlecode.com/[/url] [size="2"]Last Updated: 29-Mar-2011[/size] [/font]
  5. C++ Singleton Across DLLs

    Thanks for all your replies everyone, and RobTheBloke for being especially helpful! I'll stick with option b) :)
  6. C++ Singleton Across DLLs

    Okay another question... Let's say I have this Singleton class now: template< typename T > class Singleton { public: inline static T & Instance( void ) { static T _instance; return _instance; } private: /// Hide constructor. Singleton(); /// Hide destructor. ~Singleton(); }; #define DECLARE_API_SINGLETON( type ) template EXPORT_API ::Chewable::Singleton< type > Note: EXPORT_API is the automagical macro that does the importing/exporting depending on if its library or client build. This time, the usage is slightly different: #include "Singleton.h" class MyClass { public: typedef Singleton< MyClass > Singleton; public: void Hello( void ) { printf( "Hello" ); } }; DECLARE_API_SINGLETON( MyClass ); int main() { MyClass::Singleton::Instance().Hello(); return 0; } Is this a viable way to implement a Singleton as well?
  7. C++ Singleton Across DLLs

    Wow thanks, RobTheBloke! That was a great help. :)
  8. C++ Singleton Across DLLs

    Sorry SiCrane. I think I didn't make myself clear enough. My question is that if I used MyClass, which is already compiled with the Singleton<MyClass> base class, would it use the library instance?
  9. Hi, I've implemented a simple singleton solution as shown below: // Singleton.h template< typename T > class Singleton { public: Singleton(); ~Singleton(); static T & Instance( void ) { return mSingleton; } static T * InstancePtr( void ) { return &mSingleton; } protected: static T mSingleton; private: Singleton( Singleton const & ); // Hide copy ctor Singleton & operator = ( Singleton const & ); // Hide assignment operator }; template< typename T > T Singleton< T >::mSingleton = T(); Using this solution, I'm curious about the implications of using this across DLLs, for example: class __declspec( dllexport ) MyClass : public Singleton< MyClass > { public: void Print( void ) { printf( "Hello!" ); } }; If I were to compile the above code into a single library DLL, would external usage of the MyClass singleton access the library version or create it's own copy of the static variable? #include "MyClass.h" ... MyClass::Instance().Print(); Thanks in advance. EDIT: Changed the Singleton class code a little. [Edited by - auron777 on August 11, 2009 7:17:26 AM]
  10. C++ Event/Delegate System

    Quote:Original post by robinei Here's code for an event system I made in C. That's some heavy macroing, heh. I'm not sure about this, but using your code, does it mean that every time I define an event in a different scope, it will generate a new struct for that event?
  11. C++ Event/Delegate System

    I'm trying to avoid the usage of virtual classes since you probably don't ever need more than 2 types of slots. fd::delegate avoids virtual classes as far as I can tell. I'll try to implement a simple delegate system as well when I have time :)
  12. C++ Event/Delegate System

    I went on the basis that I hardly ever use the () operator for anything else and that I probably wouldn't want to ever register the same object to an event more than once. I can simply do this: class Listener { public: void operator () ( OnTest::Arguments const & args ) { DoSomething( args ); DoSomethingElse( args ); } void DoSomething( OnTest::Arguments const & args ); void DoSomethingElse( OnTest::Arguments const & args ); }; Or if I need to register under 2 different events, I would just overload another () operator with different event arguments. It helps to keep a cleaner interface and allows the usage of += and -= operators without having to use any complicated function object binding. I tried using std::list< boost::function > or std::list< std::tr1::function > but I wasn't able to get it working with unregistering object functions (== operator doesn't automagically compare between two std::tr1::function objects). I considered using other delegate systems such as boost::signals and libsigc++ but I wanted a header-only implementation without having to include external .lib files to reduce the dependencies required by the framework. Please do share if you have any suggestions on how I could implement the delegate system more efficiently! Thanks! EDIT: fd::delegate is also pretty fast from the benchmarks in the article I linked above. Boost has a new signals library called boost::signal2 and it's header-only implementation so it might be worth checking out :) [Edited by - auron777 on July 28, 2009 8:38:35 AM]
  13. Here is a simple event/delegate system I've been working on as part of a framework I'm doing. I make use of a Fast Delegate which can be found at here (requires some boost headers). /// Traits structure specialized for defined events using the event definition macros. template< typename T > struct ArgumentTraits { }; template< typename T > class Event : Noncopyable // Cannot copy events. { public: /// Arguments typedef for convenience. typedef ArgumentTraits< T > Arguments; /// Listener function pointer type. typedef void ( * ListenerFunc )( Arguments const & ); /// Get global event. static Event< T > & Global(); /// Empty constructor. Event() {} /// Empty destructor. ~Event() {} /// Raise an event with arguments. void Raise( Arguments const & args ); /// Register a listener function to the event. void Register( ListenerFunc func ); /// Increment operator used to register a listener function to the event. void operator += ( ListenerFunc func ); /// Unregister a listener function from the event. void Unregister( ListenerFunc func ); /// Decrement operator used to unregister a listener function from the event. void operator -= ( ListenerFunc func ); /// Register a listener object to the event. template< typename O > void Register( O & obj ); /// Increment operator used to register a listener object to the event. template< typename O > void operator += ( O & obj ); /// Unregister a listener object from the event. template< typename O > void Unregister( O & obj ); /// Decrement operator used to unregister a listener object from the event. template< typename O > void operator -= ( O & obj ); /// Clears all registered event listeners. void Clear(); private: fd::delegate1< void, Arguments const & > mDelegate; ///< Event delegate. }; template< typename T > Event< T > & Event< T >::Global() { static Event< T > global; return global; } template< typename T > void Event< T >::Raise( Arguments const & args ) { if( mDelegate.count() ) mDelegate( args ); } template< typename T > void Event< T >::operator += ( ListenerFunc func ) { Register( func ); } template< typename T > void Event< T >::operator -= ( ListenerFunc func ) { Unregister( func ); } template< typename T > void Event< T >::Register( ListenerFunc func ) { mDelegate.add( func ); } template< typename T > void Event< T >::Unregister( ListenerFunc func ) { mDelegate.remove( func ); } template< typename T > template< typename O > void Event< T >::Register( O & obj ) { mDelegate.add( boost::ref( obj ) ); } template< typename T > template< typename O > void Event< T >::operator += ( O & obj ) { Register( obj ); } template< typename T > template< typename O > void Event< T >::Unregister( O & obj ) { mDelegate.remove( boost::ref( obj ) ); } template< typename T > template< typename O > void Event< T >::operator -= ( O & obj ) { Unregister( obj ); } /// Macro to define a new event. /// Arguments is typedef-ed for convenience, as seen below. #define BEGIN_EVENT_DEF( eventName ) struct eventName { typedef ::ArgumentTraits< eventName > Arguments; }; template<> struct ::ArgumentTraits< eventName > { /// Close event definition. #define END_EVENT_DEF }; For objects to register with the event, it must implement the () operator. Usage: BEGIN_EVENT_DEF( OnTest ) int x; int y; END_EVENT_DEF class TestListener { public: void operator () ( OnTest::Arguments const & args ) { printf( "[Object] %d, %d", args.x, args.y ); } }; void TestFunction( OnTest::Arguments const & args ) { printf( "[Function] %d, %d", args.x, args.y ); } Event< OnTest > evt; TestListener listener; evt.Register( listener ); evt.Register( TestFunction ); evt.Raise( data ); evt.Unregister( listener ); evt.Unregister( TestFunction ); evt.Raise( data ); // OR evt += listener; evt += TestFunction ; evt.Raise( data ); evt -= listener; evt -= TestFunction; evt.Raise( data ); The Global() function is not needed but is useful for global events that need to be triggered. Feedback is appreciated. :)
  14. C#, C++, C, Java... Who cares? If a game isn't fun to play, no one's gonna care if your game runs at an average 55FPS compared to 100FPS or if your character has amazingly detailed pimples on his/her face. A game should be enjoyable... That's why we play games isn't it? :)