Tuesday, March 29, 2011

Gameplay / UI Weekly Update - Queen Pawn, Game Ending Conditions and Food Pile Mechanics

This week I continued working on the gameplay features of the "game ending" conditions and the food pile.

The conditions for the game to be ended have been programmed. Two queen pawns are placed on the map (right now they have a very basic AI pattern that I created, they just wonder around without shooting anyone), their teams are setup, so you can't shoot your own queen. Once the opposing queen is eliminated, the games notifies you that you are the winner (or the loser) and then takes you to the main menu, which at the moment is the standard Front End map, since next week I'll be working on Scalefrom to create our custom ones. A video demonstration is attached.




Also for the food pile was easy to set a static mesh on the UDK editor with a trigger to spawn new bots when touched. I tried this method and it worked, but it didn't kept any record of the food remaining in the pile and wouldn't let players deposit the collected food into it. So an implementation in Unrealscript was needed. A custom class was created for the Food Pile and a new Action Sequence class was created. This was done in order to been able to call the GiveFood and DepositFood methods of the pawn class via Kismet, once the trigger is touched.

Right now I managed to deposit the food that the pawn is carrying to the FoodPile and is reflecting it in the command line, as the picture shows below. After this the series of considerations of how many food you need to spawn a need bot or regenerate health have to be implemented. Next week I'll be finishing this feature and also learning scaleform in order to create the menu maps.

Tuesday, March 22, 2011

Gameplay / UI Weekly Update - Food Collecting Mechanics

This week I worked on the picking up food mechanics and they are finally working. In order to do this a new attribute had to be added to the antz_pawn class (our custom pawn class) and the pickup event for the pickup factory class was overwritten. Now each time a pawn touches the mesh for the food, adds the defined amount to his food attribute.

The end game mechanics have seen some progress. Doing some research I started modifying the CheckEngGame class, overwriting the events, but since I manage to set as peaceable some of the custom classes in UDK, I can work the conditions in Kismet now (The main menu and the ending menu have to be included in the map file, according to some tutorials I've been trough, this is why handling this conditions in Kismet is easier). If this conditions are managed by the map, functions and events of GameInfo class related to the game end, will have to be overwritten. I've managed to get the queen bot placed and spawned when the game starts and also to keep track of her health, but I'm working on ending the game and sending the player into the menu again.

This week I'll be working on this game-ending conditions on kismet and the creation of the custom class for the food pile (Which I'll set as peaceable too, in order to use the level editors trigger).

The image below shows in console, how every time the player touches the food (place-holder mesh at the moment), increases his food meter by 25, which is the amount for the package defined in the custom class as default properties.


Tuesday, March 15, 2011

Gameplay / UI Weekly Update - Canvas HUD and Food Items Framework

The clipping problems with the UI have been solved by now. Some rendering attributes for it have to be set in order to use them in every "draw" function later on.

I've received from Craig a basic layout of the UI, but since gameplay elements need to be incorporated in order to get to an alpha state, I've been concentrating the remaining gameplay features. We agreed on the last meeting that once all the this elements are incorporated, I'll send him an email with all the information that needs to be displayed, so he can create a UI texture to be used in the game. Right now all the information displayed is set on a class for easy access when we have the definitive version of the UI.

I've been working on implementing the food and the queen into the game. Food has been quite a challenge. I created a framework of (at the moment) two classes, one for the pickup features and other one for the food package itself. This framework allows me to customize all the possible features of item in UDK (mesh, spawn time, effects, rotating items, base or no base, etc.) and also the quantity of food that each one of the packages have. For this I'm sending an email to Craig in order for him to tell me about his idea of how this should be displayed.

Also, while I was programming this I came across the two possible mechanics for using the food: Having a device that will display a HUD to spend food in the desired resource (in this case the food will have been implemented as ammo for this device, I did test for this and it worked) or having a pile of food in the base colony, so you have to go back and put the food on it and then use it. The two alternatives where presented to the team on the weekly reunion and they agreed on the second one. Right now I'm working on implementing this alternative and also deciding how the food is assigned to the player and bots, since previous efforts (creating a new value in the default UDK pawn class) manages to crash UDK. The solution for this is the creation of the attributes, along with overriding functions to add and destroy inventory in the custom pawn class.

The second gameplay feature I'm working on is the queen. I've already mange to get a bot as a peaceable class, but once the game starts is not doing anything just standing still, this due to the AI problem that Mert mentions for the UDK December release. I'm recompile in the Nomvember release and see how it works. The modification on the "game end" function have started in order to get this as the definitive condition to end the game, but since this function has lots of heritage, a lot of backtracking has to be done.

I hope by this weekend to have this two features completely implemented.

Sunday, March 13, 2011

Soung log 4


Trigerring sounds using Kismet.

A simple sound test done by trigerring the sound considering the player in collision with the trigger volume. The design for the trigger is made inside the kismet. With a soundnode,delay, and a counter for comparision (for example). To make the sound loop in the trigger we use the int .

Tuesday, March 1, 2011

Gameplay / UI Weekly Update - Canvas HUD Test

This week I've been working on a basic UI for the game. In order to get this working, I've been studying the Canvas and HUD classes. The fist one allow me to draw on screen (text, figures, symbols, textures, etc.) and the second one if for more user driven displays (like the cross-air).

So far I've been going through this classes to see what kind of methods is available and which one is the information that can be displayed. I've make a new class in UDK for our interface, which displays the health, character name, current weapon and ammo. All this variables are updated in real time.

As it is shown in the picture, there is some problems with the long names for the weapons and the character names, I've been trying to figure this out and it has to do with some clipping problem, in which I'm working right now.

This is by no means the final UI or HUD that we are going to be using, just a place holder, so we now how to show the information and the variables that we need to use. Also the functions have been created in a way that the resolution or aspect ratio in which the game is played, won't affect it.

More elements are going to be incorporated, once they are being programmed into the game (food for example). Also, I have already started doing research on how the menus are created and handled. Finally a talk with Craig will be needed, to define if he has some ideas for the HUD, since a texture-template can be created with all the elements, to be called by the coordinates on the image.

This week, I'm going to continue working on the UI and menus for the game.

Sound - Log 3

Sound effects update
Bullet impacts (randomised)
Player landing upon jumping
Scripting
WOTgreal is more handy to work with unreal scripts. On adding sounds to the pawn class the sounds work fine but the sound effects are not unique to our player (i.e the AI makes use of the same sound). The soulution is each of the custom sound classess have to be extended from the base class so that all ants dont have the same voice tone and produce same sound effects.