I started the alpha with making a flowchart of the whole game process starting from the very execution of the game.
Let' start from the very beginning! I created absolutely emptry project. Now probably I have to put some assets from that Lerpz project. But before! I need to check copyrights!
Not sure if I could use that Lerpz character so I went to the Internet to check some free. Wow! It's so difficult to find anything there! I found some robot characters but it seems there were no animations included! Ok, seems I have to use that Lerpz for now..
Where is Hieu??? I cannot reach him and according to the shedule we have to finish the alpha tomorrow!!! Again I am doing everything alone!
Ok, no panic, I think I should download that lerpz tutorial and use it as a base for the alpha. That will be more easy).
So here's how it looked at the beginning:
WOW AMAZING! Hiue just called me back and told that he is not going to work on the project ANYMORE!!! Hey, I didn't expect that!! He could at least warn me about that earlier so I woudn't spent extra time thinking how to do that together. Well, thats something really weird, I believe if you begin doing something, especially in a team, you MUST go to the end! For me this is the betrayal! I really hope I wouldnt be in such a situation in next projects and working life. But maybe this is a good experience and now I know more about relationships in teams and people.
Hieu said he is not that motivated anymore and actually it's not the thing he expected. I am wondering what on the earth he was expecting?) Anyway I think I don't have a right to force him and no such wish so I will continue alone. Sure I won't do the game as we planned but I will do my best. Maybe my friend Peter who is interesting in game development can help me sometimes..
All right back to work. I started with hierarchy of game objects according to technical specifications. Ok it's done partly. Now I need to turn the lights off and change the skybox to stars.
In order to make a skybox I need to create material from star textures. I tried to use that texture from functional specifications but it doesn't look nicely. I think I have to experiment with shaders.. But what is shader actually? It's just a small procedure that renders the texture as I understood. So Diffuse detail seems to be the best:
I hate that bug in Unity that if I adjust smth during test play of game it doesn't save it after I return back!!
I added the torch for the Character and some highlights to see the droid itself, this is how it looks like:
All right now it seems I have to document what I did.Oh, it's not that interesting stuff as development itself but it seems I understand how it is important especially if you work in a team (of 1:))))).
Then I got rid of character selection.
All right today is the deadline of alpha according to the shedule:) I won't implement everything planned by today I am sure. Maybe again I will have to extend it.
I started with.... a torch by writing TorchBehaviour script and Torch class. Let's use Doxygen for commenting! I also need to document it in technical specs.
OK Torch is working, now let's add some batteries to increase it. This time it should be smth nice not just a sphere.
I found a greate site http://opengameart.org with lots of free game assets and there's smth similar to a battery!
So I put that flash-like object and made a prefub from it and it took quite a lot af time. Then I should think about object design. Battery is a pickup... Or maybe it doesn't worth it to think so much? Ok, just let me have a look in google whether there're nice solutions about that... No, nothing complicated, just sending onBattery that's all.
I added player member to LevelManager class. LevelManager is a singleton for each level and to make it so I found nice solution at http://www.unifycommunity.com/wiki/index.php?title=Singleton.
I did all the functionality needed to collect the chrage and increase power of light but I got one bug that ther CharacterBehaviour is null. I will fix that tmr.
Hm strange, somehow GetComponent<CharacterBehaviour>().onBatteryPickup(charge) causes a null reference exception.But CharacterBehaviour is attached to the MainCharacter game object! Aaah! I got it - GetComponent returns only scripts attached to the current objects it's not a global function or something!
OK now it's working ok, and I also created a kind of battery with physics properties so it's not just hangind in the air.
I have quite an interesting situation. MainCharacter game object has CharacterBehaviour script attached which provides basic infromation about the character and it's behaviour, as well as torch getters. It in turns uses TorchBehaviour script to get information about torch and TorchBehaviour uses Torch concept object to store the logical state of the torch. Such a recursion:) Not sure if this is too elegant:) CharacterBehaviour doesn't have Character concept object behind it! I think I should do the same as in Torch case.
I created Character class and now in GameGUI I will access only concept objects not behaviour ones.
Now I display lives of the character:
Wow this GUI system is so unconvenient for me that it take alot of time to do smth there. Layout system in imperative style is just funny!
I spent a lot of time to display basic states:
Tomorrow is the deadline for the whole project and I even didn't do yet the plan for alpha!
In previous couple of days I started doing enemies feature of the game. The current situation is tweaking damage proportion to the speed of the crate that is falling of it. Because I don't want the robot to die just from a touch with a crate.
I use relativeVelocity and impactForce to determine damage but it seems sometimes it gets too high when the character just pushes the box on the enemy. So I added a separate check for crate's absolute velocity and it seems now every trash is filtered.
I would like the robot lie on the gruond when it's dead but it seems this will be difficult... Fantastic! It's not that difficult and I got nice dead body). I just took a ragdoll of that robot from FPS tutorial and replace it with robot when it's dead.
I added apart from lives health also. Now when the character is tourching the moving enemy robot the health reduces with some speed! I will add some nice effect of touching, like flashes.
I have added also a game over window with a restart button when the character loses all lives:
I added health disppay for the character and health pickups that shines when the torch light them up.
Today is the deadline... I think I don't have so I should make smth finished today. So priority one is to make a complete tutorial level. I will do some kind of tutorials messages - they were designed as thoughtbox but for simplicity they will be just transparent windows. Also I should use FSM for tutorial progress. I have some kind of ideas for that but I will also have a look at polished versions of it on the web.. There's a http://en.wikipedia.org/wiki/State_pattern on wiki but I think it's not that appropriate for the situation.. or maybe I don't understand it just good enough.. For this simple case I will use enums of states and LevelFSM class that handles them. So there won't be any state classes. Also each gameobject that is related to level progress will have it's type as enum member. On activating, it will call OnMissionObject from LevelManager.
Now - time for the story, I will do some tutorial messages which will tell the beginning of the plot.
Ha:) I have put a skybox background for tutorial messages - I don't have time for a better one:
This was such a sprint. I was so busy with the game last hours that I didn't put any notes here. Now the tutorial is somehow complete. I make the player to study basics by picking up a battery, health, killing an enemy. At the end it meets the spaceship and the level is completed!
To do that I have inherited TutorialLevelManager from LevelManager to implement level specific states.
Now I will let my brother play the game:) If I will pass such test then I will do a screencast of the alpha version of the game (actually it must be a gold release for the course bu for me it's alpha). And then I will submit all the stuff. I was so busy with game making that I haven't upgraded technical and functional specifications:( I will do that if I will have time.
Funny! I compiled the game to an exe to be tested by my brother. But it doesn't work there!! I expected it working about the same as in editor but it freezes when I press OK on the level tutorial messages. When I disable those messages - it works fine. So the problem might be about pausing the game or GUI.
No, the problem is in TimeScale, or pausing. When I disabled pause on tutorial message - it works. I have to investigate that...
Finally I found the problem here:
IEnumerator Wait(float waitTime)
yield return new WaitForSeconds(waitTime);
I used this code to wait little bit before pause because I pause the game in the very beginning and if I don'y delay it, it doesn't pause actually. Now I have to get rid of that code.
No that didn't help, the problem is about timescale indeed.
I end up with disabling/enabling character control instead of manupulation with time.
Executables can be downloaded in Attachments section.
I recorded a screencast of the alpha's demo: http://www.youtube.com/watch?v=tHWR6kWRihc.
Now the only things I have to do is to update technical and functional specs. And then, of course make my self-evaluation.
Uh, it's a boring stuff... I think I will leave Functional Specifications as planned, so features that I didn't implement in this course but I should will be left there. Because I am going to continue working on the game after the course ends.
Now everything is done and I can end this blog entry.
Time spent - 37,5 hours
Project files with source can be found at https://docs.google.com/open?id=0Bzz99TnQsO0TSXRHWDBaZG1fUkE.
Binaries can be found in attachments.