Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Pages: 1 ... 9 10 [11] 12 13 14

Author Topic: Wrecked Games Engine (WGE)  (Read 52574 times)

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #150 on: April 14, 2006, 09:25:03 PM »

Sweet  :D , I have absolutly no experience using physics. I guess we could wing it, or do you know of someone who can do it? or should I start studying now  :wink: ?

btw, I put time-based movement in, I think it's right, but you'll probably want to check it.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #151 on: April 15, 2006, 07:55:33 AM »

Sure, walaber ;) - Ok, i don't really know him.. But I know he is the physics master :)

To bad I doubt he would join up. We will probably have to wing it.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #152 on: April 15, 2006, 07:34:50 PM »

I found an un-official wiki for newton made by walaber: Here, here is the homepage for Newton: http://newtondynamics.com/index.html
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #153 on: April 15, 2006, 09:29:12 PM »

I added animation support, and I fixed getTimeSinceLastFrame(), also I added setMaterial, and setSkeleton  :D . I will try to add VertexAnimation soon.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #154 on: April 15, 2006, 09:35:49 PM »

Quote from: "mysterycoder"
I added animation support, and I fixed getTimeSinceLastFrame(), also I added setMaterial, and setSkeleton  :D . I will try to add VertexAnimation soon.


Awesome! I think we have exceeded v0.1 goals... Perhaps time to make a road map for v0.2 ;)
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #155 on: April 15, 2006, 10:38:52 PM »

I just saw the robot in motion.. Cool. I'm not sure what animations the robot has, but you could bind some events (say doFire or whatnot - if the robot has a fire animation), and start a new animation from that callback.

Then, when we add particle effects, we could also add some sweet ray gun or whatnot.

Oh, and one other thing I thought I would mention.. the callback system of the Input manager should work with class squirrel class instances. If say, you wanted to register an object's class member function to get the callback.

Ie. instead of using "handleFire" you could use "::human.handleFire" - Not that the simple scripts need that at this point, but just mentioning this (although, I have not tested, but it should work, i think :/ )
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #156 on: April 15, 2006, 10:43:14 PM »

Hmm, never mind about the input events.. I just tried, and it did not work.. Must be a way though.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #157 on: April 16, 2006, 03:13:58 PM »

I've noticed that you use only throw for exceptions:

Code: [Select]

throw(<insert exception here>);


but isn't it better to use Ogre exceptions?

Code: [Select]

throw Ogre::Exception(0, <insert exception here>, <function name here>);


that comes up with a error box, instead of "Unknown Exception", and in my opinion is more informative. Is there a reason not to use Ogre::Exception?
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #158 on: April 16, 2006, 05:25:56 PM »

The main reason, was that I was hoping SqPlus could catch const char* exceptions easily (it may), but it didn't work for me.

As far as an unhandled Exception:
Code: [Select]

catch(const char * ex)
{
MessageBox(NULL, ex, "Exception!", MB_OK);
}

That is inside WGEMain.cpp, and at least here, all exception types are caught. Ogre, const char*, and all others (...). So, don't know why you are recieveing unhandled exception. For example, when clicking cancel on the Ogre dialog, i throw a throw("User cancel app"), which works fine (although, I plan to replace that without using an exception).

The only difference between throwing with throw(string) to OGRE_EXCEPT is the automatic use of file and line macros.. Some casees it is helpful, others it's overkill. In any case, WGE will probably ultimately create it's own exception type. It's just not that big on the agenda right now ;)
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #159 on: April 18, 2006, 10:03:50 AM »

Well, this thread is really big stil, but, I don't feel like starting another thread for this post.. soo :)

I moved the WGE::Manager script bindings to WGEManager.cpp instead of being in WGEScriptManager. The reason it was where it was is because at first, i was trying to abstract out the scripting languages... However, due to the nature of the compile time macros, and template bindings, that idea didn't work so well.. Which is why Squirrel is everywhere now ;)

So, I moved it to the manager itself. Also, i added a rand() method to return a value between 0.0 and 1.0 for scripting. Ie, to get a random numer between 1 and 100:
local r = WGE.rand() * 100;
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #160 on: April 18, 2006, 12:35:08 PM »

I also just added a very simple command line option:
GAME.exe [-entry nut_filename]

The brackets indicate that it is of course optional, and defaults to world.nut
To use it: GAME.exe -entry my.nut

THis can be set in the commandline, or the debuggin properties commandline properties in Visual Studio, and any shortcut, or from a tools (ie. PN2 tools).

I am adding some seperate nuts, that will become part of a test scene. The main nuts we've been using will be the "playpen" area for testing or whatnot.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #161 on: April 18, 2006, 02:07:16 PM »

