Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Galileo430

Mods And DLLs

This topic is 6390 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
You can build a fairly simple "mod" subsystem by using the function:

LoadLibrary() <- Look it up in MSDN.

However, this limits the game to win32, but this allows you to only access functions using function pointers... and accessing classes... well I just don''t know.

I played around with this once, just did a simple implementation that loaded a dll (you could select one of many..) and it called a single function.

I guess you might want to implement this...

If you figure out how to use classes in mods... email me some source...



Regards,
Nekosion

Share this post


Link to post
Share on other sites
I am currently implementing a MOD-style system into my engine because it makes the developer use more strict rules for developing, and it keeps all the Win32 / entry-point rubbish away from their grubby little hands.

The best place to start is with the competition. IMHO, there are only three to look at: Unreal, Half-Life and Quake3. Unreal is fully C++, a nice OOP design, but has an awful lot of overhead (More than MFC!). Quake 3 is on the other end of the spectrum. It''s a C-based monster, full of all the nasties which come with this style of programming (Not saying it''s bad - I just prefer the C++ style). In the middle is. Half-life. Based upon Quake 2, which, like it''s younger brother is C-based, Valve has created a hybrid of C and C++, which attempts to simplify the C stuff.

A note, however -- I have NEVER made a mod. I''ve simply downloaded the DLL source (available for all three for free(?) somewhere on the internet) and found out how they work. I''ve chosen to base my system on Unreal, due to it''s OOP style.

Whilst it may be great to download these sources and steal their ideas and the code, you should be warned. Unless you''re crazy, you won''t need all the stuff they provide. I initially tried to mould my code into the provided source. THIS DOESN''T WORK! In order to suceed -- you need a pen and paper. Go through the source code, find out what you like, then write down the idea. Don''t steal code, particularly macros and assembler-optimized functions; instead, write down what you want it to do. Draw up class hierarchies, decide what you want to share between classes, and design your engine arround that. It''s no good stealing selected classes from the source, because you''ll break dependencies and mess everything up!

Finally, it''s a good idea to decide upon an API rather early on in the process for talking to DLLs. It doesn''t hurt to see what everybody else is doing (I''ve played with so many open-source projects that I need to make something of my own). Open up a commercial engine, see what you can do with it. Borrowing ideas is ok (IMO), but you need to have your own to make your engine viable.

Best of luck, and I hope this helps!

Simon Wilson,
XEOS Digital Development

Share this post


Link to post
Share on other sites
Clarifying your point xeos.
1)The Unreal Engine is NOT totally C++, most of it is coded in UnrealScript.
And
2)Half-Life was based off the Quake engine, not Quake2.

-Just had to be Anal Retentive.......


-Ryan "Run_The_Shadows"
-Run_The_Shadows@excite.com
"Doubt Everything. Find your own light." -Dying words of Gautama

Share this post


Link to post
Share on other sites
Sometimes I get a bit muddled up :-(

Unreal is based upon a very large C++ code base, and I know that it uses UnrealScript. I used it as an example, because it''s probably the best known engine which follows OOP principles. Even UnrealScript is somewhat Object-Oriented (AFAIK).

I was under the impression that Half-Life was based upon Quake 2, but if you insist... (technically, I am correct - Q2 is based upon Q1...)

If you''re looking for a good OpenSource example, look no further that http://www.gauge3d.org/. It uses a whole heap of neat stuff, from Smart Pointers to scheduling of engine events... and it has a plugin system, which you can modify to work as a mod system...

Simon Wilson,
XEOS Digital Development

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!