Boktor's Project


(Violator) #21

LOD groups are really for long distances so I’d just rely on portals indoors except for massive rooms.


(Scrupus) #22

The portals will mostly take care of indoor performance I think, but if you got huge indoor areas with lots of stuff it won’t hurt lodding there either. But LOD is in general more useful outside.

But just like in ET, lightning can be a huge performance eater, so better to optimize there first. Try to keep the number of lights to a minimum - better to spend some time putting them in optimal position for cool shadows and such, rather than adding them everywhere.

But if you got several objects scattered around, it can make sense to put them into a reference with a small LOD setup. I try to do this for everything, like crates and models that I use a lot. It’s easier to adjust the LOD setup (and also do other adjustments) in one reference, rather than on every instance. References is your friend!

Remember that LOD grouping is not only useful for distance filter - they got some other parameters that can be quite useful (for some objects), like the occlusionTest, collision model, instancing, and the shadow setup.

I don’t think I use any LOD groups for the “main” map (keeping them in refs instead), but I use a lot of editor groups in main - they are quite useful to hide and show stuff while you focus on something.

And thanks for the screenshot - can hardly wait to see what you “hide” there :slight_smile:


(Violator) #23

Also on lighting, try and avoid light regions overlapping as this can have a big performance hit.


(Boktor) #24

Update time

This is another shot of the main room. My plan is to have 5 or 6 objectives the Strogg need to destroy with infantry weapons in this area.
I’m still not sure on what to do about lighting. I’ve been looking up images of warehouse lighting to get ideas. The SDK provides a lot of good models I can use, but nothing is suitable
I want a dark ambient light like in the first shot (maybe lighter), but its too dark right now without light entities. The rest of the images have temporary ambient lighting so you can see better.

And here is what is behind the last images I took. You can see the entrance to the tunnel I first posted in the WIP thread.

And finally here’s what it looks like so far.


(Boktor) #25

Several things:
Does anyone know where I can get some good low-poly models for my map? Like I said I’m looking for a model to use as large light fixtures. I don’t know if I can come up with anything pretty out of brushes and patches.

Ignore the floating crane in the first set of images.

In Chris’ map Brinstar there are these cool-looking models that I want to use as the objectives. They look some sort of vehicle assembly bot, but they are similar to in-game Strogg deployables in shape and size. I think those would be perfect

I have ideas for drone vents and where to put them.

There will be some strategically placed mounted GPMGs


(light_sh4v0r) #26

I think there are some prefab light fixture models in the SDK? Did you find the model exhibition map? (forgot its name or location, but there is a map with every model in the SDK in it for easy browsing.)


(Boktor) #27

I looked through the map you’re talking about, but I didn’t find anything good. The light fixtures in the official maps are rather small. I want the large industrial lights like the kind in large gym ceilings.


I suppose if I really need to I can use brushwork since it will be fairly high up and far from players’ sight.


(Scrupus) #28

I think Chris has been digging in the models folder in the SDK for some of his constructions. For example look in models/structures/strogg/weapons/deployables/anti-personell, where you find the leg for the APT. There are some other bits and parts around, not a lot but with some creative use you should be able to build some new and interesting strogg-style machinery, like Chris have done.

About the light fixtures I guess you can search a bit on the free model sites, I don’t have any links at hand but pretty sure there are some. Maybe some of the prefabs or models from custom W:ET maps could work?

I think you should try using models rather than brushwork for those lights, but also note that you can easily export brushwork as model from EditWorld - Selcect->Export->Model. Not sure how good they will be tho, but worth a try?

I also remember when the SDK was released there was a guy who offered to build custom models for mappers. Don’t remember his name atm, but I’m pretty sure he built some stuff for Vio, which is used in the Estate map(s).

About the screenshots, the brushwork and design is looking good :slight_smile:

But I’m little bit worried about the size of the map, it might look a bit small. But if you aim mainly for smaller teams/comp style it’s probably ok.

Not so sure about damaging objectives only either - it haven’t worked too well in the few maps that have tried it so far, so I would keep the option open for alternatives until it’s been tested in “real combat”.

Anyway that’s just my personal opinion, so take it as such :slight_smile:

But i recommend to get some players to test it a bit before you add to much details, so you are sure the gameplay will work ok. A private test server can be provided if needed :wink:


(Violator) #29

That was my old clanmate Tront -

http://www.tront.co.uk/plugins/dallery_menu/

Feel free to use any of the models in Estate etc. For lighting I’d recommend the Stewart and Lloyd column with an AEI Amber 90w SOX lantern: http://www.tront.co.uk/download.php?view.43


(light_sh4v0r) #30

That lamppost is hardly functional in a industrial room.


(Runeforce) #31

Read this article. It might point to what you seek.


(Violator) #32

I know - it was an old joke between me and Tront ;). I would personally make the lights out of patches if they’re going to be high up, they don’t need to be very detailed. Note that Tront’s models are unskinned and pretty high poly so will need to be decimated (decimated and skinned versions of some can be found in the estate pk4) but are useful for rendering bump maps etc. in their original state.

Might be able to do something with this one -

http://www.tront.co.uk/download.php?view.47


(Boktor) #33

So still no script…

I have looked at many other map scripts, Mordenkainen’s old objective tutorials, and the SD edit wiki, but I am still confused.

I can create objectives by setting up entities with appropriate keys in the SDK and they will work in a devmap test, but that is the limit to my progress.

I must be missing some other pieces or files that enable the script to be run properly, because it seems like my scripts do absolutely nothing. Spawns don’t work, the game doesn’t end, etc.

I followed the Necessary Map Declarations tutorial, but it seems that there can be different interpretations of where files go. For example:

Here is a list of materials for assets created later on. Simply copy the text from the boxs below and save to materials/yourmapname.mtr

I have to run my SDK in administrator mode on Win7 so I have SDK 1.5\dev\base\materials and also SDK 1.5\base\materials. I also created SDK 1.5\dev\base\maps echbuster\materials where echbuster\ is supposed to be a prototype folder for the .pk4.

^This is just one example of my confusion with the instructions for mysterious files I must create and edit - In these cases I try to cover all possibilities, but still there is no progress.

This is a piece of one of the most simple scripts I have tried:

#define OBJECTIVE_TECHBUSTER_DESTROY_TECH       0

object mapObject_techbuster : mapObject_Default {
	void		InitObjectives();
	void		CompleteObjective( float index, entity p );
	void		StartFirstObjective();
	void		OnTechDestroyed();
	void		OnTimeLimitHit();

	handle	GetObjectiveMessage( float index );

	float		mainObjectiveIndex;
	entity	techDestruction;
        entity        gdfSpawnBase;
        entity        stroggSpawnBase;
}

mapObject_Base techbuster_MapScript() {
	return new mapObject_techbuster;
}

void mapObject_techbuster::InitObjectives() {

        sys.print( "*****LOADED TECHBUSTER SCRIPT*****" );
        sys.println("THE SCRIPT LOADED");

	gameRules.setWinningTeam( stroggTeam );
	gdfTeam.SetRespawnWait( 20 );
	stroggTeam.SetRespawnWait( 20 );
	CreateRespawnTimeThread( gdfTeam );

	techDestruction         = worldspawn.getEntityKey( "script_destroy_entity" );

        gdfBaseSpawn            = worldspawn.getEntityKey( "script_gdf_base_spawn" );
        stroggBaseSpawn       = worldspawn.getEntityKey( "script_strogg_base_spawn" );

        gdfBaseSpawn.setGameTeam( gdfTeam );
        stroggBaseSpawn.setGameTeam( stroggTeam );

	mainObjectiveIndex = OBJECTIVE_TECHBUSTER_DESTROY_TECH;

	thread	StartFirstObjective();

	objManager.setNextObjective( gdfTeam, mainObjectiveIndex );
	objManager.setNextObjective( stroggTeam, mainObjectiveIndex );


I have included a sys.print and sys.println “command” (if command is the proper word), but no text ever appears in the console, so I am convinced the script is not running.

I know this is a lot to put into one post, but please ask questions or give any advice that may shed some light on this for me. I have appreciated all the help so far.


(Donnovan) #34

Do you have the pakmeta.conf file on your map root?

Is you getting the messages on the sys.print lines on the console?


(Boktor) #35

Yes in my mapfolder is pakmeta.conf

It looks like this:


// Map Data

mapMetaData maps/sdk/techbuster {
	"pretty_name" "Techbuster"
	"mapinfo" "techbuster"
	"dz_deployInfo" "techbuster"
	"server_shot_thumb" "levelshots/thumbs/area22.tga"
	"show_in_browser" "1" 
}

The sys.print lines don’t give messages in console.


(.Chris.) #36

What does the following files look like?

mapinfo, techbuster.md
map.script not your specific map script but the file called map.script


(Boktor) #37

I have …/techbuster/mapinfo/techbuster.md

#include <mapinfo/mapinfo.include>

mapInfoDef techbuster {
  

	_default_mapinfo( "techbuster" )


	data {
		"mapLocation"			"maps/techbuster/location"
		"script_entrypoint"             "techbuster_MapScript"
		"mapBriefing"			"maps/techbuster/briefing"
		"campaignDescription"	        "maps/techbuster/campaign"
		"numObjectives"			"1"
		"mtr_serverShot"		"levelshots/techbuster"
		"mtr_backdrop"			"levelshots/campaigns/northamerica"
		"mapPosition"			"311 140"
		"snd_music"			"sounds/music/load1"
                "strogg_endgame_pause"	        "6.0"
		"gdf_endgame_pause"		"5.0"
             }
}

and I have …/techbuster/script/map.script

#include "script/maps/techbuster.script"

(.Chris.) #38

Try adding

#define OBJECTIVE_TECHBUSTER_DESTROY_TECH       0

object mapObject_techbuster : mapObject_Default {
        void		preinit(); //THIS
	void		InitObjectives();
	void		CompleteObjective( float index, entity p );
	void		StartFirstObjective();
	void		OnTechDestroyed();
	void		OnTimeLimitHit();

	handle	GetObjectiveMessage( float index );

	float		mainObjectiveIndex;
	entity	techDestruction;
        entity        gdfSpawnBase;
        entity        stroggSpawnBase;
}

mapObject_Base techbuster_MapScript() {
	return new mapObject_techbuster;
}

void mapObject_techbuster::preinit() { 
} //AND THIS

void mapObject_techbuster::InitObjectives() {

        sys.print( "*****LOADED TECHBUSTER SCRIPT*****" );
        sys.println("THE SCRIPT LOADED");

	gameRules.setWinningTeam( stroggTeam );
	gdfTeam.SetRespawnWait( 20 );
	stroggTeam.SetRespawnWait( 20 );
	CreateRespawnTimeThread( gdfTeam );

	techDestruction         = worldspawn.getEntityKey( "script_destroy_entity" );

        gdfBaseSpawn            = worldspawn.getEntityKey( "script_gdf_base_spawn" );
        stroggBaseSpawn       = worldspawn.getEntityKey( "script_strogg_base_spawn" );

        gdfBaseSpawn.setGameTeam( gdfTeam );
        stroggBaseSpawn.setGameTeam( stroggTeam );

	mainObjectiveIndex = OBJECTIVE_TECHBUSTER_DESTROY_TECH;

	thread	StartFirstObjective();

	objManager.setNextObjective( gdfTeam, mainObjectiveIndex );
	objManager.setNextObjective( stroggTeam, mainObjectiveIndex );


Also this script you posted is incomplete but guess you cut rest of it out.


(Boktor) #39

I tried adding everything in techbuster.script to map.script (not overwriting the 1st line) but it doesn’t look like it worked. And yes, that code I posted was only part of the complete techbuster.script

Should I do something to main.script? When I start my map in the SDK the console says
Initializing scripts Compiled ‘script/main.script’: 4611.5ms

In mordenkainen’s tutorials it says to add the line #include “script/maps/techbuster.script” to main.script, but this is for older versions of the SDK. I read that in 1.4 that the line should be added to map.script. I have done both…


(Donnovan) #40

Why you have the “/sdk/” thing on this line “mapMetaData maps/sdk/techbuster }” of your pakmeta.conf?

Your map files (procb file, cmb file, world file, etc…) are not inside the “maps” folder?