I figured out how to inheirit in squirrel from the Actor class. Play (in the demo nut's) now inherits from actor :)
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Wrecked Games Engine (WGE)
« Reply #162 on: April 18, 2006, 04:26:10 PM »

What version of FMOD are you using, Fmod Ex, or the traditional version 3?, I need to download it seperatly of the dependencies right?
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Wrecked Games Engine (WGE)
« Reply #163 on: April 18, 2006, 04:32:24 PM »

Yeah, it is a seperate download (like OpenAL) as it is not a core feature, but a plugin ;)

And, yup, using the 3,7+ whatever latest version. Though, I would stick to the OpenAL plugin right now if I were you, as the Fmod one does not yet incorporate samples (waves), just streams. I am holding off on doing more development on that for the time being as a) Need to incorporate 3D position into the Samples too b) Kinda burntout with that system for right now :)
Logged

OvermindDL1

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 288
    • View Profile
    • http://www.overminddl1.com/forum/
Wrecked Games Engine (WGE)
« Reply #164 on: April 25, 2006, 11:28:11 PM »

I have not read this entire thread (as I have been busy for a few weeks and it is quite long), but what would you all think about a more C++ oriented engine.  For example, I've been working on one the past year in my spare time (for my purpose, but if anyone wants it...), it uses Ogre, OgreNewt, OIS, OpenAL, Raknet, Python, etc...  These are my favorate's in their respective categories, and I honestly hate trying to abstract things like those, so I did not; I rather combined them to work together.  My engine right now, the main cpp file consists of the main calling:
Code: [Select]

#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCommandLine, INT )
#else
int main(int argc, char *argv[])
#endif
{
SET_TERM_HANDLER;

try
{
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
Engine::myClassPtr engine = Engine::InitEngine(strCommandLine);
#else
Engine::myClassPtr engine = Engine::InitEngine(argc, argv);
#endif

if(!engine)
OGRE_EXCEPT(Ogre::Exception::ERR_ITEM_NOT_FOUND, "Engine could not be loaded.", __FUNCTION__);
engine->Run();
}
catch( Ogre::Exception& e )
{
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBox( NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
std::cerr << "An exception has occurred: " <<
e.getFullDescription().c_str() << std::endl;
#endif
}

Engine::CleanupEngineGlobals();

return 0;
}


The engine first looks in a default.ini file (unless another is specified on the commandline) to do basic init.  My file right now is:
Code: [Select]
[]

[DefaultGameEngine]

[Engine]
GameEngine=DefaultGameEngine
graphicOptionsFile=ogre.cfg
logFile=testering.log
mainName=Testing Game!
pluginsFile=Plugins.cfg
resourcePathsFile=resources.cfg


The [] is the empty section, nothing there, I should have it ignore it when it writes it out.  DefaultGameEngine is an engine class that has been loaded, although it doesn't specify it's own config options yet (its the most basic there is).  Engine is the base class, that things like DefaultGameEngine inherit from.  The notable thing about this is the GameEngine variable, it actually references a class name, could be loaded from dll or wherever, need not be compiled in thanks to a registry/factory/memory_pool/other_things Class system I setup, it allows you to get information on, create new of, etc... of any class that inherits from Object, only requirement for those classes being that they add a single macro to their header.  Everything is passed using a modified smart pointer.  To specify that something is dead, just call Destroy() on it, it deallocates an internal smart pointer, shuts off all events and such, calls Destroyed(void) so you can reset other pointers you keep a hold of, keeping it allocated for anything that still points to it, eventually returning it to the pool when there are no more references.  It currently has replication/scoping/etc... set up with thanks to raknet.  Depending on the class flags you pass into the required macro that is put into a class header, sets if it is replicatable, has a script interface (python), can be deleted, etc... etc...

The action/event system is one of the first things I created for it.  It uses 'pipes', and things can register any function (member/static/anything) to it, as well as register new events.  You add events by stringname, can create links between events (so one calls another).  I have a set of base things linked to all input keys, mouse moves, joystick, etc...  In this way OIS is abstracted, the only abstracted part in the system.  Since an input action causes a base event to be called (things like "KEY_A" and such), any events linked to it will also be called, things like when "KEY_W" is called, it could call linked events like "walk" or whatnot.  Classes can also register new events and trigger them, and other things can listen for those events.  Any node in the thing can be called by any number of others, and can trigger any number of others.  I am currently setting them up so they can also broadcast across a network as well.

There are quite a few other things I've stuck in as well, but need sleep.  Is what you are creating like this in any way?  In the very least I can try to contribute code when I have spare time.
Logged
Pages: 1 ... 9 10 [11] 12 13 14