Dear returning Carmageddon fans Image

These last years, the CWA Board assimilated what was archived from many old Carmageddon forums, including the whole of the Official Carmageddon.com Forums.
If you wish to merge any previous account you might have had with your new or existing CWA account, don't hesitate to reach out to us !

Advanced C2 map/car tricks galore (physics, modeling, misc)

The greatest unfinished sequel ever!
Post Reply
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Advanced C2 map/car tricks galore (physics, modeling, misc)

Post by C2 Scientist »

Hey all,

Not sure if this thread will come very popular, but we'll see. :smile: So if you've come up with some kind of clever trick relating map making (useful or not), feel free to share it here. It can be about physics, graphics, modeling, or something else. I'll post one to start with, and will be adding some more over time as I find my old notes.

=====================================================================================

Image

"Perpetual motion machine" / engine

I'll give credit from this one to Toshiba, as it's pretty similar to the crushers in his arena map. It's not completely the same thing though, this generates its own movement, and could be used to power up something else.

So here's how this works. The red part rotates around, it's using a ball joint. It's also set to not collide with world walls. The green part is limiting the movement to a single axis, because otherwise, a ball joint would swing into every possible direction. The black marbles are contained between the blue tubes, inside of a circular volume. The red part moves the marbles as it hits them, but inside the yellow zones things are a bit different. The yellow zone has heavily increased gravity, which causes the small marbles inside it to increase the rotation speed of the red part. The red part gains more speed, moves the next marbles into the yellow zone, and the same goes on and on. All friction forces are nullified, to minimize any loss of speed. It should be possible to have two separate BBoxes for the red part, far away from each other. This way you can locate this machine far away for something that needs to be powered up. (but it requires that this engine is located directly to either side, I think)

Next I'll try to post something more useful. :smile:
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re:

Post by C2 Scientist »

Thanks for the feedback. :smile:

As for optimizing... if you properly seal the chamber for the marbles, I think you could replace them with a simple, single wireframe point. (zero-dimensional) First I thought of the sphere BBox, but a simple point is a better choice. If the chamber isn't properly sealed, though, the simple points can fall through even the tiniest gap at any edge.

=====================================================================================

Image

Smoothly animated traffic lights (without a lot of animation frames)

Start by creating the box for traffic lights, and texture it. Then use your image editor to cut circular holes for the lights in the texture image. Next, create a flat plane that matches the width/height of the box, and move it just behind the front of the box, inside it. Now look at the plane on the far left. See those colours? Create a similar image. To get the smooth transitions between the different colour phases, use your image editor to blur the horizontal edges of each color. When done, apply the image into the plane you just created inside the box, UV-mapping it from the either side, but not from front/back/top/bottom. Then use the UV-mapping editor shrink the width of the mapping rectangle to zero. The rectangle will be shrunk into a simple line - just make sure that it's straight up, and that its height matches the height of the colourful texture. The mapping should now look similar to the tall plane in the image. Now just move the line horizontally to where you'd like the animation to start from. (red, red/yellow, green, or yellow) Write down the name of the colourful texture, go to the "funk"-section in your track's textfile, and make a horizontally rolling texture out of it. Adjust the rolling speed to your liking.

You now have smoothly animated traffic lights to one direction. For the crossing roads, you'll just have to duplicate the traffic light model, and modify the horizontal start point using the UV-mapping editor.
User avatar
coffeycup
Genesis
Posts: 4848
Joined: Sun Sep 27, 1998 6:00 pm
Contact:

Re: "Advanced" map tricks galore (physics, modeling, misc)

Post by coffeycup »

Nice idea for a thread. Hopefully I will contribute! The perpetual motion machine looks cool. Would like to see a vid of it working. Wouldn't mind seeing it in a map where you could drive around it, not even necessarily interact with it.

Not sure I understand how it could 'power' something else? Like trigger an action?

User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re:

Post by C2 Scientist »

Image

Real-time analog clock

This is quite a simple trick, with which you can improve your town hall buildings, for example. Create the clock and the clock hands. Then make sure each clock hand is a separate object, and not merged to the actual clock (so detach if necessary). When done, go to track's textfile, to groove section, and use and adjust this code:

Code: Select all

