That old HL mod of mine…
It’s a mess. At least it’ll stay so, until I revive it one day.
In 2015, I started working on my first (and only) Half-Life mod. I inconveniently called it Admer: The Game. Firstly, it wasn’t a game. It was a mod. Secondly, calling an entire mod after yourself is kinda self-centric. I eventually renamed it to An unknown game, which suited it a bit better. Still, it wasn’t a game. It was a mod. 😛
I canceled it around 2016 because of the following:
- I was an awful noob at programming.
It was a time when I had just gotten into C++. My only prior programming experience in 2015 was QBasic. And even then it wasn’t much, although I was able to create a text game in QBasic. It was pretty fun.
Essentially, I didn’t know about debugging, nor the basics of programming. My code wasn’t even mine – it was just pasted from tutorials I found on TWHL and Gamer-Lab RU. 70% of it wouldn’t compile, and 20% of what did compile ended up either not working in-game or crashing it.
- I was losing motivation to work on the mod, because of the above. And as my mapping skills grew, I also started realising how terrible my mod’s maps were. I was too lazy to fix them or redo everything from scratch.
- I was lazy. All my ideas were in my head, and I was too lazy to write them down. Fortunately, these ideas are still in my mind, just not in their original form. In fact, they’ve evolved for 3 years now.
And then, one day, I took a look at the mod’s page on ModDB. I remembered the old statistics of the mod. It used to have 10s, 100s viewers a day, and now it has 0 or rarely 1. It used to be on the popular mods list for Half-Life, too! It was a serious achievement for me back then. So it made me feel sorry. It made me want revenge. Revenge against my back-then lack of knowledge and skills. I’ll fight back. I’ve been preparing for that for years. Various skills of mine improved since then: mapping, texturing, modeling, music production etc. but there was one skill that stagnated, because I didn’t pay enough attention to it.
It was programming. In late 2017, I started panicking due to the fact that I knew I’d have Programming class the year after. So I wanted to prepare myself.
I just needed a good start. Something to jumpstart my learning. And it happened one day. In December 2017, a guy came into our classroom, recording a promo video for the high school. We were having IT class, and our professor told us to pretend to be programming, because the guy was apparently recording a programming class. The others just pretended to be typing by touching the keyboard after they opened a source file. But me? Hah. I’ve always been an exception. I was actually writing code after I looked at some simple examples done by the older generations.
When I returned home, I dug up a copy of VS 2010 Express so I don’t have to download it with my slow Internet, and I registered it, and I thought I’d make GMan killable.
Caption: Returned to coding
It was unbelievable for me. All that GMan was doing when attacked was this:
pev->health = m_iMaxHealth / 2;
The code is kinda self-explanatory. It just sets his health to 50% of his maximum health on every hit.
I showed it to my then 7-year-old brother and asked “How cool is that?” He laughed in disbelief and asked me “But how?”
I told him “Programming magic.”
Either way, that was just the beginning. The big stuff was just behind the corner. But due to school, I couldn’t focus much on programming so I studied. And whoa. Nearing the end of summer of 2018 (was finishing my 1st year of HS), I started working on my Useless Suite. More on that in a separate thread. But it made me learn quite a lot.
And then I soon tried going back to the Half-Life SDK, after Solokiller showed us folks, at the TWHL Discord, his own fork of the Half-Life SDK 2.4. It was modernised, player movement code in C translated to C++, made compatible with VS 2017, and a bit cleaned up. It sounded like a perfect baseplate for my mod’s code base.
So I started working with it. After months of working on my Useless Suite’s Wireframe engine, I got myself familiarised with A LOT of the C++ language (at least relatively a lot), so I started recognising a lot of things. I actually understood the HL SDK code for the first time, at least whatever I was looking at. String handling was still a mystery to me (I’ll talk about it in a future post), and so were some things. But, all in all, I was able to create new entities by myself.
I prototyped a function in AngelScript for Sven Co-op. It was called
viewsway, and it basically modified the player’s view in real time. Essentially, you could achieve drunk view bobbing with it, or a rocking ship effect, or intense tumbling and rotations, whatever you need as long as your parameters are right. It worked, and then I decided to translate it to the Half-Life SDK as an entity:
And it worked. To me, it meant a new beginning, a new age. An age of learning what I’ve always wanted to learn. Programming is powerful.
What I’m planning to do with this is finish the code base, add some dev assets for testing and maybe example maps and assets, and then to release it as a separate thing on ModDB. It’ll be sort of like Spirit Of Half-Life, but in a different flavour (and less crashing, I hope).
I’ll put up a brief to-do list here:
- fix the formulas for util_rotator’s secondary rotation option
- add separate intensities for X, Y and Z for env_viewsway
- story_choice and story_trigger
- add util_cvar
- implement FMOD
It’s going to be huge. I’ll hopefully revise and improve all of my old code as I write code for new things. After all, I’m still learning. But, either way, it’s one hell of a learning experience.
I’ll post some actual content about this in the next post, mainly a demonstration of the customisable HUD colours, and util_rotator.
- I was an awful noob at programming.
You must be logged in to reply to this topic.