Project ITV

Project ITV

Saturday, September 8, 2012

Tower Defense Analysis

8 September 2012

I was thinking about how the towers in other TD games fired their ammunition. As I thought about creating an ammo that traverses from the tower toward the enemy, I realise that there is a high chance that the ammo would "miss" the target because the target is constantly moving forward. Although the ammo will not miss if its velocity is high enough, what if the game has enemies that move extremely fast? I was thinking about what would happen if towers shot at creeps that moved too fast for them to aim at.

So, I decided to think about the other TD games I played.

GemCraft
GemCraft has an amazing ammunition trajectory. All the towers in the game use orbs, and if I recall correctly, the orbs are actually fired in the OPPOSITE direction from where the creeps are positioned. After firing, the orbs then slow down and gradually turn around back at the enemy, and then go full speed at the enemy. I think the orbs are actually fired in random directions 360 degrees around the tower, but their targetting system is coded such that they will always hit the creep because the ammunition will accelerate toward the target, and will eventually hit it no matter how fast it moves.

The only time the ammunition does not hit the target is when the target is killed by another tower, OR is banished (reaches the end of the path). Because they use magical orbs and not "bullets", it does not seem stupid for their orbs to disappear in mid-air. I cannot apply this technique to my game because I use lasers and bullets in some of my towers.

Bloons
Bloons is rather different from most other TD games I see. It has actual collision detection. If the monkey shoots a dart and misses the bloon it is supposed to hit, the dart does not just disappear. It continues moving on until it hits another bloon behind, or until it is out of the screen. It only disappears if it collides with the creep.

I don't think collision detection is something I want to do because it can be quite irritating for the player if an extremely fast creep spawns and starts ninja-ing its way toward the end, dodging all the bullets like in Matrix.

Some other miscellaneous games
There was this TD game I played long time ago that used towers with muzzle flash. The towers just have a flash at their muzzle and it looks like they fired something. But there are no bullets. This is possible something I can use for some towers. It does save some work because I don't have to do bullets, but eventually, I cannot have every tower in the game look like they aren't shooting anything. So, I decided to look up one game instead of just recalling all the TDs I played.

Flash Element TD 2
This is one of the earliest TD games I played. I liked it very much and I decided to try playing through it. Their towers shoot ammo as usual but they always seem to hit the creeps because the creeps are kind of slow compared to the speed the ammo are travelling at. Then, I started to become more observant when the faster creeps appeared. I noticed that no matter what, I could not see any "misses" or any ammo being wasted.

I felt like using FRAPS and recording the gameplay to observe it frame by frame what was going on, but it beame quite obvious to me after another minute of observation. The ammo would still ALWAYS travel toward their target even though it is not meant to be. It looks like the bullet they shoot are heat-seeking and curve toward the target. Indeed, most TD games probably incorporate this, and I should have guessed so from the start. With that, I think I have an idea how to create the ammo now.

Today, I tried to do a screen which manages the towers that the player owns. Basically I was aiming to be able to select towers, navigate through the inventory of towers and have the game print out the statistics of those towers, such as their health and damage values.








Monday, September 3, 2012

Second Game in Progress?

Monday, 3 September 2012, 5.05AM

I have school in 3 hours' time. But here I am awake, yet to have my sleep. Why?

I've just begun on a new project that I created on Saturday! It's called "SWTD" and is a tower defense game. This game is the reason why I wanted to learn how to develop games. Unfortunately, this is a rather large-scaled project and for me to attempt to try to build it on my own without a development team or friends is really hard.

It has been a long time since I returned to coding with AS3 again. I had slight issues recalling how to create my first project and how to set it up as well as creating the first main menu screen, but after an hour or so coding the first screen, the rest just came naturally. I also drew LOTS of stuff with photoshop. Planets, space scenes, buttons and GUI. I am still rather new to photoshop and my friend praised me, saying that I managed to do this much in two days. He also said that my art skill has increased since the last time when I worked on "Introvert". I was really happy to hear that!

I really don't think this is a game I can eventually release, but I have been extremely stressed and depressed lately, and had the motivation and urge to attempt to create something apart from "Introvert", and so, "SWTD" was born.

I have managed to get quite a lot into the game in just two days.

On Saturday, I drew an awesome main menu screen as well as several projects. I also got several screens up, including the: Level Selection Screen, as well as a Skill Tree Screen.

I also added 4 skills in the skill tree screen and they can be purchased and upgraded. They work fine. Saturday is a mad day because I was crazy enough to sleep at 7am (and woke up at 3pm the next day).

On Sunday, I managed to create a scrolling transition effect for the level select screen. It looks like as though there is a camera and the player can "explore" this galaxy.

I also created much of the interface on these two days and I am highly impressed with the UI and buttons I have created thus far. I wanted this futuristic feeling and I am sure that I have managed to deliver it.

While I am all excited about this TD project, "Introvert" is still my main project as that is the game that I am very sure is completable. This TD on the other hand, will most likely just be a project I will work on when I feel like it since it is highly impossible to be something able to be released with just me working on it.

Some problems I faced were trying to scout for a futuristic font, as well as a bug with the transition which causes the transition to jitter if the player taps the arrow keys too quickly. This has been partially solved though.

I am currently facing a huge problem with my code design. Because of the scale of this game, I need to sit down and properly think of how to code the game, where to place the files and such and how to link them.

I have a Hero, an Inventory, a BlueprintsManager, and Turrets themself, and Turrets can branch out into different classes such as "Ice", "Splash" and "Dual Shooting". It is really complicated that I can't just jump in and begin coding immediately. I did not really expect to get hindered so much by design.

It is now 5.24am and I am done with this post. I should begin to shut down my projects and tabs and begin to sleep.


Sunday, July 15, 2012

Natural Tendencies

Amongst all the sadness, I feel hurt - an indescribable pain that reminds me of reality.

Two weeks have passed since I last touched Introvert. I did not manage to progress on the game for the past two weeks. Unfortunately, I have been too busy with a School Project. On days like today, I'd think of wanting to open up the game and actually do something.

Monday, July 2, 2012

My Game after 3 Weeks

It is 1 July 2012.

This project is the most complex and ambitious thing I have ever set out to do in my life... To see it actually slowly coming to fruition is very satisfying and rewarding.

Three weeks have passed since I first created my game project on 9 June. Reviewing my progress so far, I have:
- 35 unique working levels
- A cool level selection room with pathfinding
- An achievement room without achievements (yea, what is this supposed to mean?)
- A level editor, without save/load functions yet! (I did not plan on making this at first though)
- A really nice looking main menu

And gameplay wise, I have:
- A player, a player 2 that can grow, jump, walk and animate accordingly
- I have made Enemies in the game that kills players (this sentence sounds funny)
- And I have made Friends that make players grow (this sentence also sounds funny)
Only the enemies have graphics that I'm happy with....the rest still need to have their graphics and animations upgraded.