&ClockHandMinutes.ACT 		// Actor name of the spinning object
NOT A FUCKIN LOLLIIIPOP
CONSTANT	 		// Play the animation even if the player isn't anywhere nearby
NO FUCKING PATH YOU CUUUUUUUNT	// Directional movement: none
SPIN	   			// Rotational movement: spin
CONTINUOUS			// Loops the rotation
0.00027778			// Spinning speed: full cycles per second (1 / hour = 1 / 3600)
0 , 0 , 0		   	// Centre point of spinning, adjust if necessary
z 	  			// Axis around which to rotate, adjust if necessary (x/y/z)
Cycle speeds for different clock hands:

Seconds: 0.016667 (1 / 60)
Minutes: 0.00027778 (1 / hour = 1/3600)
Hours: 0.000023148 (1 / 12 hours = 43200)

Next I'll post how to make a real-time digital clock, using only a single bitmap for the display. :smile:
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re:

Post by C2 Scientist »

Image

Animation frames within a single bitmap

First though, I'll show this works, as it's required for the digital clock. So if you've ever created cars for C2, you're probably familiar with the "texturebits"-setting in funk section: in majority of the cars, all different states for the rear lights (braking, reversing, and their combinations) are combined into a single bitmap, and different bits are chosen to be displayed as the player controls the car. Sort of same deal here. Here's the code:

Code: Select all

CharacterAnimation	// Material to be replaced with the animation frames
distance		// Play the animation only when the player is nearby
piss off		// Movement mode: none
no fucking lighting
frames			// Animation mode: frames
accurate
continuous		// Loops the animation
0.25			// Animation speed, the number of entire animation cycles per second
8			// Number of frames in the animation
Characters, 4,0,2,0	// A
Characters, 4,1,2,0	// B
Characters, 4,2,2,0	// C
Characters, 4,3,2,0	// D
Characters, 4,0,2,1	// E
Characters, 4,1,2,1	// F
Characters, 4,2,2,1	// G
Characters, 4,3,2,1	// H
The name of the material mapped to the world walls in Plaything 2 is "CharacterAnimation", and will be replaced with the animation. The name of the actual bitmap in TiffRGB-folder is Characters.TIF, and it contains all the frames. Finally, to explain the texturebits format, here's what the very last line in the code means, for example:

Characters = the name of the bitmap in TiffRGB-folder, as explained above
4 = for this frame, horizontally divide the bitmap into four parts
3 = display the fourth horizontal bit (but is set to "3" because the numbering starts from zero)
2 = for this frame, vertically divide the bitmap into two parts
1 = display the second vertical bit (but is set to "1" because the numbering starts from zero)

So in this example:

- the duration of the entire animation is four seconds (1 / animation speed = 1 / 0.25 = 4)
- the animation frame rate is two frames-per-second (number of frames * animation speed = 8 * 0.25 = 2)
- the animation looks like this: A - B - C - D - E - F - G - H - A - B - C...

You can also use a larger part of the bitmap in some of the frames by adjusting the texturebit numbers for those frames (for a zooming effect, for example), and add multiple bitmaps into the same animation by changing the bitmap name.
User avatar
coffeycup
Genesis
Posts: 4848
Joined: Sun Sep 27, 1998 6:00 pm
Contact:

Re: "Advanced" map tricks galore (physics, modeling, misc)

Post by coffeycup »

All these ideas are great. I will try some out this weekend, like the clock.

Question on traffic lights. Is there a way to get the 'lights' material to always appear lit, even in shadow? I've tried checking off "always lit" in PT2 but that didn't seem to do anything.
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re:

Post by C2 Scientist »

That option is indeed not functional... I think how I worked around that problem in the past was creating a large flat plane in the void (under the track, for example), made it a powerup with the "£" and stuff, and mapped the material into it. Materials used in powerups seem to be always full-lit, if I recall, so this fixed the problem. The flat plane was also divided into a grid of multiple polygons, so that I could map several textures I wanted to be full-lit, into it.

=====================================================================================

Image

Real-time digital clock

Combining the two previous tricks here... start by creating yourself a similar bitmap with all the digits, and also divide your digital clock display into five polygons (rectangles). Next, in Plaything 2, create five materials: Digit1, Digit2, DigitMid, Digit3, and Digit4. Dig it yet? Map these materials to the polygons accordingly: Digit1 goes to the first slot, Digit2 to the second, DigitMid in the middle, and so on. Just remember that for each slot, you'll have to stretch the mapping to the entire material, so use the "stretch-to-fit"-button in the UV-mapping editor. Now move to track's textfile and to the funk section. Use this code:

