GoldenEye: Source Forums

  • December 03, 2024, 06:17:44 pm
  • Welcome, Guest
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: March 11, 2008 - Gameplays and LUA  (Read 23965 times)

0 Members and 1 Guest are viewing this topic.

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
March 11, 2008 - Gameplays and LUA
« on: March 12, 2008, 05:28:03 am »

Killer Monkey here, I am taking over Anthony's blog for today since I just made a significant step in coding. I have FULLY implemented LUA game modes! Thats correct, it has been extremely difficult, but with the help of Scott's base code I was able to do it over the past 5 days. In order to achieve this, I employed the following schematic:



As you can see, the classes at the top are CGERules, CGEPlayer, and Gameinterface. These three classes are what the server uses to define the playing of a game.

CGERules are logical functions and events that are called and can be acted on. In these calls, CGERules calls functions from CGELUAGamePlay that interfaces with LUA. In the absence of any defined LUA functions, it happily goes about what it would do normally (IE NO GAMEPLAY). When the rules are created at map load, the LUA classes are also loaded into memory using the helper classes CGEGameModeSystem and CGEGameMode. These classes store the various LUA gamemodes that are detected in the 'scripts/gameplay/' folder. During a course of play any gamemode can be loaded at any time and it will restart the round and start every player on a clean slate!

CGEPlayer calls CGELUAGamePlay to get definitions that affect the player, such as whether or not he should respawn, his current armor/health level, and how many times he died (in this case for YOLT).

GameInterface is where all the magic begins. This is called upon initialization of the server dll and calls the CGELUAGamePlay's init() function that loads LUA. That means LUA remains loaded until the server is shutdown making level loads highly efficient and also maintains stability between map sessions by remembering your last Game Mode and reloading it for you.

Finally, all you, the server owner, has to do is create a .lua file and .txt file that defines the gameplay for the parser. The LUA file will contain the functions called by CGELUAGameplay, you will also have access to a plethora of Call Back functions defined to set and retrieve data necessary to modify the gameplay. All of this code is server side, the only thing the client will see are UserMessages to update their HUD/VGUI windows!
Logged

Anthony

  • GES Plugin Coder
  • Secret Agent
  • **
  • Posts: 74
  • Reputation Power: 0
  • Anthony has no influence.
  • Offline Offline
Re: March 11, 2008 - Gameplays and LUA
« Reply #1 on: March 12, 2008, 05:29:47 am »

Well done mate :]
You are always welcome to blog here.
Logged

Loafie, Hero of Dreams

  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 4,066
  • Reputation Power: 1
  • Loafie, Hero of Dreams has no influence.
  • Offline Offline
Re: March 11, 2008 - Gameplays and LUA
« Reply #2 on: March 12, 2008, 06:21:46 am »

gaddam i wish i had a fucking clue what you were talking about
Logged
maps in production: ge_temple maps released: ge_caves, ge_complex, ge_complex_classic
Quote
Loafie, Hero of Dreams is watching Big Love
fourtecks: you are watching basstronix?

Jonathan [Spider]

  • Retired Lead Developer
  • 007
  • *
  • Posts: 1,740
  • Reputation Power: 1
  • Jonathan [Spider] has no influence.
  • Offline Offline
    • Jonathan Scott Art
Re: March 11, 2008 - Gameplays and LUA
« Reply #3 on: March 12, 2008, 07:37:06 am »

generally i read the programmer things, and just nod my head and pretend to understand. but i actually think i got this this time haha.

hey this means we get to play with trying out a lot of game mods without breaking the core code too since its all done through scripting.
Logged
Fonfa
"making out with ugly girls builds character"
"getting the ugly girls then the pretty ones makes you feel like leveling up in an rpg game"

SLX- i'm having a problem
Spider2544 - if you need me to bury a hooker, i can be there in 20 mins with my shovel
SLX - bring condoms

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: March 11, 2008 - Gameplays and LUA
« Reply #4 on: March 12, 2008, 05:22:13 pm »

