Journals

Captain P2 weeks ago2020-07-15 21:27:04 UTC 3 comments
For the past 2 months I've been working on a custom compile tool named MESS, short for Macro Entity Scripting System. It enables the creation of templates that can be instantiated throughout a map, and provides a basic scripting language for entity attribute customization. It works by modifying the exported .map file before the other compile tools get to process it.

I'm specifically designing MESS for the following use-cases:
  • Treating complicated entity setups as a single 'composite entity' that can be duplicated and customized without having to change entity names and other attributes in each individual entity.
  • Sprinking small func_details, models or sprites across a surface or area without having to manually place each object.
You can think of it as something like Hammer's prefab system, except that when you modify a prefab, all instances of it are updated as well, and that each instance can be customized by giving it different attribute values. The trade-off is that you don't get to see the actual result until after you run MESS on the exported .map file.

I used a very early version for my Buddy competition entry: the electric slug and teleporting enemy setups were created in separate template maps, and were inserted in the main map with a special macro entity. Based on that experience I decided to improve on it with a couple of other ideas. Hopefully I can create something release-worthy in a few more weeks.

Macro entities

MESS will provide the following entities:
  • macro_insert - Point entity. Creates a single instance of a template in a specific place and with a specific orientation and scale.
  • macro_cover - Brush entity. Sprinkles template instances across one or more surfaces (brush faces).
  • macro_fill - Brush entity. Sprinkles template instances within an area (inside a brush).
  • macro_template - Brush entity. Anything inside its bounding box becomes part of a template that can be used by the above 3 entities.
  • macro_remove_if - Brush entity. Used inside templates. Anything inside its bounding box can be excluded from an instance, if the removal condition is met.
Templates can contain insertion entities, so it's possible to create recursive templates. It's also possible to use other map files as templates. I'm also thinking about creating a custom .fgd system that lets you create your own 'entities', which act as aliases for insertion entities with specific attributes (e.g. an 'env_warpball' entity would be treated as a 'macro_insert' entity that references a 'warpball.rmf' template map).

Scripting system

Here's an example of how the scripting system works. Imagine a 'rat hunt' rat template that consists of a model, a func_breakable 'hitbox' and a trigger_relay that triggers something when the rat is 'killed'. The scripting system takes the attributes of the insertion entity:
macro_insert
targetname = super_rat
template = rat_template
health = 100
and makes these attributes available to all entities in the selected template:
trigger_relay
targetname = ratdie_{targetname} --> ratdie_super_rat
target = {target_on_kill OR 'ratcount'} --> ratcount (because the insertion entity doesn't have a 'target_on_kill' attribute)
delay = 0.5
killtarget = {targetname} --> super_rat
triggerstate = 2
func_breakable
material = 3
target = ratdie_{targetname} --> ratdie_super_rat
health = {health OR 1} --> 100
gibmodel = models/hgibs.mdl
cycler_sprite
targetname = {targetname} --> super_rat
model = models/bigrat.mdl
framerate = 1
Anything between curly braces is treated as an expression, and will be evaluated to produce the final attribute value. I'm also working on various utility functions, for things like fetching a unique instance ID or generating semi-random numbers.
I still need to finish up the scripting system, and each of the insertion entities requires some more work to make them fully functional, so it'll be a couple of weeks before I can release anything. Please let me know if this sounds interesting or useful, or if there are other tedious things you wish could be automated when creating a level.
Captain P12 years ago2007-08-31 17:01:29 UTC 1 comment
It's been well over a year since my last journal update here. It's already been 1.5 year ago that my best friend died. It's been almost 2 years since I threw out my last HL map, Trirena. Time really flies. Fast.

A month ago my mother died of cancer. You'd expect us to be shocked, but that wasn't really the case. We've had some time to get used to her absence, since she was in the hospital for the last half year. But most importantly, God has really helped us - and her - through. She was a great encouragement for us and for others, despite her grave situation, and now all of us - me, my father and my two younger brothers - experience a peace that's just not normal for such a situation. We've had a great time with my mother, she was a fantastic person, and we surely miss her. But we also know she's in heaven now because she accepted Jesus Christ, and we know we'll see her again after we die. And God doesn't just stop with these promises, he's also confirming them with this peace we have.
Captain P14 years ago2006-06-22 15:08:38 UTC 0 comments
User posted image
Rather than becoming a professional level-designer, it seems I'm becoming a professional game programmer. My new holiday job/internship starts coming monday. :)

Now if I'd only finish that template quad-tree for my rendering system and collision module...
Captain P14 years ago2006-05-17 13:35:07 UTC 0 comments
User posted image
Some may have seen it already, but I think it could be usefull to others as well:

I created a little tool that scans a .map file for texture scales. You enter the minimum and maximum allowed scale and the tool writes a report for you, showing which brushes (ordered by entity) offend those scales as well as a little more info on how to use this information.
Usefull when you get the annoying 'Bad Surface Extends' error.
User posted image
Here's the download. :)
Captain P14 years ago2006-04-22 13:53:03 UTC 0 comments
The funeral of my friend was today. It was a nice service and a good funeral. The sun started to shine when we carried the basket to the grave, and when the casket was lowered, two airplanes flew over the graveyard. My friend loved to travel abroad, so that quite nice to see actually. Over 200 people showed up, which is quite a lot taken into account he was only 28.

Funerals are never really fun or so, but this wasn't a real sad one either. Of course, we miss our friend, but he's with God right now and we'll meet him again after some decades. It's just weird that he isn't here anymore, and I still joke about him sometimes just to find out he isn't there to share the jokes anymore.

I'd also like to say thanks to those who PM'd me or commented on my blog entry - I greatly appreciate your encouragements. :)
Captain P14 years ago2006-04-17 14:02:56 UTC 0 comments
Captain P14 years ago2006-04-01 00:29:32 UTC 0 comments
User posted image
So, what's been going on lately?

