General Coding Discussion

OP
OP
H

Heoga

Well-Known Member
Joined
Oct 25, 2007
Re: Coding

Progress Report:

Servomechs
Still working on the HUD for the servomech, but I corrected an error in the view.cpp which allowed me to use the mech itself as a viewentity rather as resorting to a seperate point camera.  This has the added bonus of automatically shifting the PVS locations with the mech and so things are rendered correctly.


Alarm System
I've programmed an alarm box which on use activates itself and all other alarm boxes in the level.  At the minute it uses the keypad model, but I hope to build a simple model (a box should be within my capabilities) and two skins to go with it.  The first will be an inactive texture, and the second will be an active texture which is animated.
Update: This is now completed for the simple alarm box.  I want to include the alarm light within the same entity however so this will be modified slightly in the future.

I'll publish the required binaries and a sample map demonstrating the use of both over the weekend.
 

Cyberion

Administrator
Joined
Sep 22, 2005
Re: Coding

Heoga this is great news. I'm looking forward to see that code in use, this must be hell of the work...
 
OP
OP
H

Heoga

Well-Known Member
Joined
Oct 25, 2007
Re: Coding

The code so far for testing purposes:

You do not have permission to view link Log in or register now.


Some notes:

Extract the zip to your SourceMods folder and run the game from within Steam.

type "map demo" to begin a demonstration of the alarm box and servomech control code

You should start in the suit with a chemical battery, to upgrade battery type either "give item_fission_battery" or "give item_fusion_battery"

To start controlling the mech, walk up to the alarm light and use it, to stop mech control - jump.

Also included within this zip are all the models & textures from Jupix's repository, to use that map type "map jupix"

As for the model and texture of the alarm box, feel free to upgrade if you like.  Skin 0 is the inactive one, and Skin 1 is the active skin should you wish to replace this model.
 
OP
OP
H

Heoga

Well-Known Member
Joined
Oct 25, 2007
Re: Coding

Just an update.  I've done some additional work on the HUD for the servomechs and I now have most of the functionality implemented.  Some visual style changes could be done but that isn't a priority case at the moment.

I've also just bought a new computer so things will be a little slow in terms of updates until I have that up to speed.
 

Cyberion

Administrator
Joined
Sep 22, 2005
Re: Coding

Congrats on a new computer mate! We'll be waiting for the progress.


P.S. dsmn, have to find that time finaly to update modeling section of required items. damn damn damn....
 
OP
OP
H

Heoga

Well-Known Member
Joined
Oct 25, 2007
Re: Coding

Well, it's been a month and the computer seems stable and fully working (64 vista is a bit troublesome, but generally worth it).  I'm about to hit the coding again in the next month, but before I make a proper start there is a question we need to be asking.

Orange Box?  Yes or no.

The Orange Box SDK is still in beta, but the new features in it could give us a bit of an advantage.  I'd happily switch over, but it would be a bit counter productive if it turned out that you lot don't have episode 2.

So, go or no go.  Let me know.
 

Jupix

Well-Known Member
Joined
Oct 2, 2007
Re: Coding

Only the code would need to be ported from ep1 to ep2. If you're up to that, then you get no objections from me. Mappingwise the engine is backwards compatible.
 
OP
OP
H

Heoga

Well-Known Member
Joined
Oct 25, 2007
Re: Coding

Righto, the port is done.  I'm setup and ready to roll in the OB codeline.

- This morning whilst playing a little no remorse, I realised that parts of the game are somewhat dependant on your ability to see around corners.  To that end I've started implementing a "lean" system to allow the player to do exactly that.  Seems to be coming along nicely.  If it doesn't work as planned, it'll be quite easy to edit out as well.
 
OP
OP
H

Heoga

Well-Known Member
Joined
Oct 25, 2007
Re: Coding

Hate to make two posts back to back, but here goes anyway.

I've uploaded the latest build of the codeline to my server.  New features in this are:

  • Orange Box Functionality
  • Lean System (q for left, e for right)
  • Remote Mech control functionality (weapons not yet coded)
  • Alarm Boxes which can be deactivated (or activated) by the player
  • Alarm Lights which respond to the alarm status
  • Player becomes visible when viewing from an external source (currently a HL2 Prision Guard)
  • Some crude sample levels to demonstrate these capabilites