Correct, I am working on a simpliler and more direct model for the Wiki, don't worry LoFi :)
Logged

Mike [fourtecks]

  • Disregard KM, acquire death threats.
  • Retired Lead Developer
  • 007
  • *
  • Posts: 1,734
  • Reputation Power: 19
  • Mike [fourtecks] is working their way up.Mike [fourtecks] is working their way up.Mike [fourtecks] is working their way up.
  • Offline Offline
Re: March 11, 2008 - Gameplays and LUA
« Reply #5 on: March 12, 2008, 06:01:48 pm »

gaddam i wish i had a fucking clue what you were talking about
Logged
ge_facility, ge_facility_backzone, ge_control

Jeron [SharpSh00tah]

  • Level Designer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 3,004
  • Reputation Power: 53
  • Jeron [SharpSh00tah] has an aura about them.Jeron [SharpSh00tah] has an aura about them.Jeron [SharpSh00tah] has an aura about them.Jeron [SharpSh00tah] has an aura about them.Jeron [SharpSh00tah] has an aura about them.Jeron [SharpSh00tah] has an aura about them.Jeron [SharpSh00tah] has an aura about them.Jeron [SharpSh00tah] has an aura about them.Jeron [SharpSh00tah] has an aura about them.Jeron [SharpSh00tah] has an aura about them.
  • Offline Offline
Re: March 11, 2008 - Gameplays and LUA
« Reply #6 on: March 12, 2008, 08:26:13 pm »

gaddam i wish i had a fucking clue what you were talking about
Logged

Complete: Ge_Runway (now under care of CC Saint); Ge_Caverns // W.I.P.:Ge_Streets; Ge_Depot; Ge_Train;

mbsurfer

  • Inactive Tester
  • 00 Agent
  • ***
  • Posts: 794
  • Reputation Power: 41
  • mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.
  • Offline Offline
Re: March 11, 2008 - Gameplays and LUA
« Reply #7 on: March 12, 2008, 10:13:33 pm »

 :o LUA is probably the simplest of codings to learn starting out.  This is definitely a big step, and I expect to have a shit load of game modes made by the community, and not just the developers!

Thanks goes out to all who made this possible!
Logged

Sean [Baron]

  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 6,752
  • Reputation Power: 2
  • Sean [Baron] has no influence.
  • Offline Offline
    • GoldenEye: Source Official Site
Re: March 11, 2008 - Gameplays and LUA
« Reply #8 on: March 12, 2008, 11:18:59 pm »

Thanks goes out to all who made this possible!

Your welcome. I take full credit for all this work.... :P Just kidding Killermonkey and Anthony. Great job guys! :)
Logged
/Sean "Baron" Stock
Director
sean@goldeneyesource.net

mbsurfer

  • Inactive Tester
  • 00 Agent
  • ***
  • Posts: 794
  • Reputation Power: 41
  • mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.mbsurfer is a force to reckon with.
  • Offline Offline
Re: March 11, 2008 - Gameplays and LUA
« Reply #9 on: March 12, 2008, 11:49:15 pm »

Thats correct, it has been extremely difficult, but with the help of Scott's base code I was able to do it over the past 5 days

And Scott ;)
Logged

Doc.NO

  • 00 Agent
  • ***
  • Posts: 836
  • Reputation Power: 0
  • Doc.NO hides in shadows.
  • Offline Offline
Re: March 11, 2008 - Gameplays and LUA
« Reply #10 on: March 14, 2008, 11:21:18 pm »

LUA rocks :D It's good to see things are in progress.
Logged

CCsaint10

  • Nickname: "Saint"
  • 007
  • ****
  • Posts: 1,560
  • Reputation Power: 71
  • CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!CCsaint10 is awe-inspiring!
  • Offline Offline
Re: March 11, 2008 - Gameplays and LUA
« Reply #11 on: March 17, 2008, 04:51:34 am »

I've been really enjoying these blogs anthony and killermonkey..PLEASE keep them coming so I can hear how progress is going :)
Logged

Brings back memories, doesn't it? :D
Pages: [1]   Go Up