Code: Select all

Digit4			// Material to be replaced with the animation frames (minutes)
constant		// Accurately keep track of the animation regardless of current player distance
piss off		// Movement mode: none
no fucking lighting
frames			// Animation mode: frames
accurate
continuous		// Loops the animation
0.0016667		// Animation speed, cycles per second (1 / 10 minutes = 1 / 600 seconds)
10			// Number of frames in the animation
ClockDigits, 4,0,3,0
ClockDigits, 4,1,3,0
ClockDigits, 4,2,3,0
ClockDigits, 4,3,3,0
ClockDigits, 4,0,3,1
ClockDigits, 4,1,3,1
ClockDigits, 4,2,3,1
ClockDigits, 4,3,3,1
ClockDigits, 4,0,3,2
ClockDigits, 4,1,3,2

NEXT FUNK

Digit3			// Material to be replaced with the animation frames (tens of minutes)
constant		// Accurately keep track of the animation regardless of current player distance
piss off		// Movement mode: none
no fucking lighting
frames			// Animation mode: frames
accurate
continuous		// Loops the animation
0.00027778		// Animation speed, cycles per second (1 / hour = 1 / 3600 seconds)
6			// Number of frames in the animation
ClockDigits, 4,0,3,0
ClockDigits, 4,1,3,0
ClockDigits, 4,2,3,0
ClockDigits, 4,3,3,0
ClockDigits, 4,0,3,1
ClockDigits, 4,1,3,1

NEXT FUNK

DigitMid		// Material to be replaced with the animation frames (middle digit)
constant		// Accurately keep track of the animation regardless of current player distance
piss off		// Movement mode: none
no fucking lighting
frames			// Animation mode: frames
accurate
continuous		// Loops the animation
1			// Animation speed, the number of entire animation cycles per second (1/1)
2			// Number of frames in the animation
ClockDigits, 4,2,3,2
ClockDigits, 4,3,3,2

NEXT FUNK

Digit2			// Material to be replaced with the animation frames (hours)
constant		// Accurately keep track of the animation regardless of current player distance
piss off		// Movement mode: none
no fucking lighting
frames			// Animation mode: frames
accurate
continuous		// Loops the animation
0.000011574		// Animation speed, cycles per second (1 / 24 hours = 1 / 86400 seconds)
24			// Number of frames in the animation
ClockDigits, 4,0,3,0
ClockDigits, 4,1,3,0
ClockDigits, 4,2,3,0
ClockDigits, 4,3,3,0
ClockDigits, 4,0,3,1
ClockDigits, 4,1,3,1
ClockDigits, 4,2,3,1
ClockDigits, 4,3,3,1
ClockDigits, 4,0,3,2
ClockDigits, 4,1,3,2
ClockDigits, 4,0,3,0
ClockDigits, 4,1,3,0
ClockDigits, 4,2,3,0
ClockDigits, 4,3,3,0
ClockDigits, 4,0,3,1
ClockDigits, 4,1,3,1
ClockDigits, 4,2,3,1
ClockDigits, 4,3,3,1
ClockDigits, 4,0,3,2
ClockDigits, 4,1,3,2
ClockDigits, 4,0,3,0
ClockDigits, 4,1,3,0
ClockDigits, 4,2,3,0
ClockDigits, 4,3,3,0

NEXT FUNK

Digit1			// Material to be replaced with the animation frames (tens of hours)
constant		// Accurately keep track of the animation regardless of current player distance
piss off		// Movement mode: none
no fucking lighting
frames			// Animation mode: frames
accurate
continuous		// Loops the animation
0.00013888		// Animation speed, cycles per second (1 / 2 hours = 1 / 7200 seconds)
12			// Number of frames in the animation
ClockDigits, 4,2,3,2
ClockDigits, 4,2,3,2
ClockDigits, 4,2,3,2
ClockDigits, 4,2,3,2
ClockDigits, 4,2,3,2
ClockDigits, 4,1,3,0
ClockDigits, 4,1,3,0
ClockDigits, 4,1,3,0
ClockDigits, 4,1,3,0
ClockDigits, 4,1,3,0
ClockDigits, 4,2,3,0
ClockDigits, 4,2,3,0
That's it, and it even should work. This clock begins from 0:00 though, so you may want to adjust the settings to change the starting time. :smile:
User avatar
Freddy
hit n run
Posts: 236
Joined: Sun Sep 10, 2000 4:00 pm
Location: Sheffield, England

