How hard is programming for Source?

M

MentalSentinel

Guest
Hey all,
I'd like to get into coding with HL2, but I'm unsure what is needed to do it.
I know C++ and some APIs that have no relevance to HL2 (Win32, OpenGL).

My question is: If I were to add a weapon, how far would I have to go? Do I need to edit the source code or is there a scripting engine involved in this?
If I were to edit a character to attack me with a knife and dodge and block my attacks, how far would I have to go?

Anyway, my compiler is Visual C++ 6.0 Enterprise. I hope that'll do.
 
you do not need visual studio .net 2003. Visual Studio 6.0 Enterprise edition
is working for me after installing a patch. I use the Singleplayer SDK. do not
know if the Multiplayer SDK is working too or if there is a difference.

Cu Thrill
 
I'm sure that if you understand the complexities of OpenGL and Win32 you shouldn't have much trouble adapting to Souce (it may take you a few months to learn the in's and out's though... But that is like any new large project you get :) )

For best results you should use VS.net 2003 like crackhead said. But as long as it compiles fine, it should be alright.
 
it doesnt cost much. im no expert so i wouldnt want to get problems by not using vs2003 thats just my opinion.
 
Another question,

How do we change/add a font that we can use in (for example) the main menu, to replace the HALF-LIFE² sign? I tried a normal font downloaded on a font website. When I code it that way the main menu should use it, the text gets displayed in veranda. Hows that?

I also noticed the fonts Source uses are around 50 kb, and many other fonts downloadable are about 100+ kb.
 
Cypress said:
Another question,

How do we change/add a font that we can use in (for example) the main menu, to replace the HALF-LIFE² sign? I tried a normal font downloaded on a font website. When I code it that way the main menu should use it, the text gets displayed in veranda. Hows that?

I also noticed the fonts Source uses are around 50 kb, and many other fonts downloadable are about 100+ kb.

I'm pretty sure it has to be a TTF font. Not positive, but pretty sure.
 
Yep, it's a TrueTypeFont. Unfortunaly it isn't showing up..
 
are you following the tutorial on hl2world . net? its never worked for me before. it used to work i think maybe valve stopped it working?
 
hey thanks!
I searched for the tutorial, followed it and now it works perfectly!
Thank you..

Another question: If i will change the camera to Third person, how will that work out? Will I see two floating arms wich i can control in third person? If yes that means we have to implant a full modelled male and let him do certain animations (like walk)?
 
There is no Gordon model, so if you switch to third person you'll be controlling an invisible character.
 
Cypress said:
And how can i play music in the main menu?

Good programmers are capable of figuring out these things on their own. When they can't figure them out they go on the web, or open up a book, and find the information they are looking for. If you can't do either of those two things you are in trouble. Change or attitude or you won't get far as a programmer.
 
Yeah like you said, Good programmers. I'm not, i'm new to the source engine. I have modded Max Payne 2 for years now, so it's all new to me. Source is not a easy engine to mess with, like you said i have started to search some help on the webs. But excuse me..
 
if you want an example of a third person code without a player model. in the console type sv_Cheats 1. then thirdperson. then cam_Idealyaw 0 or something. mess around with either the pitch or yaw. if this is for a multiplayer game then you can do it easily. not so easy for single player.
 
the source code seems fairly easy to me, and I had never even heard of coding before hl2. without any knowledge or training in coding of any kind, I have successfully coded a mod with these features:
1: friendly fire. ( shoot at civvies and barney and gman and alyx, and all the rest.) and if you hit them, they shoot back
2: added three different assault rifles, 8 different hand guns and three different smg's, including anims, sounds, ejecting cases in the correct sizes( pistol cases for pistol, rifle cases for rifles)
3: stopped empty shells from fading away as well as broken glass, also doesnt fade away
4: added 25 extra citizens (now male_01 up to male_25 and female_01 up to female_20)
5: added 10 new combine soldiers
6: implemented the driveable heli code, so as to pilot the huey model I made.

