Tuesday, January 23, 2007

Aiming with Crosshair + Version Control +SP Level

Aiming with a Crosshair

The major thing I've done since the last update is implement the code that allows the user to aim around the level using a crosshair. All they do is position the crosshair on the screen where they want the projectiles to land, and let loose torrents of destruction. Right now it just works for the Shock Rifle, but it should be a trivial task to add the functionality to *most* of the remaining weapons. Redeemer alt-fire will probably pose its own challenges.

Version Control

I've set up a subversion account on a server and now have version control for the mod. This would be an even bigger bonus if someone else was working on the code with me, but at least if I break something I'll have something to fall back on and I can easily show other people my code if I need to.

SP Level

Made a basic outdoor level to run around in and test things. Fun!


Saturday, December 02, 2006

Clockwork Instructions

Instructions to Install Current Version of Clockwork

  1. Get the latest build from: http://www.doomfire.net/paperrobot/builds/
  2. Extract Clockwork.zip to your UT2004 directory, preserving directory structure. I would do this by moving Clockwork.zip to your UT2004 directory, right clicking, and selecting "Extract Here".
  3. Click "Yes to All" if prompted to overwrite.

To Play Clockwork

You will need to make a copy of your shortcut to UT2004.exe that includes the option "-mod=Clockwork"

  1. Copy your existing shortcut to UT2004
  2. Right click the copy of the shoutcut, click properties
  3. Change the Target field to include the "-mod=Clockwork" option
    • For example, mine is:
    • C:\UT2004\System\UT2004.exe -mod=Clockwork -WINDOWED -LOG
  4. Hit OK then double click your new shortcut

Instructions to Add Monsters to your Clockwork Levels

  1. Open UnrealEd
  2. Click on the pawn at the top to open Actor Class Browser
  3. File -> Open Package -> select and open Clockwork.u
    • Now in your actor list you will see SPActors
  4. To add a monster that is there when the level starts::
    1. In the actor browser, select SPActors -> A_MonsterSpawnAtStart
    2. Right-click the floor where you want the monster and select "Add A_MonsterSpawnAtStart Here"
    3. Double click the new spawn to change to type of monster that is spawned
  5. To add a triggered monster spawn::
    1. Repeat steps 1-3 above except using the class A_TriggeredMonsterSpawn
    2. In the actor browser, select Triggers -> Trigger
    3. Right-click the floor where you want the player to trigger the monster spawn and select "Add Trigger Here"
    4. Double click the trigger, go to Events, and set the Event field to a keyword like "spawn1"
    5. Double click the A_TriggeredMonsterSpawn, go to Events, and set the Tag field to the same thing as the corresponding Trigger's Event field ("spawn1 in this case)
    6. Done! If you want to avoid a mess of monsters though, you should double click the trigger again, go to Trigger, and change bTriggerOnceOnly to true.

Make Your Level Show Up in the Map List

To see your level in the Map List after you start the Clockwork mod as shown above all you need to do is save the map with the first 2 letters of the map name being "CW" in the ...\UT2004\Clockwork\Maps directory. For example:
  • C:\UT2004\Clockwork\Maps\CW-MonsterTest.ut2
  • C:\UT2004\Clockwork\Maps\CW-Test.ut2

Thursday, November 30, 2006

Constrain Monsters

keeping busy lately.. managed to tinker a little at work today. haven't tested anything.

Constrain Monsters on X axis

  • Change skaarjpack.MonsterController like you did PlayerController to undo any offset for pawn in +/-Y
    • Before made the change by overriding XPlayer, which is a child of PlayerController
    • Specified the change in the extended Gametype ClockworkGame, with: PlayerControllerClassName="Clockwork.ClockworkPlayer"
    • Monster has a line: ControllerClass=class'SkaarjPack.MonsterController'
    • In the ClockworkPlayer controller I set the Y value of the pawns location to 0 everytime PlayerTick was called.
    • In the 2DMonsterController I set the Y value of the pawns location to 0 everytime Tick was called.
      • need to test
    • :: Could stop forcing Y=0 when something dies
    • :: Obviously a hack job, but we'll see what happens
    • :: Need to see what can be done with Goals, paths, AI to make monsters work better in 2D

Wednesday, November 15, 2006

