Source Engine
Introduction
My experience with the Source Engine has been an interesting one. Initially, I grew a liking to it due to its simplicity but the more I used it, the more I realised how limiting the engine is.
With that in mind, here's my process for creating the scenario
Importing Assets
Source game engine doesn’t have any marketplace where you can directly install assets from. It mostly relies on using the entity tool and using the class to create a prop_static. This is a great way to use any asset from the in-built engine, but the assets depend on the game you have installed. So, in my case since I have CS:GO installed I can use assets from that game, if I were to install Portal 2 I would then gain access to those assets. So, the game engine alone doesn’t have any assets to begin with.
Another way you can use models is by importing them. Importing custom models is difficult and I personally recommended against, I’ll show why. To import custom models, you need to download an .obj file import it into blender. Download a plugin for blender which allows you to export the object as a .smd file. Using a custom script, I found in a tutorial you want to point the .smd to the location of the other props. You need to create a new folder within the CS:GO directory for the object and then change a readme file so that folder that you created can be read by the game. After doing all this you want to install Crowbar to compile the object into your game. Having successfully done this, which is quite hard and takes a few tries. The object is then in your environment.
I looked into applying textures for the imported 3D models, but I was greeted by more 3rd party software and more of a hassle so I decided that is was as far as I was going to go with importing assets. It’s best to stick with the in-game assets.
Ratings for Importing Assets
Importing Difficulty: 5
Difficulty of Use: 2
Changing Terrain
To create the floor for our level we want to use the block tool again and create a surface that covers the bottom of the cube. We will then go to textures and search for grass. We then use the apply current texture on the left to give the floor a grass texture. A thing to keep in mind all textures in Source engine are flat and don’t contain any depth.
Since we’ve established it’s not worth while importing models, we’re going to use pre-exising ones. For this I will get the entity tool and turn them into prop_static. Navigating to World Model then clicking browse, comes up a catalogue of assets that you have installed. I’m going to search for Tree and click apply. This should change the entity to tree that’s now visible across the different view modes.
Editing terrain is quite straight forward, click the face Toggle Texture application and a menu comes up. You want head over to displacement and create geometry.
You can then head over to Paint Geometry and you can paint to create your terrain. There’s a few important settings you should keep in mind.
Firstly the radius is quite important so when you’re working with small areas you want the radius brush settings to be as low as possible so you don’t affect the surrounding area.
You can choose to either raise/lower the terrain as well as raise to a certain level using the distance slider, this works by left-clicking to raise and right-clicking to lower
The smoothing tool is useful as you can currently see that I haven’t used the smooth tool so the entire terrain looks jagged. If a surface is too jagged a player may not be able to move up the surface.
Ratings for Changing Terrain
Importing Difficulty: 2
Difficulty of Use: 4
Modifying Audio
Working with audio was problematic for me in the beginning. I had to watch a few tutorials to get me started but since most tutorials are old, I struggled to get audio to work.
Since all audio clips are packed as a .vpk file, a lot of tutorials took me through a complicated way of using 3rd party software to unpack the .vpk file, add my sound then compile it back into .vpk file. This process was far too complicated for what it needed to be so I didn’t proceed with it.
I eventually figured out how do achieve how to import audio into my environment. To begin I had to create the folder not in the source engine directory but in the games directory. Which went as:
C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo
Under that directory you want to create a folder called “sound”. It’s important its only sound and not sounds, otherwise it will not work.
For the folder to work correctly, you need to scroll down until you find a text file labelled “gameinfo” this is where you copy one of the previous search paths and change the end to sound. This points the game to look in that folder and discover your sounds.
Now that the hard part is done, you can simply drag MP3 and WAV files into the folder. Things to keep in mind, a WAV file can be previewed in the game engine and has the ability to be looped. This would be good for things like ambient sounds.
MP3 however, aren’t capable of preview nor looping so the capabilities are slightly limited. MP3 files are small in size so they won’t take up as much space. So when you’re working with a lot of sounds, its best to use MP3 which would helping loading times.
No matter the file type, the maximum length of an audio clip is 6 minutes and 20 seconds. Like I said before looping can overcome this issue but only with WAV files.
Once you’ve hopefully, successfully set everything up, you can add an entity on top of the fire and set it to ambient_generic. After applying, you want to click sound name, then browse. This where you can find the file you added to the sound folder.
For my fire, I downloaded a fire WAV sound and which I placed in the sound folder.
I set the audible distance to 515, which isn’t too far as the map was small. So the closer you get to the sound the louder the fire gets.
Like mentioned before I was again having trouble with moving the different elements of the campfire as they were stacked on each other.
As far as applying effects onto sound, you’re quite limited and you can only change basic options such as volume, pitch, distance and spin up & down time. You would be better of applying effects before importing the sound.
Ratings for Modifying Audio
Importing Difficulty: 4
Difficulty of Use: 2
Altering Particles & Effects
Creating the fire was fairly simple. I dragged an entity on top of my campfire. Changed the class to env_fire which changed the entity to a fire. The fire comes with pre-defined properties that I can alter.
Similar to properties the source engine uses flags as attributes for entities. As an example for the fire we have features such as infinite duration, smokeless and delete when out.
At the current moment in time I only want infinite duration for testing purpose, I will come back to these flags for when I add interactivity with the player.
As we saw with the fire settings, there wasn’t much customisation when it came to particles. The in-built fire entity can only be altered slightly.
To work with the particles I had to add a env_smokestack which created a smoke which I placed on top of the campfire.
With the smoke created, I had more freedom to control the fires smoke. When I say freedom, I mean I am able to change a few more options. I find the pre-set options available to me quite limiting and it requires a lot of work to get adventurous with the particles.
One thing I heavily dislike is that there is no layer selection, so the only way to select an entity is to click on them on the different views. This proves to be problematic as I already have 2 entities on top of my campfire and it’s difficult to click the right one and often I find myself selecting the wrong object.
Ratings for Altering Particles & Effects
Importing Difficulty: 1
Difficulty of Use: 3
Configuring Item Attributes
The main goal now was to figure out a way to put out the fire. I couldn’t find any information online about how to pick up custom items, let alone using them.
The only way was to use the in-game items that you can already pick up, which are guns. I didn’t like this direction because I knew the engine is limited and I couldn’t make changes to the gun nor the bullets.
To work around this I added a fire extinguisher prop to the map. In the flags menu I checked start disabled and to be disabled by touch.
I start it disabled so a player doesn’t walk into it by accident and for the player to use the fire extinguisher they simply need to walk into it.
The zone I created around the camepfire enables the fire extinguisher so it’s visible. Going into the fire extinguisher output settings, I set it so that when a player walks into the fire extinguisher it turns of the fire, smoke and the fire sound.
Ratings for Configuring Item Attributes
Importing Difficulty: 3
Difficulty of Use: 1
Final Overall Scores
Importing Difficulty Rating: 2.6
Difficulty of Use Rating: 2.8