Jump to content

Creating a conquest-style gamemode


Recommended Posts

Posted

Hello good folk of the hub. 

 

I had an idea for a multiplayer game-mode type to put in Jedi Academy. Basically, it's like Battlefront's Conquest game mode, where you go and capture control points and try to hold them, and people spawn at the control points held by your team. Nothing that complicated conceptually.

 

I want to try to implement this in Jedi Academy myself. This will be my first attempt at actually creating something with the game's source code. I'm just not sure exactly where to begin. I have a fair amount of experience with Java (hold your noses) and I created an Android app, not to mention some other stuff which I've never shown here, so I'm fairly confident that I know how to code non-game stuff, and I want to start learning how to code games. 

 

Can someone at least point me in the right direction where to start to create a custom game-mode in Jedi Academy? Just loading up the project in Visual C++ is pretty daunting and I'm not even sure where to start.

Posted

Look for where GT_TEAM is defined, and add your gametype after that. I think it's bg_public.h

You may also have to change some things where it converts that number into the string you see in the menus etc. Just search for e.g. "TFFA" or "Team ". This might be in bg_misc.c, but most of it will be in cgame/ui - a good exercise to learn how to search through code =p

 

As for bases that you can capture, create a new entity type (look at g_spawn.c) with a "think" function that checks how many players are nearby.

You could also make it a box trigger: touching it would add you to the list of "people trying to capture me" and your think function could check if they've left the trigger (triggers don't have a "left the trigger" event)

 

Your think function will also have to check if the base has been fully captured, and add it to a global list of bases owned by team X.

Then in g_main.c where it checks the exit/end-game rules, see if one team owns all the bases (or the enemy's reinforcements are depleted)

 

 

 

...I know this, because I once started a Battlefront II mod with @Didz ='D

Didz and Smoo like this
Posted

I'm no expert but I'd use a map-object like the CTF-flags for the control points and then simply look for nearby clients with a findradius function.

eezstreet likes this
Posted

I believe the MBII team wanted to also implement something like this, but still haven't got around to it yet xD.

 

Yeah, "Conquest Mode", if memory serves me well.

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...