Re:

Post by Freddy »

This is really cool stuff, just shows what can or could have been done with the C2 engine if Stainless had more time and wern't rushed :sad:
Way to complex for me though :rofl:
User avatar
Harmalarm
road raged psycho
Posts: 1302
Joined: Tue May 13, 2008 3:56 am
Location: Den Haag, Holland
Contact:

Re: "Advanced" map tricks galore (physics, modeling, misc)

Post by Harmalarm »

I agree the clock is very clever thinking! I knew about the full lit trick allready. When I come up with some idea's I will be sure to post them. It's just that I haven't done that much experimenting as you guys :lol:
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re:

Post by C2 Scientist »

Free instant repairs at a garage

This one's simple. If you want to have a open garage in your map, which would repair your car for free everytime when you enter and drive to a certain spot inside, do the following. Create a material for the spot that should repair the car when driven on, and map it to the floor. Then open track's textfile, go to the "smashable specs"-section, and use this code:

Code: Select all

		// NEXT SMASHABLE ITEM
0		// "Flags"
RepairSpot	// Name of the trigger material
nochange	// Model change mode, nothing
0		// Minimum force requirement for the removal/change
0		// Number of possible sound effects caused
0		// Number of shrapnel objects spawned
0		// Number of explosion groups
none		// Slick material to spawn on ground
0		// Number of blastwaves to cause, to activate/scatter noncars
0		// Number of blastwaves to cause, to activate/destroy other smashables
0		// "Extensions flags"
9		// Award the player with a powerup (see Data/Powerups.TXT, 14=mine)
none		// Award the player with credits/time/message
0		// "Number of runtime variable changes"
0		// "Reserved 1"
0		// "Reserved 2"
0		// "Reserved 3"
0		// "Reserved 4"
Replace the "RepairSpot" with the name of your chosen material. The "9" is the number of the "Instant repair"-powerup in "Data/Powerup.TXT". Browse the textfile to find some other powerup to award if you wish, such as the various activate-on-use powerups. When choosing a new powerup though, keep in mind that it will be awarded to the player each time the material is driven on. I guess you could also throw in some visual special effects, by using the "explosion groups" setting with custom animation frames.

=====================================================================================



Creating a tornado using drones

The tornado won't be able to affect neither its surroundings nor cars where it travels, but if you still wish to create one for the looks, do this. Start by creating the 3D-model. Around it, I suggest including a lot of small and large (preferably large), crossed planes with mostly transparent dust cloud textures. When you're happy with the 3D-model, create a "drone vehicle" out of it - save the files into Data/Drones/Tornado (for example), create a textfile for it, add to Data/Drones.txt, and all that. Here's some code you could use in drone's textfile, for example:

Code: Select all

VERSION 2

TORNADO		// Drone name
CAR		// Drone type (car/plane/train)
0		// Mass in tonnes
50,50,50	// Centre of mass as % distance from front,left,bottom
smooth		// Cornering (smooth/sharp)
variable	// Speed (constant/variable)
0.1		// Max acceleration	(BRU/s², 1 BRU/s is roughly 15mph) 
0.75		// Max speed		(BRU/s)
0.15		// Min speed		(BRU/s)
0		// Crushability (0 = uncrushable, 0.5 average softness, 1.0 very soft, 2.0 extremely soft)
respawn		// Ability to resurrect over time in case of a crash (respawn / norespawn)
vertical	// Orientation relative to path incline: inline (car, plane), vertical (cable car)
always		// Processing (always/distance)

START OF BOUNDING SHAPES

1		// Number of bounding shapes
polyhedron	// Shape type
4		// Number of points
0.00000 , -1000.000000 ,  0.00000
-0.00001 , -1000.000001 ,  0.00001
0.00000 , -1000.000001 , -0.00001
0.00001 , -1000.000001 ,  0.00001

END OF BOUNDING SHAPES

START OF FUNKYGROOVY STUFF

SpinnyGroove
Tornado.ACT	// Name of the object to spin
y		// Spin axis (x/y/z)
dronespeed	// Change spinning speed based on drone's current speed
forward
10		// Inverted spin speed multiplier (if I recall), decrease the value to increase to spin speed

END OF FUNKYGROOVY STUFF
With these settings, you won't be able to collide with the tornado, its speed should be quite slow, and all movement/turning pretty smooth. Now add the drone and its path to the drone-section in your track's textfile. (you can also create the path to go through solid stuff)

You can also split the dust clouds into separate objects, and create additional "SpinnyGrooves" with different spinning speed multipliers, to add more visual complexity to the tornado.
User avatar
TTR
Psycho Maniac
Posts: 5277
Joined: Wed Oct 15, 2003 3:40 am
Location: Rotterdam, Holland
Contact:

Re: "Advanced" map tricks galore (physics, modeling, misc)

Post by TTR »

LOL great for pitstops for racetracks etc
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re:

Post by C2 Scientist »

Spawning torch fires

If you have a map with torches placed on walls, and would like to light them up as you enter the area, use this trick. Create a tiny, invisible placeholder object for a fire, and name it as &TorchFire. Duplicate and place these where you would like the fires to appear. Then, create an empty model in PT2, name it as TorchEmpty, and save into your track's folder as ACT,DAT,MAT. Next, insert this code to the smashable specs in track's textfile:

Code: Select all

		// NEXT SMASHABLE ITEM
0		// "Flags"
&TorchFire	// Name of the initial model
replacemodel	// Model change mode, replace
TorchEmpty	 // New model
100		 // Chance of fire/smoke (in %)
1		 // Number of fires/smoke columns
0,0		 // Min,Max smokiness (0=fire, 1=black smoke, 2=grey smoke, 3=white smoke)
1000		// Minimum force requirement for the removal/change
0		// Number of possible sound effects caused
0		// Number of shrapnel objects spawned
0		// Number of explosion groups
none		// Slick material to spawn on ground
0		// Number of blastwaves to cause, to activate noncars
0		// Number of blastwaves to cause, to activate other smashables
0		// "Extensions flags"
0		// Award the player with a powerup (data/powerups.txt, 14=mine)
none		// Award the player with credits/time/message
0		// "Number of runtime variable changes"
0		// "Reserved 1"
0		// "Reserved 2"
0		// "Reserved 3"
0		// "Reserved 4"
Now all that is left is to create some sort of a simple trigger (object or material) to inflict an invisible "blastwave", with a custom volume that covers all the tiny placeholders, and causes them to activate. Note that the "minimum force requirement" in the code above is set to "1000", so the force inflicted by the triggered blastwave should be at least equal to that or greater - otherwise, the placeholders won't be considered destroyed, and no fire will appear. If you wish, you may also add a small explosion using the "explosion groups" setting.

Of course, the flames may die on their own, over time.

=====================================================================================



Lightning bolts

Unfortunately, if you want the lightning bolts to spawn randomly, over a long time period, they will have to be inaudible. If that doesn't bother you, read on. First, create the frames for the lightning bolt animation. Now create a tiny, invisible placeholder cube, name it as "&Lightning", and place it at the center of your map, on the ground. Then open track's textfile, go to smashable specs, section, and use this code:

Code: Select all

		// NEXT SMASHABLE ITEM
0		// "Flags"
&Lightning	// Name of the initial model
remove		// Model change mode, remove
1000		// Minimum force requirement for the removal/change
0		// Number of possible sound effects caused
0		// Number of shrapnel objects spawned
1		// Number of "explosion groups"
 100,100	 // min count, max count of lightning bolts
 0,3600		 // min start delay, max start delay in seconds
 0,10,0		 // offset (X,Y,Z) The centre of the bolts will be 10 units above the ground
 0,100		 // min X distance, max X distance
 0,0		 // min Y distance, max Y distance
 0,100		 // min Z distance, max Z distance
 25,50		 // min frame rate, max frame rate
 50,75		 // min scaling factor, max scaling factor (Big bangs or not?)
 randomrotate	 // rotate mode
 10		 // Number of frames in animation
  100		  // Opacity in %
  Bolt01	  // Frame name
  100		  // Opacity in %
  Bolt02	  // Frame name
  100		  // Opacity in %
  Bolt03	  // Frame name
  100		  // Opacity in %
  Bolt04	  // Frame name
  100		  // Opacity in %
  Bolt05	  // Frame name
  100		  // Opacity in %
  Bolt06	  // Frame name
  100		  // Opacity in %
  Bolt07	  // Frame name
  100		  // Opacity in %
  Bolt08	  // Frame name
  100		  // Opacity in %
  Bolt09	  // Frame name
  100		  // Opacity in %
  Bolt10	  // Frame name
