Skip navigation

Category Archives: GE&P 2B ~ 2012

Managed to get a pre-alpha build of the demo sorted out in about 5 hours tonight, after fighting with flash and porting all the code to the 2011-08 build of udk (from 2010-06 which is what it was running).
See an actual level, mostly working, with… well, shit AI lets be honest, but it’s progress none the less!

Dear Epic Games,

Please write a proper debugger and tag errors properly.

yours sincerely, someone who has just wasted an hour on a problem due to a checkbox in flash.

For your reference:
Someone elses thread about the same thing, that isnt really mentioned anywhere else


So, spent a few hours on Spacehawk this morning (I guess we’re on er… pre-alpha/internal 0.71 now?). Navi ring now points to quest locations/markers (largely thanks to James Wild being a vector maths prodigy) , AI is much much much less shit and fires properly on a radial distance check! WooHoo! and er… yeh, explosions are a bit prettier now? also, cleaned up a tonne of code that was using useless trace/radial checks.  anyway, video coming in next couple days!

Back on track now! New 2nd monitor and a replacement HDD and a fresh install of XP and we’re good to go.

Fixed a bug with the quest/mission icon system where it wasn’t clearing the previous bool properly, so added an extra check to make sure

//within quest actor
//Quest 1
 if(Touched==0 && SHPC.MQ01==false && SHPC.MQ02==false)
 GoToState('Nommed', 'Begin', true);
 //Quest 2
 If(Touched==0 && SHPC.MQ01==True && SHPC.MQ02==false)
 GoToState('Nommed', 'Begin', true);


just an extra bool check in the IF statements to make sure we switch properly and the last quest stage gets cleared.

Going to revise the camera switching later to more of a zoom effect on button hold rather than a proper camera switch and make some more changes to the AI so it’ll be less shocking, also need to fix some bugs in the score code, cos that really is dodgy as hell right now.

Massive hardware failure due to power surge and bad wiring, blown out my 2nd monitor (an old 24″ CRT) and nuked my windows install in the process. so… reinstalled XP, I tried 7 , I really tried but it’s just too horrible and I’d prefer to keep living in 2002. So, back on track in a couple days when new 2nd monitor arrives and i can sort out this .net framework so UDK actually works agains!

Dev Blog:
Just looked back over the initial research and realised i’d lost almost all of the original feel I was aiming for… dammit all! Got other projects to work on for the next couple days but back on track with  SpaceHawk Wednesday where it’s gonna undergo a game-play overhaul and try to get back to my original vision rather than messing about with vertex painting and other sillyness which has sidetracked me the last week.

Dev Blog:

Alright so it’s 8am saturday morning, been working on Spacehawk Death/dying code for the last 3 hours and it’s hit me; why am I Using Pawn for the ship… why am I not using actor! After writing maybe the 5th workaround of the day to avoid pawn camera issues on death it really makes me wish that it’d started this extending actor and done it from scratch, wouldn’t have had half as many quirks to deal with!

Still torn on weather to scrap the EXP system or use it in conjunction with Score cos atm it looks silly running both side by side, so one of them has to go.

Now, if only I could think up a good reason why the ship transforms and has super weapons then it’d be a good day 🙂

//Play Dying instead of using Event Death or the state for it
simulated function PlayDying(class<DamageType> DamageType, vector HitLoc)

 //This Pawn:
 bIsFirstPerson = false;
 //Hide all mesh components

 //And make sure the explosion is cleaned up after

//SuperClassed Pawn:
 bPlayedDeath = true;

 //and then do the Controller stuff:
 foreach AllActors(class'SpaceHawkPlayerController', SHPc)
 //restore defaults to avoid problems


 SHPC.bStopSpam = false;
 SHPC.bDisableInput = false;
 SHPC.bChanged1 = false;

 SHPC.IgnoreMoveInput(true); // stop you moving about when dead


 //And Finally, move states So we can respawn:

Really is just a massive list that goes “DO THIS TO AVOID PROBLEMS”  -.-‘ oh well, more coffee makes everything better, even sloppy code!