Well, I've been busy with a little article project thingie for Half-Life lately. There's a little more to do but it'll be up and running soon.
Then, I've been working on mudanchee, spicing up the brushwork and creating some new models.
And lastly, I've also been creating a small php-based tool to help me manage my time by keeping track of projects and their tasks.
Captain P14 years ago2006-03-16 16:40:30 UTC 0 comments
User posted image
I'm back to work with dm_mudanchee. No new screens yet, but the map is about 80 - 90% finished. I'm currently doing some models and skins to up the detail level some more. There's also still some texture-art and brushwork (dismap work) to do. It's fun to get back at this. :)

On a side-note, I'm still doing map reviews for those that request them. I don't have the time to check every new map in the vault these days, but for those that request a review (or a bunch of comments, tips and links to reference material) I'm happy to serve one. :)

Which also reminds me, I should write articles about level-design. Would save me some time writing things again and again and fit nicely on my portfolio. :)

// Heh, personalizing your journal is fun. ;)
Captain P14 years ago2006-02-16 16:02:58 UTC 0 comments
User posted image
Ah, nice. I made some progress.

Programming progress that is. I just finished up a simple (and somewhat ugly) version of my .ms3d loader. The purpose is to use Milkshape models as collision objects, so only the vertices and faces have to be read in (face normals are generated by my code when they're put into a collision mesh object in memory).
Right now my program displays the values of every vertex as well as the vertex indices and the face normal of every face.

Next stage will be to create a full .ms3d loader, for the visual models. I'm going to limit it to static models only first, as I haven't really got an idea about how to handle the animations. We'll see about this later on.

Ok, code mode off. In other words, I'm able to process model files to use them in a game I'm writing. More on this later. :)

EDIT: We all like screenshots, right? Here are some:
Greenshaded view
Wireframe view
Captain P14 years ago2006-01-25 14:52:32 UTC 0 comments
User posted image
Portfolio update!

Finally. I haven't updated in ages. I've been way too busy with school and such lately. Anyway, I've added a screenshot of Trirena, a screenshot of a game a friend of mine is writing and for which I'm modelling.
I've also added some drawings and soon I'll put up some AI programs I made for school. And there's some articles planned, that basically are finished but not proofread and polished yet...
Captain P14 years ago2006-01-06 05:44:50 UTC 0 comments
User posted image
Shortly after Muzzle got his HLDM server, we chatted about it a bit and he asked me to do a map for it. I decided it would be a fun thing to do in this stressfull time, so I put together a map in a quick 5 hours. I used some style elements of an unfinished map I once made for the machinery compo (which was going to be called Pumpworkz) and textures from my never-finished map Sector Gamma (which I also used in The Playtest).

Anyway, here are some screenshots of Trirena:

1. One of the two small inside arena's
2. A shot of the RPG tower
3. The harbour as seen from the RPG towers lowest part

You can check out the map here. It's also in the current rotation of Muzzle's server, so you can check it out in action as well. Have fun!
Captain P14 years ago2005-10-25 12:36:15 UTC 0 comments
Captain P14 years ago2005-10-09 17:32:24 UTC 0 comments
User posted image
Mudanchee has now been playtested a few times, the last time with just over 8 players on the Snarkpit server. Thanks to ReNo both my and BlisTers map could be playtested almost instantly. :)

I've received valuable feedback on it and I've started tweaking the layout and weapon/item placement already. But despite some alpha bugs and weak points, I'm glad to hear the map plays really well and is a lot of fun. I'm anxious to see what my improvements will bring - more weapons, some layout tweaks and a few 'hidden' health vials and batteries should make it all even more interesting.

After that, it's going to be a lot of modelling and lighting tweaking for me. Sounds fun already. :)
Captain P14 years ago2005-10-04 12:01:52 UTC 0 comments
User posted image
Mudanchee is now in alpha stage. I'm about to playtest with some friends, I'll post some screenshots when we're done.
Just to let you know I'm working on getting it done... :)

EDIT: Here are the screenshots:
Screenshot 1
Screenshot 2
Screenshot 3
Screenshot 4
Screenshot 5

You can discuss them in this thread.