Jump to content
  • Advertisement
Sign in to follow this  
abbajane

help with understanding the source engine's structure

This topic is 4187 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i need some basic help to get started. i can't even find a main cpp file or its assumed main function that launches the game. i want to start learning from there. can anyone point me to it?

Share this post


Link to post
Share on other sites
Advertisement
I don't think what you have is Source Engine. That thing costs a lot of money, and comes with support. To the best of my knowledge that's the only place where you could get the "cpp" files.

The only way one could do something with the engine would be through modding, but that's a different story altogether.

Share this post


Link to post
Share on other sites
Quote:
Original post by Antheus
I don't think what you have is Source Engine. That thing costs a lot of money, and comes with support. To the best of my knowledge that's the only place where you could get the "cpp" files.

The only way one could do something with the engine would be through modding, but that's a different story altogether.


Not so different.
You get access to the Source SDK if you buy HL2 or any of a handful other games from Valve. And that has plenty of cpp files

However, to answer the question, the best I can do is...
"Structure? What structure?"
Don't make that kind of assumptions about Source. It is an undocumented mess. The way to get things done is to hack your way through it, and the way to find things is through creative text searches. (If you want to know where console commands are processed, search for a console command enclosed in quotes)

What documentation there is, can be found at developer.valvesoftware.com. They have a wiki containing a lot of tutorials to get you started, and nothing you can use as reference once you've gotten started.

There isn't a main function though. The engine is launched, and that loads your mod dll's, and calls functions in those.

Share this post


Link to post
Share on other sites
Don't mind me saying so, but if you are just getting started with programming, you might want to take a look at something a bit smaller than the source engine. Chances are, you will see more scripting type stuff and a little bit of game related code, as opposed to the whole structure of the engine. The source engine, like most other game engines, is a monster. Try a little hunting around for articles on game engine structure. There are plenty of interesting articles out there on the subject.

Share this post


Link to post
Share on other sites
i'm not new to programming, but i have so many holes in my experience that i can barely understand how each part of the source sdk relates to another at the moment. it just feels like i have a huge block for it. and there's my inexperience with visual studio 2005/ not a great feeling, but nonetheless i have to do it.

Share this post


Link to post
Share on other sites
the sdk wiki is so scattered, too. my first mod is only good for learning to properly build the source. feels like i have no place to start.

Share this post


Link to post
Share on other sites
yeah, i have a background in c++. and i guess the entity tutorials are where i need to start, instead of putting my head in my hands and giving up.

Share this post


Link to post
Share on other sites
I myself had a difficult time trying to find where the variable for ammo counts was stored. It seemed each weapon that used the cone of fire (the MP7, Pulse Rifle, Handgun) had a completely different layout for its code, when their functions are not very different. Such as that I postponed any source modding until I build my next PC.

M.

Share this post


Link to post
Share on other sites
well those entity tutorials are the vaguest tutorials i've ever read and they aren't really updated properly.

anyway, source engine must have at least a main game loop and a main rendering loop, right? can anyone tell me where they are?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!