Working on better understanding the code needed to spawn monsters

2006-11-15 Working on better understanding the code needed to spawn monsters

Currently looking at the code for the SP framework v2 from Frag House Interactive

Class A_MonsterSpawnAtStart extends SPActors placeable;
This class is placable in the level and spawns a monster when PostBeginPlay() is called.
By default it creates a pawn of MonsterClass=Class'Skaarj' with MonsterHealth=0 (0 just makes it be the default health).

Class A_TriggeredMonsterSpawn extends SPActors placeable;
This class is placable in the level and spawns a monster when Trigger(Actor Other, Pawn EventInstigator) is called.
There are also triggered spawns for Actors, DynamicLights, and Tentacles in the SP framework.

Monster Classes (ported in SPFrame from Unreal SP game):

Behemoth Krall Skaarj
Brute Manta SkaarjAssassin
CaveManta MechanicalSpider SkaarjLord
EliteKrall Mercenary Slith
FireSkaarj Nali Sniper
FireTitan Nalicow Tentacle
FireTitan_Ammo NaliRabbit Titan
FireTitan_Fireball Officer Trooper
FriendlyBase Pupae Warlord
Gasbag Queen Zombie
IceSkaarj Razorfly

Conclusion: Spawning monsters doesn't look like it will be very hard at all. The classes the SP framework uses to do this are very simple. =) Maybe I can finish this, make a pic with graphics for all the monsters, then figure out how we'll make the player aim and how to keep the monsters playing in 2D.

Tuesday, November 14, 2006

Side-Scrolling + Action :: Dec 1

On December 1 I'm going to have the code ready to add monsters into our SP levels. Aaron and I and hopefully Roger and Tim as well are going to have some 2D type levels to play around with then too, so this should be really entertaining if all goes according to plan.

Hopefully this push will get everyone back in the right mindset to be doing the work we need to do to really create something cool. I'm going to be out of town all of next week, so getting the code ready is priority 1 and then I can play in the level editor.

Also coding a better way to aim in from the side perspective would probably be a good idea too. :-D

Tuesday, October 24, 2006

So today (after a few days off which I ensure you were not mispent) I made a few more modifications. Now the character is fully constrained in that he can't look up or down or backwards. This isn't really ideal for the final product, but it's what I was going for in this iteration, so I'm happy. He's also constrained in that his Y-axis is set to be a constant 0. This way he's "2-D" in that he can't just decide to start moving along a 3rd axis.

I also made a little test level which was basically a long ridge of terrain along the X-axis for the lil' guy to run on top of. It turned out pretty well, but I never did go back in and fix my sky box after I moved it. C'est la vie.

Next step I believe will be to change the controls to be a little more appropriate and maybe tweak the camera a bit to be more immersive.

Tuesday, October 17, 2006

3D Side Scroller

Our current project is a 3D side scroller. 3D in that it exists in the UnrealEngine, but also 2D because it's a side-scrolled. So far I've played with the code a bit and have managed to constrain the camera in a way that's pretty pleasing. Attached a screenshot at the bottom. Next step is to constrain the pawn from looking up and down as well as moving in the Y-axis.

Maze Mod in Review

I have been working with 2 of my co-workers to create a simple mod that was intended to just get our feet wet with regards to modding for UT2004. Our first project was a maze mod in which a player would navigate through a levels we each designed and collect 6 coins to progress to the next level. As of right now I've done all the coding I intended to do for this mod and am just waiting for completed levels from each of my co-workers, so we can add in the coins and declare the project a success. Following is what I did in Unrealscript
  • Created a new Gametype called "CoinCollector" (since the objective is to collect coins that just happen to be in mazes, this made the most sense to me)
  • Changed PlayerReplicationInfo to track the number of coins a player has collected
  • Created a CoinPickup that incremencts the coin count for the player that collected the coin
  • Changed the win condition for the game to be a player having collected 6 coins (didn't bother to make this work for multiplayer.. in fact currently if more than 1 player picks up a coin, the game will never end)
So that's effectively done. Could obviously be polished, but that's the gist of it and I want to move on to other projects since this one is mainly interesting as an introduction. Once we have everyone's levels with the coins in them I'll zip em' up so the internet at large can view the source and even play CoinCollector on the 3 included maps if they like.