not so much a feature request

not so much a feature request

Requests for features in the spring code.

Moderator: Moderators

Post Reply
Dead.Rabit
Posts: 264
Joined: 03 Sep 2005, 04:28

not so much a feature request

Post by Dead.Rabit »

heyya, its just something ive noticed that hasnt been implimented

and i dunno if this is mod specific but i assume that this is to do with the engine (please tell me if i assumed wrong and ill post this in the correct forum)

anyway, when making a map you get to choose the speed at which units move accross different types of terrain.

what ive noticed is that when going over slow terrain (maybe steep hills also?) the animation speed of unit models isnt reduced, just the speed at which they move.

anyway
thanks for reading
D.R
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

You can calculate speed it goes at ingame but what hassle would it be. Would put some decent extra load on the CPU because every unit has to do several checks on it's position at least two or four times a second.

It's a good idea for individual units but nothing which can be spammed.
Dead.Rabit
Posts: 264
Joined: 03 Sep 2005, 04:28

Post by Dead.Rabit »

x and y coordinates have to be checked against values from other computers and constantly updated.

this could be calculated per computer. also i see more and more advanced computers online every month.

and because this is just an aesthetic thing it could be toggled in the game settings


all u have to do is multiply the leg animation speed of kbots by the terraintype. and possibly a constant. the way speed changes per terrain type must undergo a similar simple calculation.

D.R
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Terraintype?...

No it works like this:

Unit A is at position X1,Z1 (Y is irrelevant) now. 250ms in the future it will be at X2,Z2. Now we can measure the distance it moved in these 250ms. Since maxSpeed (divided by 4, because it's for 32 game frames/second) is known we can now calculate a multiplier to make animations slower or faster (if it goes downhill) automatically.

Lets say it's going to be put on every kbot in BA (which is a lot of work too). It would definitely lag the game on kbot heavy maps in the long run. At least I think so...
Dead.Rabit
Posts: 264
Joined: 03 Sep 2005, 04:28

Post by Dead.Rabit »

it would only cause lag on slower computers. or before you do the calculation you could perform checks

i.e.
is this kbot within view of the camera
is the camera zoomed in more then x amount
is the game running at normal speed
is there more then x amount of kbots

and if not, dont perform the calculation.


when you think about how many lines of code that 1 kbot must go through already i.e am i firing, create bullet at xy relative to kbot which direction is my torso facing where am i going, pathfinding etc etc etc, 1 more line of code with aesthetic value doesnt seem like it'll add much harm, at least nowhere near as much lag as planes and 3-dimensional pathfinding.

D.R
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Scripts can't ask those questions. Besides, they're synced, you can't change them based on where the user looks and stuff.
Post Reply

Return to “Feature Requests”