Dev Blog:
Seriously considering canning the Exp system entirely in favour of a score system, where you level up based on score and can use those points to purchase items instead and make each level timed instead of “do this till it’s done”. Implemented the Score system basics, get 100 score for a kill, and +4 per second you’re alive, which is much more similar to the original flash demo. Think this might work better than the Exp system so gonna implement the Score system for now and run both side by side until i’ve made a decision.

Dev Blog:
Had some serious help from James again concerning vector maths and gimbles for flight controls, and while it was easy enough to get two cameras implemented, it was a right pain getting the 2nd cam to orient around the player, so, vector maths away! Ended up with much cleaner code than I started with here and managed to drop a lot of the old vector instances. Work ethic has dropped through the floor though after a couple hours working on this, thankfully I still have The Darkness II to occupy me in the mean time.
Basic control layout and Frontend / HUD have undergone some changes lately as well, largely to include a kill counter and the basis for a score system, although i managed to ruin the base HUD class entirely and had to revert to earlier code, it’s all good now. Will begin working on an actual “Score” system tonight, and possibly a “timer” system to work out how long you spend on each level and award a score accordingly.

Revised Frontend -> HUD -> Cameras:

SpaceHawk HUD_NEW

Revised Camera Code:

//Extract From SpaceHawkPlayerController.UC

//Part of Project SpaceHawk ~ Matt Tonkinson 2012

simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
 local SpaceHawkPlayerPawn SHPP;
 local vector CamStart;
 Local Vector AX, AY, AZ, Offset;

Offset = Vect( -1024.0f, 0.0f, 64.0f );

 bIs3rdPerson = false;

CamStart.Z = 2048;
CamStart.Y = 0;
CamStart.X = -512; // 0 is topdown - 512 is offset correction for Pitch adjustment

 out_CamLoc = Location + camstart;

out_CamRot.Pitch = -13384; //-16384 TOP DOWN // X offset adjusted to compensate
 out_CamRot.Yaw = 0; //side to side
 out_CamRot.Roll = 0;

If (bIsFirstPerson == false)


If (bIsFirstPerson == True)

foreach AllActors(class'SpaceHawkPlayerPawn', SHPP)
 out_CamRot = SHPP.Rotation;

 GetAxes( Out_CamRot, AX, AY, AZ );

foreach AllActors(class'SpaceHawkPlayerPawn', SHPP)


 out_CamLoc = SHPP.Location + ( AX * Offset.X ) + ( AY * Offset.Y ) + ( AZ * Offset.Z );
 out_CamRot.Pitch = -8; //-16384 TOP DOWN // X offset adjusted to compensate

out_CamRot.Roll = 0;

 `log("CameraSwitched THIRD PERSON");



return true;


It’s Here! SpaceHawk pre-alpha V0.68

 Dev Blog:
The last couple of days have been great for progress, been sleeping long hours and working nights so had plenty of chance to get things done without interruptions. had a huge amount of help with cleaning up references and understanding how the hell DeltaTime works from James Wild  .
Spent a good few hours staring blankly at the Beyond Unreal vector maths page  trying to wrap my head around the lot, seems to be getting there though since nearly all of it makes sense now!
Progress is steaming ahead now on the flash front, and as much as I despise AS 2.0 I cant deny it’s not effective or easy to use, still, be nice to see an AS 3.0 update for scaleform coming soon.
Map wise, still cant build the maps using Lightmass due to “OUT OF MEMORY” errors, despite having a tonne of ram and being able to build without it in 2-3 seconds, oh well, legacy lighting it is =)


Scaleform Frontend Implemented (N.Y.C)
Quest Objectives Added
Quest Markers Added
Homing Missiles Added
Shields system implemented
Repairs system implemented
EXP Gain  implemented/effects added
Heads Up Display (HUD) updated to include revised graphics and a contextual abilities menu (N.Y.C)
Basic “Level Up” system working (N.Y.C)
Sound Effects Revised (N.Y.C )
AI Revised  again (N.Y.C)

%d bloggers like this: