Friday, January 28, 2005

right I'm gonna have a rest from all this scripty data stuff. I need to think alot more about what I'm gonna do with this data cuz just recreating the level in its cut down form just dosnt seem all that interesting.

I've gone and done what I said I wouldnt. Ive picked the data source without thinking properly about what I'm gonna do with it.

Anyhoo, I thought later I'd post a few more processing pics of the different kinds of game modes in Unreal (capture the flag, bombing run, deathmatch, assault)so you can see how the levels goal drastically effects peoples movement.

just in case you wondered what ctf-face looks like (I put the little dots on too).

and from the side...

Thursday, January 27, 2005

click me for a bigger one!;

Its a bit wierd at the mo that the higherup bits are smaller but the lower down bits bigger (its cuz I cheated a bit and removed the z axis, but hey what me worry);



for (int i=0;i
float temp1 = thelist[i];
float temp2 = thelist[i+1];
float temp3 = thelist[i+2];

temp1 = temp1/100;
temp1 = temp1+150;
temp2 = temp2/100;
temp2 = temp2+150;
temp3 = temp3/100;
temp3 = temp3+150;

point (temp1,temp2,temp3);


Wednesday, January 26, 2005

well, today I begun learning how to use processing. A program I usually avoid (due to the fact you need to code stuff), however so far I've found it quite nice and friendly... ish, but whats a few OutOfMemory messages between friends.

So far Ive managed to get it to read my log file, ignore the crap, turn the strings into numbers and put them all in a lovely array of usable floats (in order of course).

Heres the code. And please please, if anyone can do this more efficiently I'd love to know how, cuz I'm sure I shouldnt be doing this the way I have (theres probably a rediculously simple way).

size (200,200);

String intarr [] = loadStrings("UT2004.log");
int len = intarr.length;
String justnum [] = new String [len];

for (int i=0; i < len; i++) {

String temp[] =splitStrings(intarr[i]);
justnum[i] = temp[3];


String formatted = join(justnum, " ");
float thelist[] = splitFloats(formatted);

println(thelist[100]); //just checking

God I hate code, I mean its not exactly pretty to look at is it! Anyway there it is so far, and as for my lego animation... well, lets call that "on hold" shall we (this is far more exciting).

By the way I keep putting my code on here incase for some reason I should lose the working version, At least I know the good working stuff exists here. and also just incase someone else needs the same thing done as me (this thingy up here for example I'm sure will be useful to someone).

Oh yeah thanks RegularX on the beyondunreal forums, most helpful :)

Tuesday, January 25, 2005

I've only gone and done it!
Yes folks my C++ days are already at an end as I wave to UnrealScript from a distance. It works, My log file soon becoms fat and juicy with player locations taken every second.

class Watcher extends mutator;

var() int counter;

event PreBeginPlay()

function ModifyPlayer(Pawn Other)

Log( "spawn = " $ counter);
Log("spawnxloc =" $Other.Location.X);
Log("spawnyloc =" $Other.Location.Y);
Log("spawnzloc =" $Other.Location.Z);



function Timer()
local Controller C;

for (C = Level.ControllerList; C != None; C = C.NextController)
Log("movingxloc = " $C.Pawn.Location.X);
Log("movingyloc = " $C.Pawn.Location.Y);
Log("movingzloc = " $C.Pawn.Location.Z);

Description="log spawn number and location. Log location of player every sec too."

Thats it! its done, and my fabulous log file says...

ScriptLog: spawn = 8
ScriptLog: spawnxloc =10584.06
ScriptLog: spawnyloc =-1247.03
ScriptLog: spawnzloc =-2341.07
ScriptLog: movingxloc = 10584.06
ScriptLog: movingyloc = -1247.03
ScriptLog: movingzloc = -2349.84
ScriptLog: movingxloc = -3194.79
ScriptLog: movingyloc = -954.90
ScriptLog: movingzloc = -2334.80
ScriptLog: movingxloc = 9929.67
ScriptLog: movingyloc = 824.73
ScriptLog: movingzloc = -2328.44
ScriptLog: movingxloc = -3391.96
ScriptLog: movingyloc = 956.43
ScriptLog: movingzloc = -2349.81
ScriptLog: movingxloc = 10113.85
ScriptLog: movingyloc = -1097.91
ScriptLog: movingzloc = -2349.88

and occasionally says...

Warning: Watcher CTF-FaceClassic.Watcher (Function Watcher.Watcher.Timer:0046) Accessed None 'Pawn'
ScriptLog: movingxloc = 0.00
Warning: Watcher CTF-FaceClassic.Watcher (Function Watcher.Watcher.Timer:0077) Accessed None 'Pawn'
ScriptLog: movingyloc = 0.00
Warning: Watcher CTF-FaceClassic.Watcher (Function Watcher.Watcher.Timer:00A8) Accessed None 'Pawn'
ScriptLog: movingzloc = 0.00

but I think I'll just ignore it when it does that (it only happens once or twice, and I cant blame it for getting a bit confused)

anyway, heres a little piccy of my moving lego car


have my prayers been answered?
And the link to the proper code forums.

class myDeathmatch extends xDeathmatch;


class myPlayerController extends xPlayer;

exec function GetLocation()
log("My location is: "$Location);


Thank you [SAS]Solid Snake on the beyond unreal forums.(even though I didnt ask the question and this thread dosnt work anymore, hence the google cache link)

I so dont know if this code works yet though as Im in uni and have no way of testing it. So we shall just have to wait and see. Might start having a look at processing so that it can read my log file nice.


I succesfully made my log file do this!

ScriptLog: spawn = 1
ScriptLog: 10209.40
ScriptLog: 823.98
ScriptLog: -2342.13
ScriptLog: spawn = 2
ScriptLog: -3441.08
ScriptLog: -1272.47
ScriptLog: -2340.89
ScriptLog: spawn = 3
ScriptLog: -3622.92
ScriptLog: 1206.14
ScriptLog: -2341.39
ScriptLog: spawn = 4
ScriptLog: 10113.85
ScriptLog: -1097.91
ScriptLog: -2341.12
ScriptLog: spawn = 5
ScriptLog: -3391.96
ScriptLog: 956.43
ScriptLog: -2341.05

and etc. Everytime a player spawns it says which spawn number it is (there so it nicely seperates everyone) and then tells you the co-ords of where it spawned X,Y then Z.

The code looks pants... but Its taken a long time to get this far. I have had to read all sorts of confusing nasty stuff, so here for your enjoyment is der code.

class playerlocation extends mutator;

var() int counter;

event PreBeginPlay()

function ModifyPlayer(Pawn Other)

Log( "spawn = " $ counter);



FriendlyName="Spawn Points"
Description="please tell me whither I spawn"

WooHoo! now hopefully the hardest bridge has been crossed (as far as the UnrealScript side of things goes) and once I get It to tell me locations of everyone every few ticks, then weve just got to figure out how some other equally as difficult code type program is gonna read it and make sense of it.

Saturday, January 22, 2005

well, Ive been doing lots of project thinking and the like. And heres what I got so far.

When people are playing a game their little characters are constantly colliding with the level (that way they dont fall through). So If I can get unreal to output a text file (or write in its little log file) and write to it say every half second, telling it the xyz of the "actors" collision with the map (remembering that mid-jump there would be no collision).

Then take that information and from it re-create the map thats being played.

But why? I hear myself cry. Well, the game and indeed the maps are very goal orientated, so alot of the level is never even touched during regular game play. So you wouldnt end up with a copy of the original map, you'd end up with some new level created from the most popular areas of the original. Also it would be interesting to see the difference in the generated map, if the same original map was played twice, perhaps by different kinds of players (godlike and otherwise).

Im in an angry mood tonight. Some people seem to think that I give a damn about their lives, and excuses, and neuroses (as if that makes them a more intriguing individual), well I dont.

I just dont care. (and neither does anyone else)

Sanctimonious little f%"$&r!

Too much power can go to ones head. And with a brain missing certain sectors to begin with...

Thursday, January 20, 2005

Sky is such a funny word...

well, UT2004 arrived yesterday. Looks good. I have just attempted to install it on a uni computer with partial success. The editor works and I can run all the files except the all important UT2004.exe. Stupid thing thinks I didnt give it a correct CD key, I gave it a perfectly valid CD key but apparently (as my account is unable to edit the registry) It cant remember. Im also not sure if these computers have the most recent directx on them, but I didnt even bother trying to install that.

On an "i need to remember this note", UT2004 (scripting) dosnt require you to create the .int file after compiling you script, you simply type these two lines in the command window

ucc dumpint MutHelloWorld.u
ucc exportcache MutHelloWorld.u

This will create a .int file and a .ucl file (UT2004 needs both).

Oh yeah, you needed to add something like this to the ass of your script too.

FriendlyName="Regeneration Plus"
Description="All players regenerate health to super health limits."

Tuesday, January 18, 2005

I have got such a bad headache... its horrible, must be due to lookin at this all day.

I would like to apologise to Mr.Tom Betts for doing this to his fabulous game, but I was without things to do (what with my car animation here at home) and needed to entertain myself.

Monday, January 17, 2005

Right, attempted to figure out more of this unreal script but failed miserably due to my lack of UT2003 or UT2004. Apparently most tutorials etc are based around the newer versions, good job 2004s on its way. Having said that I did manage to make a mutator the altered the gravity really low... you could jump from one side of ctf-face to the other.

On another note been doing this animation thing, deary me Im crap at it, took me like hours to make one wheel spin one way and the other go the other way.

Sunday, January 16, 2005

my very first mutator...

(makes you wanna weep dont it)

How twas done...
* create the directory mutHelloWorld/ and MutHelloWorld/classes (in unreal tournament base directory)
* created the file HelloWorld.uc in MutHelloWorld/classes using notepad.

class HelloWorld extends Mutator;

function PostBeginPlay()
Super.PostBeginPlay(); // Run the super class function (Mutator.PostBeginPlay).
Log("Hello World"); // Write our log message

* change the UnrealTournament.ini file (in the system folder) to include EditPackages=MutHelloWorld (after the last EditPackages entry)
* use command prompt (cd C:\GAMES\UNREAL~1\SYSTEM) and compile you script by typing ucc make
* New file is created MutHelloWorld.u
* Create file in system folder

HelloWorld,Description="Hello World Example")

and that as they say is that, however this process is different for UT2003 and UT2004. A few minuites ago I ordered UT2004 for (god bless them) so that I could have the bestest version of UT instead of the old version.
I dunno any excuse... I can almost hear my mum, you should be workin not playin!

oh yeah I almost forgot to say what this "mutator" does... start the game (enter a session) then turn the exciting game back off again, go into the system directoy and open the unrealtournament.log and there for all to see are the words

ScriptLog: Add mutator muthelloworld.helloworld
ScriptLog: Hello World

wow... i can barely contain my excitement.

Okay I'm sticking with the "game" thing. wiki looks like a good place to learn about unreal scripting... Im thinking about using some of the game data like spawning, the (up to date)leader board, perhaps even ammo regeneration? those kind of things anyway, to affect well errr... something else (its all very sketchy right now, in the back of my head im thinking the level itself)

Anyway the point is I have a suspicion learning a bit of scripting isnt gonna hurt.

Friday, January 14, 2005

First post for ages!

Many things have happened: I got a terrible cold/chest infection (nearly gone now), I got a new monitor and graphics card, Ive been rendering stupid max tutorials, Ive been trying to animate a lego car (animation is so not my thing), and we had our first week back after Christmas.

As for the new project it sounds fun, however I just cant get my head around it at the moment because of this animation deely. Hoping to finish the car by Monday then I can think about more fun and interesting things.