none		// Slick material to spawn on ground
0		// Number of blastwaves to cause, to activate noncars
0		// Number of blastwaves to cause, to activate other smashables
0		// "Extensions flags"
0		// Award the player with a powerup (data/powerups.txt, 14=mine)
none		// Award the player with credits/time/message
0		// "Number of runtime variable changes"
0		// "Reserved 1"
0		// "Reserved 2"
0		// "Reserved 3"
0		// "Reserved 4"
Now again create a simple trigger smashable (object or texture) to destroy the invisible &Lightning-cube (minimum force required = 1000), and the (mute) thunderstorm should begin. Adjust the various values in the code to your liking, they surely aren't perfect at the moment, but should give a rough idea of what value ranges to aim for. For example, the frame rates should be very high, since a bolt hits quickly. The X and Z distances should be large, to make the random bolts hit over a large area. The large scaling factor ensures that the bolts will look massive. Etc.

It can surely be refined by others still, but this version will have to do meanwhile. :smile:
User avatar
Mastro 666
motorised death
Posts: 968
Joined: Thu Jan 26, 2006 6:24 pm
Contact:

Re:

Post by Mastro 666 »

Great Topic! :thumbsup:
Now again create a simple trigger smashable (object or texture) to destroy the invisible &Lightning-cube
I need some help here. Could you give me an example of this smashable?

I try this:

Code: Select all

// Start of smashable item
0										// flags
switch								// Name of trigger material
nochange								// Mode
0										// Threshold
//Connotations
1										// number of possible sounds
4377									// sound id
0										// count
0										// Number of explosion groups
none									// Slick material
1										// Number of non-cars activated
	0,0
	absolute
	-1
	-1,-1,-1
	1,1,1
	0,0										// Min, max towards you speed
	0										// Impactee velocity factor
	0										// Random velocity (max)
	0										// Random up velocity (max)
	0										// Random normal velocity (max)
	0										// Random spin rate (max)

0										// Radius of side-effect smashes
0										// Extensions flags
0										// Room turn on code
none										// award code
0										// No run-time variable changes
0										// reserved 1
0										// reserved 2
0										// reserved 3
0										// reserved 4
but... didn't work.
&Lightning: Does it act like a noncar? :help:
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re:

Post by C2 Scientist »

Actually you should be using the "blastwave" that destroys other smashables, instead. (the &Lightning-box is a smashable) Apparently you've already placed the small &Lightning cube that will be destroyed (and spawn the lightning bolts), and you're now creating the trigger that causes the said destruction. However, I'm not sure if it's possible to use the "relative"-option for coordinates if you're using a trigger material instead of a trigger model - so perhaps it's better to use absolute coordinates instead (the actual world coordinates), and find them with PT2. Use the following code for the trigger. Enter the said coordinates on the two lines just after the "absolute"-keyword, so that the 3D "box" will cover the &Lightning-cube. When done, the trigger should destroy the cube, and initiate the bolt animations.

Code: Select all

		// NEXT SMASHABLE ITEM
0		// "Flags"
Switch		// Name of the trigger material/model
nochange	// Change mode for the initial object, no change
0		// Minimum force requirement for the removal/change/activation
1		// Number of possible sound effects caused
 4377		 // Sound ID
0		// Number of shrapnel objects spawned
0		// Number of "explosion groups"
none		// Slick material to spawn on the ground
0		// Number of blastwaves to cause, to activate noncars
1		// Number of blastwaves to cause, to activate other smashables
 1 , 1		 // Min, Maxtime before inflicting the blastwave
 *.DAT		 //
 absolute	 // Whether the following coordinates are relative (object-based), or absolute (world-based)
 -51 , 0 ,-41	 // 3D volume for the blastwave, 1st corner of the box
  50 , 1 , 40	 // 3D volume for the blastwave, 2nd corner of the box
 away		 //
 1001		 // Force to create. Will only destroy smashables that have lower threshold than this value
0		// "Extensions flags"
0		// Award the player with a powerup (data/powerups.txt, 14=mine)
none		// Award the player with credits/time/message
0		// "Number of runtime variable changes"
0		// "Reserved 1"
0		// "Reserved 2"
0		// "Reserved 3"
0		// "Reserved 4"
User avatar
coffeycup
Genesis
Posts: 4848
Joined: Sun Sep 27, 1998 6:00 pm
Contact:

Re: "Advanced" map tricks galore (physics, modeling, misc)

Post by coffeycup »

The clock idea works great. I did a test and it keeps remarkably accurate time.

I let it run for two hours (not pictured) and it only gained a few seconds. Heh, too bad it can't use the system clock. Mine starts at 12 0'clock
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re: "Advanced" map tricks galore (physics, modeling, misc)

Post by C2 Scientist »

Hehe, very good! :thumbsup:
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re:

Post by C2 Scientist »

So that's what the "lollipop"-setting does. At some point I wanted (vertical) sprites to create lots of simple vegetation using single quad polygons with a two-sided material, I think doing that would have halved the triangles needed and improve frame rates slightly in the process - not tremendously, but hey.

My suggestions:

- Clumps of narrow but tall straws of grass, plants, maybe some of the smaller bushes
- Especially small "curved" plants: they might look strange if you just crossed their planes as usual
- Forest: lots of simple sprite trees behind the more detailed ones (save triangles, as mentioned above)
- The faint light beams for street lights (perhaps for foggy weather)
- Lighting "flares", think long rows of tiny bright lights (lollipop-option for all the axises)
- In a more futuristic setting, holograms. (combine with a slow spin-animation for an interesting effect)

Are the "sharp, smooth"-options you mentioned in the code valid with an actual effect, by the way? :wink:
User avatar
Hairba11
turbo bastard
Posts: 341
Joined: Fri Dec 19, 2003 5:29 pm

Re:

Post by Hairba11 »

with the tornado idea, could you change the mass from 0 to something like 120 tons and actually have it destroy stuff as it went by?
I know you wouldn't get sucked up into it, but watching it take out a fence on its way to your car would add a unique effect.
Or would that inhibit its ability to cruise through actual solids?
Let alone the damage a 120 tonne tornado would make in a city with pinball mode on
If it runs, drives, stops, has a title, AND is under $300, I'll take it!
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re: "Advanced" map tricks galore (physics, modeling, misc)

Post by C2 Scientist »

All drones stop moving when they crash into something, and that can't be changed, which is why the tornado couldn't really affect its surroundings and keep going, either. :smile:

Also, in my example, I intentionally have set the bounding boxes (collision shapes) well below the playing area, so that the probability of the tornado actually hitting anything (and stopping because of that) is extremely low. If I recall, they were set roughly 1000 units below the ground.
User avatar
Hairba11
turbo bastard
Posts: 341
Joined: Fri Dec 19, 2003 5:29 pm

Re:

Post by Hairba11 »

ah, yes, like when playing golf with the drone cars in the city. I hadn't considered that.
I got the old 'puter back up and running, I may have to re-introduce myself to the joys of the game :grin:

:edit:
although it would make a heck of an opponent. Have Taz be the driver...
If it runs, drives, stops, has a title, AND is under $300, I'll take it!
User avatar
coffeycup
Genesis
Posts: 4848
Joined: Sun Sep 27, 1998 6:00 pm
Contact:

Re:

Post by coffeycup »

The 2d sprite could also be used for spectators in SoD tracks.
That's what CRC 2005 uses for it's 'crowds'. We could do one better and at least have them animated!
User avatar
coffeycup
Genesis
Posts: 4848
Joined: Sun Sep 27, 1998 6:00 pm
Contact:

Re:

Post by coffeycup »

Lit Signage - Using the good old powerup with the "£" stuff

Make your signage model keeping the glowing parts (bulbs/neon) seperate from the non-glowing parts (scaffolding/framework).
Give the glowing part a 'powerup' type name like &£bulbs.act.
Non-glowing part gets a regular name like sign.act or &sign.act if it's going to spin or move somehow.
Group the lightbulbs to the main sign.

Image

Now the light bulbs will glow in the dark while the rest of the sign goes in and out of shadow

----------------------------------------------------
Edit -removed reference to animated textures
User avatar
The_Bollocks
Ford Man!
Posts: 1294
Joined: Sat May 17, 2003 1:13 pm
Location: Dublin, Ireland

Re: "Advanced" map tricks galore (physics, modeling, misc)

Post by The_Bollocks »

I've decided to make this a sticky. There is some good information in here for future reference.
1982 Ford Escort Mk3 1.3 L (restoration project)
1990 Nissan Micra K10 L (my first car, currently in long term storage)
1995 Ford Escort Mk6 1.3 CL (current everyday car)
User avatar
cesm20
turbo bastard
Posts: 329
Joined: Thu Jan 18, 2001 5:00 pm
Location: Portugal, Europe
Contact:

Re: "Advanced" map tricks galore (physics, modeling, misc)

Post by cesm20 »

Wow it's threads like this that i like most :smile: Thank you so much c2scientist and all the others for sharing this kind of advanced stuff in c2 editing, i really appreciate someone is finally using the c2 engine at it's fullest :smile: Not that had started now, but at least the sharing of such knowlege now with this sticky is a lot easier and i am glad about this :smile: Don't worry guys i haven't quit c2 editing yet, i still check out these foruns once in a while and i still plan going back to the pt2mod (just don't ask me when yet lol)
User avatar
Yfrid
hit n run
Posts: 238
Joined: Thu Dec 27, 2007 5:46 pm

Re: "Advanced" map tricks galore (physics, modeling, misc)

Post by Yfrid »

Talking about advanced tricks, i was wondering something. I think to be in the right topic :tongue:

My english is horrible, but i'll try to explain it as my best.

As we know cars have their own lighting on materials, so, if you make a dark track, even messing in his .txt it doesn't take effect on cars. I was wondering that maybe the solution could be in the water effect. I mean, when you get underwater there's a main color overlayed and a distortion effect (i guess that's a particular .mat,right?). In a tunnel underwater in the Max's junkyard, water fades from green to blue, then to green again. That give me an idea to make a fake darkness or fake lighting effects :tongue:

If there is some way to hack that material, we could remove the distortion effect, and apply a gray scale color instead of green\blue. Then apply the material on the whole map. I suppose everything would look darker! :beer:

or else, it can be used for a dark cave, using a trick similar to the junkyard water. But it fades gradually to a darker greyscale giving the illusion of progressive darkness. Or else in a tunnel it could fade to orange near to every lamp on the ceiling.

Am i crazy? :suicide:
User avatar
Lumberjack
road raged psycho
Posts: 1520
Joined: Sun Jul 09, 2000 4:00 pm
Contact:

Re: "Advanced" map tricks galore (physics, modeling, misc)

Post by Lumberjack »

Just want to say that I am seriously impressed by all that you've accomplished since I've been gone. Some of these techniques are genius, I really like the traffic light for example. What an excellent way to do it!
Image
User avatar
C2 Scientist
jaywalker
Posts: 2059
Joined: Tue Mar 26, 2002 5:00 pm
Location: Finland
Contact:

Re:

Post by C2 Scientist »

I realized I never linked here the two modding videos I uploaded a while back:

Smoothly animated traffic lights:

Real-time digital clock:
User avatar
coffeycup
Genesis
Posts: 4848
Joined: Sun Sep 27, 1998 6:00 pm
Contact:

Re: Advanced C2 map/car tricks galore (physics, modeling, mi

Post by coffeycup »

I love these vids. I had always figured the only way to do traffic lights would be with frame animation. This is way cooler.
User avatar
Razor
Stomping-on-Kittens
Posts: 3425
Joined: Sat Dec 01, 2007 6:38 pm
Location: Beaver City
Contact:

Re: Advanced C2 map/car tricks galore (physics, modeling, mi

Post by Razor »

Not sure these belong in here as it's not directly related to map/car editing tricks but it's not really evidenced anywhere else and is more advanced than the basics.

My articles on the font system in the final version of C2, in order:

1. http://r.carmajunkies.com/2015/04/07/ca ... re-a-pain/
2. http://r.carmajunkies.com/2015/04/07/font-progress/
3. http://r.carmajunkies.com/2016/02/23/mo ... scoveries/
4. http://r.carmajunkies.com/2016/02/25/ca ... -complete/

Whilst not directly detailing everything, it goes through my progression on the fonts for my upcoming (SOONtm) mod and all the neat tricks I found along the way, reading them in order gives a better insight as to how the final version of the game handles and displays fonts as opposed to just picking one article and trying to decipher what I've wrote.

Hopefully this can be of use to anyone in the future who wants to mod the game without having to rely on editing the executable itself.
[ Razor @ Carmageddon Webmasters Alliance Network ] [ My Downloads ] [ My Carma Items ] [ Conversion lists ]
To download the BETA Mod and more information on my other work, visit me @ https://razor.cwaboard.co.uk
Post Reply

Check who’s online

Users browsing this forum: No registered users and 12 guests