Gamerules

Grab your favourite IDE and tinker with the innards of game engines

Gamerules

Postby WaterRatj on Wed Mar 09, 2011 9:26 pm

I'm new to SourceSDK and i'm really eagered to learn stuff for it so I can create a simple modifcifation for Source engine.

I would really love to make a new pair of gamerules based off the SDKgame rules, but there is nowhere a good example how to create a new gamerules (h+cpp file)

And I was hoping maybe someone can push me in the good directions.
The article on the vdw is not working and the minimal solution either.

hope someone can help me with this :D
WaterRatj
Member
Member
 
Joined: Wed Mar 02, 2011 1:45 pm

Re: Gamerules

Postby gladers on Thu Mar 10, 2011 7:40 pm

Edit the existing games rules.

What sort of new rules do you want to apply?
gladers
Member
Member
 
Joined: Sat Feb 27, 2010 2:53 pm

Re: Gamerules

Postby WaterRatj on Thu Mar 10, 2011 10:00 pm

I want new files for my gamemode (gamerules)

I've tried to follow that Valve developers wiki article to create new gamerules. but it seems not made for the scratch sdk.
even If i change the stuff to fit sdk I get errors.

I'm just trying to create two new files mygamemode.cpp and .h with a new gamerules seperate from the orignal one
WaterRatj
Member
Member
 
Joined: Wed Mar 02, 2011 1:45 pm

Re: Gamerules

Postby hekar on Mon Mar 14, 2011 10:39 pm

Luminous Forts already does this:

World.cpp was modified to support reading the gamerule type from the map.
GameRuleMaker creates the specified gamerule from the map type.
ClassicGameRules is a new gamerule derived from SDKGameRules.

Beware of networking, it can get kinda complicated with inheriting gamerules. I just put the variables ClassicGameRules needed into SDKGameRules to avoid the mess until I figure out a solution.

world.cpp
GameRuleMaker.cpp
ClassicGameRules.cpp
ClassicGameRules.h
hekar
Dumpling
Dumpling
 
Joined: Thu Dec 09, 2010 2:04 am

Re: Gamerules

Postby WaterRatj on Tue Mar 15, 2011 5:32 pm

I'll look into that, Thanks.

new to this all but eagered to learn all these things :D
WaterRatj
Member
Member
 
Joined: Wed Mar 02, 2011 1:45 pm

Return to Programming

Who is online

Users browsing this forum: No registered users