this all in a sp mod

if anyone wants the code for any of these features, I'd be happy to upload
 
naaier said:
the source code seems fairly easy to me, and I had never even heard of coding before hl2. without any knowledge or training in coding of any kind, I have successfully coded a mod with these features:
1: friendly fire. ( shoot at civvies and barney and gman and alyx, and all the rest.) and if you hit them, they shoot back
2: added three different assault rifles, 8 different hand guns and three different smg's, including anims, sounds, ejecting cases in the correct sizes( pistol cases for pistol, rifle cases for rifles)
3: stopped empty shells from fading away as well as broken glass, also doesnt fade away
4: added 25 extra citizens (now male_01 up to male_25 and female_01 up to female_20)
5: added 10 new combine soldiers
6: implemented the driveable heli code, so as to pilot the huey model I made.

this all in a sp mod

if anyone wants the code for any of these features, I'd be happy to upload
Naaair I would love to see your code :D
 
which part? be specific, it would be a bit ridiculous to post everything
 
naaier said:
which part? be specific, it would be a bit ridiculous to post everything
huh? I thought you were going to post a zip file with code -- I don't suppose you wrote Gigs of code...

Anyway.. I am interested in seeing you how got that helicopter to work.:imu:
 
here is a link to the strider mod code http://strider.hl2spain.com/ I took this and all references of quahelicopter to hueyhelicopter and changed a few other small things, but this was the base I used. its for mp, but if you put the ccp's in the sp folders ie hl2_hud as apposed to hl2_mp, it'll work for sp
 
u meen cpp :D im not beeing nasty but you said source code is easy but the complex this of the list you gave was actualy someone else's code.
 
The Strider mod (the one written by the Spanish guy) has been around for almost as long as HL2
 
crackhead said:
u meen cpp :D im not beeing nasty but you said source code is easy but the complex this of the list you gave was actualy someone else's code.

yes, cpp, spelling error.

"implemented the driveable heli code" is exactly what I said, not wrote the code. and everything else is an adaptation of existing code. the point being that it is coded by someone who has no training whatsoever in coding. to get freindly fire working in sp, should I write new code? when you need only alter a few lines of the original code? to add extra citizens should I write completly new code? or rather just add the required lines to the existing code? and the same applies to the rest that I have done. if this was an AAA class game, and not a modification, and modification is the operative word, it means to modify, then yes, for sure it would have to be original code. but then even hl2 is not original code, its modified quake code, so we come full circle, hl2 is in fact someone else's code.
 
naaier said:
but then even hl2 is not original code, its modified quake code, so we come full circle, hl2 is in fact someone else's code.
hehhe woah woah woah hold the bullshit train son. hl2 was made by valve from the ground up however HL1 was based on the q3 engine.
 
not q3, Quake. As in the original.
 
valve purchased the quake 2.5 engine. this was their base from which hl/hl2 was born. there are too many similarities in the hl code and hl2 code for hl2 to have been a "ground up" build.
 
What? You're just making things up now. Valve licensed the *Quake* engine. Not Quake 2, or Quake 2.5 (whatever that may be). They then added and rewrote sections so that ultimately, it was over 70% Valve code.

HL2 was built more or less from scratch, but some older code was reused. Why? Because it works. No point in reinventing the wheel. Certainly the major parts of the engine were new (renderer, networking, physics, Steam integration etc)
 
"HL2 was built more or less from scratch, but some older code was reused. Why? Because it works. No point in reinventing the wheel."

that is exactly my point.
 
New engine code, reused code in the DLLs that mount on it. Exactly as Pi said.

-Angry Lawyer
 
I thought they used the Quake 2 engine for Half Life, albiet heavily modified. Guess not though.

Yay for learning new things.
 
yeah i thought so. and they gave it a good oiling too didnt they?
 
Back
Top