Download this full test build
You do not have permission to view link Log in or register now.
.  When downloaded extract the files to the SourceMods folder.

Also uploaded is a second zip which contains the FGD for the mod and a textfile containing the neccesary entries for the GameConfig file.  Download these
You do not have permission to view link Log in or register now.
.  Note: The GameConfig entry will need to be edited for your steam directory.

Testing

Load the Regret mod with -dev in the command line options to enable the console.  When the mod is loaded, type ` to open the console then enter "map demo_map" in the box.  This will load a simple map which demonstrates some of the functionality.  Specifically, there will be a button to your left which will activate the thermatron (breen model) in the room.  Press the use key (tab by default) to exit the mech.  There will also be an alarm box directly ahead of you which is turned off by default.  Using this will toggle the alarm on and off.
 

Cyberion

Administrator
Joined
Sep 22, 2005
Re: Coding

wow great. I'm going to check it. However I fear that only on thursday will have time. In business trip right now. Damn it.


Heoga, you are Da BEST!
 
OP
OP
H

Heoga

Well-Known Member
Joined
Oct 25, 2007
Re: Coding

whew, taken a while but I'm back up and running again.  All the code that got lost is back in place, so it's onwards and upwards!
 

Cyberion

Administrator
Joined
Sep 22, 2005
Re: Coding

This is what makes me feel positive! Great job! And thx God that everything has passed.
 
OP
OP
H

Heoga

Well-Known Member
Joined
Oct 25, 2007
Re: Coding

I've made a first mock up of a HUD for the game.  I've made a few small changes that I feel make it more useable for those familiar with source games.  The health and armor bars are on the left (source) rather as the right (crusader) and the opposite is true of the ammo.  I've knocked the weapon display out altogether as it should be shown in the player's hands anyway.  The inventory is located bottom centre as always, but I've not made any icons yet so there is nothing but a square box in it.  That said, in all other aspects it is fully operational and awaits only the code for specific items now.

 

Hellhound

Active Member
Joined
Nov 5, 2007
Re: Coding

Hey thats nice to see,
but i am asking myself: is there still any other progress ?
 

Jupix

Well-Known Member
Joined
Oct 2, 2007
Re: Coding

Fantastic work on that HUD, Heoga, I read about your hardware troubles and became worried, but I'm glad you got it all sorted.
 
A

Abyssary

Guest
Re: Coding

Yeah, superb work. That's definitely some progress. 

this makes me eager to get some work done myself. :)
 
OP
OP
H

Heoga

Well-Known Member
Joined
Oct 25, 2007
Re: Coding

Okay the security cameras are starting to come along now.  I have it so that they will scan around and look for the player.  What's more, when they do find the player they trigger the nearest alarm box and set off the alarm.  All this without the need for I/O connections.  Still to do with these is to fine tune their scanning speed to something that gives the player a chance as at the moment they have the vision of gods.  Also, I have to handle their death so that they spark and do a little animation.

On another note, I was looking over the entities in the first room as a guide for priorities and noticed the computer terminals were missing from the list.  I've had some ideas for these and I'd like to share them to see if people agree or not.

Okay so, my plan is to take the computer model and add an attachment point in the bottom left of the screen.  I can then attach a VGUI screen to this when the model spawns.  Now, if memory serves there are essentially only 6 kinds of computer terminal in the game

  • Security Terminals (closing off alarms)
  • Control Terminals (taking control of mechs)
  • Access Terminals (opening doors etc)
  • Viewing Stations (looking through cameras)
  • Hint Terminals (providing access codes)
  • General Stations (wec network experienced difficulties etc)
Now, my plan is to make 6 types of VGUI screen, one for each, but then for each screen have a large number of screens defined in text files.  When a screen spawns, it generates a random number, saves this number with save games so it's not lost, then uses the number to select a random screen from the possibilities.

The idea is to ensure that each time the mod is played, different screens get generated just to keep it a little interesting.
 
Top Bottom