As for gameplay elements, so far I have already done the Doors, Spikes, Keys, Blocks and they all function well, except that there is a problem with the Block collision I cannot solve :(

So on the whole, the game to me is already not as simple as how it started and has a bit of depth with elements such as the doors and keys. I'm quite satisfied with what I've done, but I am also somewhat bothered by level design... The main problem now would be that I need to redesign a few of my levels to make them better before I can continue working on level 40 and higher.

I don't really have a gauge on my progress, but the game is probably somewhat 20% complete I guess seeing how much I still have left. While I could make a complete game in four or five months at this rate, the harsh reality is that I am going to have another school project to work on... Sigh.

For milestone's sake, I guess I should take some screenshots of my current game. Maybe when I do get it completed hopefully, I'll look back and see how the game used to be. But first, what I have done today:


- Created Clouds for Main Menu
- Created awesome transition from Menu to Play
- Rearranged some levels
- Re-added the game logo to the main menu screen (but needs to change)

And now, the screenshots of what the game is like currently at the different states as well as what I have managed to accomplish so far :

I feel a certain emptiness knowing that I will not be able to see my game every day. I might be too exhausted after school to even open my project folder. It's a huge risk putting my project on hold for a long time like that. My motivation is rather high now...and I know it will only drop with time.


At the end of these 3 months of school, I may not even have any motivation left. That's what happens to me when I stop working on stuff for awhile - all my abandoned pictures and work were due to me not touching them for a period of time, and then I decided not to return to complete them any more. If I were to look through my Pictures folder, for every drawing I have completed, I'd see one drawing that I spent little to significant amount of time on, only to give up halfway through.


There's worse. I might be too busy to even remember the project thereafter... I might even forget about ever dreaming about completing it and leave the project to rot. I don't know what will happen and it scares me to think about all the possibilities.


I know for the first or second week I can probably still have time to come home and do something everyday, but I know thereafter I will be bringing home lots of "homework" to do. I will barely have time...and it feels like time is slowly passing by now. I've not told many people about this project, and well nobody asks anyway. Though it seems like a free-to-work-on project, I have a personal goal and deadline for my own game - to complete it before I graduate. It makes it worse to know that I have only one only final holiday after this, after which in October, I probably will be flying overseas for several months. When I come back, I will be dangerously close to graduating.


This project may be for fun, and indeed after three weeks, I discover it has been more than fun. I've learnt so much more than what I initially knew! Apart from fun...a percentage of why I want to make this game is for a reason I can't really explain... This game...it's just important that I complete it.

(After reading my own thoughts, I realise it may sound like I'm addicted to my own game, but no.)





Taking a look at MapleStory

I've been taking a look at how MapleStory does their maps. I coincidentally had my character parked at a town called Sleepywood, a forested place that is set at night at the forest floor. Even though it has a dark setting, the area is actually very nice and very well decorated. It has this peaceful forest kind of feeling that I enjoy looking at. I admired the art and thoughts that went into designing the platforms and especially the decorations that were placed atop them. I will get some inspiration from here. Of course, I will not replicate their graphics as their graphics are simply too good (and the style doesn't fit in the game anyway).

I realised that had MapleStory not decorated their platforms with lots of various plants, bushes, trees and natural vegetation, their maps would actually be pretty dull! Perhaps this is one technique I can apply to my game as well, just to make the game more alive and vibrant. I actually drew a rock to cover up huge areas of soil in some levels, and now I know there's more I can do to beautify my levels.

Sunday, July 1, 2012

Adding the Character Graphics


This will be just about the last day I will be seeing those boxes on all my levels. I have updated the character graphics, as well as the enemy graphics. There are two more character sprites that are currently not done yet. But I feel happy that I've completed the main character and enemy graphics! It's a step forward for me, though it is indeed quite late to add graphics. Most games settle their graphics first, yet I've only just added one of the most important game graphics nearly two weeks after I made the game. Haha. This is how the new sprites look like. I created the player sprites some time ago and the player animates at 4 to 8 frames per seconds. I have just created the enemy sprites just a few minutes ago. There are a total of 38! frames. I am extremely happy with the sprites and I run the sprites at 9 frames per second, which is my threshold, and also  the requirement I deem to make the sprites play smoothly.


These are the animations for the enemies in the game:
                                                addAnimation("idle", arrayOfFrames, 9, true);
addAnimation("run", arrayOfFrames, 9, true);
addAnimation("runFaster", arrayOfFrames, 18, true);

I have a "runFaster" which I have newly created. If the player stays near the enemies for too long, they will get angry and run at double speed (and double fps). This is a new feature that is quite late to implement, and I hope it does not mess up any of the levels. I set the timer to 10 seconds, and resets when they stop chasing the player.

That's it for the enemy graphics :)

Note: This post was actually written earlier. I actually completed the graphics about 3 days ago, but realised I accidentally "saved" the post, instead of "publishing" it. That's why I only managed to publish the post now.










Designing the menu!

Previously, I had made a game logo and menu. This was the menu I intended to use in the game.

The game logo was created on the second day I started this game project. At the bottom right of the picture below is a sample of cold colours I wanted the logo to take after. I wanted this cold, lonely feeling.
And these were going to be the actual buttons I was going to use in the game:

Notice that I simply painted the buttons' background the same shade of grey as the menu's, because I did not have any software with transparency and just made them the same colour to give the illusion that the buttons were actually transparent! Hahas

I was going to keep things the way it was.

Until I was told that my menu was very plain. Li Hao showed me several menu designs and indeed, some of them were really inspiring. I saved the designs in my powerpoint slide. (I keep a PPT slide and notepad with important details about the game.) I looked through the main menu designs used in other games and realised I had to think A LOT about how to make a good menu. I also realised from the "UP your service" program I went a week ago, that a service has several perception points. For example, a restaurant can be judged by its exterior looks and even the ambience, cleanliness and looks can affect the customers' impression of a restaurant before they even taste the food!

I think maybe it is the same for a game ... these little perception points like the design of the main menu probably count too. I will need to dedicate more time and effort into designing the main menu. I actually have something now. I took a few hours of my sleep to make this.

Don't look down on this seemingly simple menu. Simply drawing the buttons correctly took me about an hour, although I admit I should have done a better job with the buttons like perhaps adding a texture or design. The background image is something I drew 3 months ago for the pure purpose of expression. For your info, this game started 3 weeks ago. So here is a fun fact for you. COINCIDENTALLY, 3 months ago when I was wondering what size to make the picture, I randomly decided on 640 x 480 pixels. Guess what? My game is EXACTLY 640 x 480! I don't know what sorcery this is but it is really PURELY COINCIDENTAL that this picture I made months ago is actually the SAME SIZE as the game I am making now! Did I have some sort of mystical prediction that months later I would be using the picture I was going to draw? 640 x 480 is one of the more common game resolutions, but it is not fixed. How coincidental that I went to use such a resolution.

Having the background readily for use did make life easier for me, but there was still work to do. I realised that the menu was simply too dead. The stars were not twinkling and well...the grass is just motionless.

I don't plan to do anything about the grass yet, but the stars are something I can get to work. I went back to the original picture and removed all the stars from the sky until it was just the moon left. Then I re-created the stars in photoshop (YAY ME, first time using photoshop to actually create something!). I feel like I learnt more in 3 weeks of holiday than 3 weeks of school. First Flash, then Flixel and now I shall try to learn some Photoshop. How funny. Anyway, after trying to learn the really REALLY basic tools in photoshop, I made 4 frames of the stars twinkling. I made a SmallStar, MediumStar1, MediumStar2, and BigStar.

So I had four different types of stars of varying sizes. (The two medium stars have different animations). Then I coded the menu to draw a random type of star at a random place. I also expected the stars to all twinkle at the exact same timing because they are created at the same time, so I also made them twinkle at random rates. This is the reason why I did not fuse the stars onto the background and make 4 backgrounds sprites because the stars would all twinkle at the same time and look fake! Lastly, I made sure the star does not spawn over the grass, the buttons or the moon!

I am very impressed with the results, though I think having accomplished only this today makes me feel a little unproductive actually. I returned to playing games awhile today. I can't wait to show this to Li Hao tomorrow and see what he thinks about it! Hopefully it shouldn't be too disappointing because he has seen the background picture before >< and he probably expected me to use it as a menu already. Knowing him he would probably be feeling it was "expected".

Reflections
Three weeks of my holidays have passed. I briefly reflect on the last 3 weeks. It has been rather great at times, but toward the end of this week, I feel slightly solemn, wishing that I could enjoy it better.

But never mind that. The end of the holiday means that I have to go back to school soon and Major Project is something we will be working on for the next three months.

That means for three months I won't be able to work on my project as much :(

This is very sad for me as I wanted to complete this project as early as possible without sacrificing any quality. Sadly, with Major Project in the way, I might have to delay the project and wait more than three months to complete the game, and I think it is likely that it will drag the time needed to over four months because I expect a really busy and stressful life when school starts. I will hardly have time to work on the game anymore. Argh!

When I wake up later, it will be a Sunday, and it will be the last day of my holidays. On 2 July, school starts. Major project starts...

I guess...it's time to really do as much as possible tomorrow before I lose the chance to work on it as much as I can now...