Hello everyone,
I just thought it would be nice to share my work with all of you guys
My tower defense game Version 1.0 and 2.0 in 2D. 11/Oct/2012 (Click to show)
My tower defense game Version 3.0 in 3D. 14/Oct/2012 (Click to show)
I got my web server and my SQL server up and running for my game
I'm so so sooooo very happy. Its like I'm in heaven
But hushhhhhh don't tell my ISP that I'm running a server in my house. they might block it 
Here is the web link to my website, but It will not be stable for now since its not finished yet. so it might be down.
http://giantpixelstudios.no-ip.org/
And please don't hack my database. I don't need a PlayStation network incident in here.
Implementing networking into my game using TCP protocol 5/Nov/2012 (Click to show)
here is my new update.
so for the past few days I have been trying to implement networking in my game using TCP protocol. I have been able to send and receive a small packet that contains the player name. It worked perfectly.
However my performance dropped dramatically when I used networking. Before implementing networking I was getting around ~1900 fps. After networking my fps dropped to ~95 !!!! So I decided to use threading. So now I have the main thread which runs the game update functions and drawing functions. and I have one thread for the server and another for the client and one for the login system.
Also I have created a simple in-game console to help me debug my game. I have to say my life is 100 times easier now. how did I not think of that before ?!
one last thing. I'll update my website today and keep my server running 24/7.
this is my server specs please don't laugh
CPU:- Core 2 Duo E6600 2.4GHz
RAM:- 3GB DDR 2 @ 800MHz
Here you go guys enjoy
I bought a new domain 6/Nov/2012 (Click to show)
I just bought a new domain and I called my game studio Vault 16.
Here is my website:-
http://vault16software.com/
How to overcome the performance issues in a tile based engine? 7/Nov/2012 (Click to show)
Tower defense update #9 25/1/2013 (Click to show)
Tower defense / Map editor update #10 15/2/2013 (Click to show)
I have a particle and a lighting system now. And my website looks 100x better than beffor 14/3/2013
Hello everyone,
So for the past few weeks I have been working on my engine. Specifically I was working on the UI system. But then I got so bored and I decided to make a lighting and particle system in my engine. and in this video that is exactly what I will be showing off. Both of the systems use simple pixel shader and a light mask map.
It took me 3 days to make this. In the particle system you can adjust the following:-
So here is the video I really hope you guys enjoy it
Also if anyone is interested check out my website. It looks a lot better thanks to wordpress.
www.vault16software.com
Edited by Fantasy - 3/14/13 at 11:34am
I just thought it would be nice to share my work with all of you guys

My tower defense game Version 1.0 and 2.0 in 2D. 11/Oct/2012 (Click to show)
So for the past month or so I have been working on a 2D tower defense game using XNA and C# for the PC platform. I'm hoping to bring the game to the Mac and maybe Linux in the future using Monogame.
I have rewrote the game 3 times already. First time I was using SFML and C++. Then the second time I switched to C# and XNA. And finally this time I have updated the UI, I have updated my map editor, I have also added modding support and finally I have completely rewrote the game engine and added network support.
So here is my first build video (more like version 15):-
And here is my second build video(more like version 19):-
If anyone is interested at all I can upload videos of my whole development process and all the game versions from 1 - 19.
thanks for reading
I have rewrote the game 3 times already. First time I was using SFML and C++. Then the second time I switched to C# and XNA. And finally this time I have updated the UI, I have updated my map editor, I have also added modding support and finally I have completely rewrote the game engine and added network support.
So here is my first build video (more like version 15):-
And here is my second build video(more like version 19):-
If anyone is interested at all I can upload videos of my whole development process and all the game versions from 1 - 19.
thanks for reading

My tower defense game Version 3.0 in 3D. 14/Oct/2012 (Click to show)
Ok since I have decided to rewrite my game again I thought it would be nice to do something big this time.
So ladies and gentlemen I would like to introduce to you
.
.
.
Tower defense 3D v3.0 !!!!
Sorry for the bad models but Blender decided not to export textures with the FBX format
I can't get the dam thing to work with textures.
looks like I might try Autodesk maya and see if it would work.
Also the camera class need some work.
its 5AM so i'm going to sleep
. enjoy 
3D Tower defense version 4.0 16/Oct/2012 (Click to show)So ladies and gentlemen I would like to introduce to you

.
.
.
Tower defense 3D v3.0 !!!!
Sorry for the bad models but Blender decided not to export textures with the FBX format
I can't get the dam thing to work with textures.looks like I might try Autodesk maya and see if it would work.
Also the camera class need some work.
its 5AM so i'm going to sleep
. enjoy 
This is a big update. This is my 3D tower defense game version 4.0 !!
I'm so happy with this build. It look great and my code improved 500%.
Enjoy
I just want to add I LOVE YOU GOOGLE. They gave us everything. they are one of the best companies in the world and I love and respect them so freaking much.
I just want to say thank you Google for giving us a lot of amazing things and two of the things that made this project possible. Android OS and Sketchup.
You have no idea how much I suffered with 3D modeling software like Blender or 3D max or even Maya. But Google made it soooooooooo easy to do any 3D model in Sketchup. So for that I thank you Google.



my 2D Pre-Alpha tower defense game 17/Oct/2012 (Click to show)I'm so happy with this build. It look great and my code improved 500%.
Enjoy

I just want to add I LOVE YOU GOOGLE. They gave us everything. they are one of the best companies in the world and I love and respect them so freaking much.
I just want to say thank you Google for giving us a lot of amazing things and two of the things that made this project possible. Android OS and Sketchup.
You have no idea how much I suffered with 3D modeling software like Blender or 3D max or even Maya. But Google made it soooooooooo easy to do any 3D model in Sketchup. So for that I thank you Google.




Ok here is my 2D Pre-Alpha tower defense game.
http://www.mediafire.com/?i60a6jhqc6q9aql
Also you need XNA installed in your machine, here is the link:-
http://www.mediafire.com/?hsus7ft0duw33ke
Warning tower sometimes don't shoot at enemies. There are still few bugs that I need to work on.
This version support modding.
You can do the following:-
You can do all that in the following files:-
Tower Defense Pre-Alpha\Content\Map.txt
Tower Defense Pre-Alpha\Content\EnemyWaypoint.xml
Tower Defense Pre-Alpha\Content\Wave.xml
Tower Defense Pre-Alpha\Content\Engine\Config\TileConfig.xml
Tower Defense Pre-Alpha\Content\Engine\Config\EngineConfig.xml
My game and web server are up and running 2/Nov/2012 (Click to show)http://www.mediafire.com/?i60a6jhqc6q9aql
Also you need XNA installed in your machine, here is the link:-
http://www.mediafire.com/?hsus7ft0duw33ke
Warning tower sometimes don't shoot at enemies. There are still few bugs that I need to work on.
This version support modding.
You can do the following:-
- Create your own map
- Change the game art style
- Choose how many enemies you want to spawn each wave
- Set the enemies health, speed, and texture.
- Number of second between each wave spawn.
- Set the enemies path.
You can do all that in the following files:-
Tower Defense Pre-Alpha\Content\Map.txt
Tower Defense Pre-Alpha\Content\EnemyWaypoint.xml
Tower Defense Pre-Alpha\Content\Wave.xml
Tower Defense Pre-Alpha\Content\Engine\Config\TileConfig.xml
Tower Defense Pre-Alpha\Content\Engine\Config\EngineConfig.xml
I got my web server and my SQL server up and running for my game

I'm so so sooooo very happy. Its like I'm in heaven
But hushhhhhh don't tell my ISP that I'm running a server in my house. they might block it 
Here is the web link to my website, but It will not be stable for now since its not finished yet. so it might be down.
http://giantpixelstudios.no-ip.org/
And please don't hack my database. I don't need a PlayStation network incident in here.
here is my new update.
so for the past few days I have been trying to implement networking in my game using TCP protocol. I have been able to send and receive a small packet that contains the player name. It worked perfectly.
However my performance dropped dramatically when I used networking. Before implementing networking I was getting around ~1900 fps. After networking my fps dropped to ~95 !!!! So I decided to use threading. So now I have the main thread which runs the game update functions and drawing functions. and I have one thread for the server and another for the client and one for the login system.
Also I have created a simple in-game console to help me debug my game. I have to say my life is 100 times easier now. how did I not think of that before ?!

one last thing. I'll update my website today and keep my server running 24/7.
this is my server specs please don't laugh

CPU:- Core 2 Duo E6600 2.4GHz
RAM:- 3GB DDR 2 @ 800MHz
Here you go guys enjoy
I just bought a new domain and I called my game studio Vault 16.
Here is my website:-
http://vault16software.com/
So for some time now I had a big performance issue in my game. Now if you don't know, my game is a tiles based game. I wrote my engine to take a 2D array of integers and assign a 2d texture (image) to each integer.
So if the array contains number 1 it will draw grass texture (image) in that position. If the array contains number 2 it will draw a stone texture in that position and so on.
The array would look something like this:-
Now this is a 25X19 array which means my engine will have to draw 475 tiles (image) every frame. Now that doesn't seem much but it’s still a problem. Now let’s say we have a 100X100 array. That means the CPU has to send 10,000 images (draw calls) to the GPU every frame. And this is a big problem since the CPU can't send that much data to the GPU. So in other word my 3930K @ 4.5GHz in one thread can't handle sending that much data to the GPU to process.
CPUs are just slow. Even the fastest CPU in the world is very slow.
So let’s say you have a screen resolution of 1280X720 and each tile you have is 32 pixels. And let’s also say you have a map or array size of 100X100. So 100 * 32 = 3200 pixels. So you will have a map size of 3200X3200 pixels. Now here is the question. Why draw the whole map when you are only seeing 1280X720 pixels of the actual map?
So before we were drawing 3200X3200 pixel (map size) and we were getting around 200fps. Now after only drawing the visible parts of the map which is 1280X720 we are getting ~1000 fps !!! Isn't that great?
But still if we look at our GPU usage, we will see that the GPU usage is only about 70%. Why not 100% ? Well we are still sending 880 draw calls from the CPU to the GPU. So we can see that the CPU is bottlenecking the GPU. Once again the CPU is very slow and can't send that much data to the GPU.
How did I calculate that the CPU is sending 880 draw calls? (Click to show)
So today I came up with the best solution which will get you 100% GPU usage. But first you have to understand that the more textures (tiles, images, 3D objects) we try to send from the CPU to the GPU the lower our frame rate gets and the lower our GPU usage gets and the higher our CPU usage gets. That is because once again the CPU is very slow.
So why render 880 small images every frame when we can render one big image? Well for one if we want to change how our game level looks then we have to tell our artist / designer to draw the same level again with the same art but in a different way. And that will cost time. It’s just easier to take tiles (small images) and make our game level with them.

But why not use the best of both worlds. Let our artist create tiles (small images) and construct the game level with them but also have the advantage of having just one big image to send to the GPU. And that is exactly what I did.
In my engine I load the game level which is basically a 2D array and then the game will draw the array (map) once. Then the engine will take all of these images which are stored in the GPU buffer and store them in one big image. A texture 2D variable. Then we will take that one big image and send it to the GPU to render it instead of rendering 880 small images.
And that is how I did it. Before my fps was 1000fps now its 2100fps
I hope you guys found that helpful even a little
Finally chat works in my game using TCP protocol and multithreading 13/Nov/2012 (Click to show)So if the array contains number 1 it will draw grass texture (image) in that position. If the array contains number 2 it will draw a stone texture in that position and so on.
The array would look something like this:-
Code:
1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,2,1,1,1,1,1,1,1,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,
1,2,1,1,1,1,1,1,1,2,1,1,2,1,1,1,1,2,2,2,2,2,2,2,1,
1,2,1,1,1,1,1,1,1,2,1,1,2,1,1,1,1,2,1,1,1,1,1,2,1,
1,2,1,1,1,1,1,1,1,2,1,1,2,1,1,1,1,2,1,1,1,1,1,2,1,
1,2,2,2,2,2,2,2,2,2,1,1,2,1,1,1,1,2,1,1,1,1,1,2,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,2,1,1,2,2,2,2,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,2,1,1,2,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,2,1,1,2,1,1,1,1,
1,1,1,1,2,2,2,2,2,2,2,2,2,1,1,1,1,2,1,1,2,1,1,1,1,
1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,2,1,1,1,1,
1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,2,1,1,1,1,
1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,2,1,1,3,3,
1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,2,1,1,3,3,
1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,2,2,2,2,3,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
Now this is a 25X19 array which means my engine will have to draw 475 tiles (image) every frame. Now that doesn't seem much but it’s still a problem. Now let’s say we have a 100X100 array. That means the CPU has to send 10,000 images (draw calls) to the GPU every frame. And this is a big problem since the CPU can't send that much data to the GPU. So in other word my 3930K @ 4.5GHz in one thread can't handle sending that much data to the GPU to process.
CPUs are just slow. Even the fastest CPU in the world is very slow.
So let’s say you have a screen resolution of 1280X720 and each tile you have is 32 pixels. And let’s also say you have a map or array size of 100X100. So 100 * 32 = 3200 pixels. So you will have a map size of 3200X3200 pixels. Now here is the question. Why draw the whole map when you are only seeing 1280X720 pixels of the actual map?
So before we were drawing 3200X3200 pixel (map size) and we were getting around 200fps. Now after only drawing the visible parts of the map which is 1280X720 we are getting ~1000 fps !!! Isn't that great?

But still if we look at our GPU usage, we will see that the GPU usage is only about 70%. Why not 100% ? Well we are still sending 880 draw calls from the CPU to the GPU. So we can see that the CPU is bottlenecking the GPU. Once again the CPU is very slow and can't send that much data to the GPU.
How did I calculate that the CPU is sending 880 draw calls? (Click to show)
Well we take the screen resolution which in our case is 1280X720 pixels and divide it by the tile (image) size which is 32 pixels.
so 1280 / 32 = 40;
720 / 32 = 22.5 so let’s say 22;
40 * 22 = 880 tiles (images) or draw calls that need to be sent from the CPU to the GPU to render.
so 1280 / 32 = 40;
720 / 32 = 22.5 so let’s say 22;
40 * 22 = 880 tiles (images) or draw calls that need to be sent from the CPU to the GPU to render.
So today I came up with the best solution which will get you 100% GPU usage. But first you have to understand that the more textures (tiles, images, 3D objects) we try to send from the CPU to the GPU the lower our frame rate gets and the lower our GPU usage gets and the higher our CPU usage gets. That is because once again the CPU is very slow.
So why render 880 small images every frame when we can render one big image? Well for one if we want to change how our game level looks then we have to tell our artist / designer to draw the same level again with the same art but in a different way. And that will cost time. It’s just easier to take tiles (small images) and make our game level with them.
But why not use the best of both worlds. Let our artist create tiles (small images) and construct the game level with them but also have the advantage of having just one big image to send to the GPU. And that is exactly what I did.
In my engine I load the game level which is basically a 2D array and then the game will draw the array (map) once. Then the engine will take all of these images which are stored in the GPU buffer and store them in one big image. A texture 2D variable. Then we will take that one big image and send it to the GPU to render it instead of rendering 880 small images.
And that is how I did it. Before my fps was 1000fps now its 2100fps

I hope you guys found that helpful even a little

Finally chat works in my game using TCP protocol and multithreading 13/Nov/2012
So for the past few days I have been trying to let players communicate with each other in my game. and today I finally did it.
So how it works? Well all the clients connect to the server and when client 1 type "Hello " in the chat box, The client put that data into a packet and send it to the server. Then the server receive that packet from client 1 and will send it to all the connected clients.
Also my client use multithreading. 1 thread for the game loop and another thread for networking.
here is the video:-
enjoy
new update 9/1/2013 (Click to show)So for the past few days I have been trying to let players communicate with each other in my game. and today I finally did it.
So how it works? Well all the clients connect to the server and when client 1 type "Hello " in the chat box, The client put that data into a packet and send it to the server. Then the server receive that packet from client 1 and will send it to all the connected clients.
Also my client use multithreading. 1 thread for the game loop and another thread for networking.
here is the video:-
enjoy

new update 9/1/2013
Hello everyone,
It's been a while since I updated this thread. I have been working really hard these past few months and I haven't had the time to post a new update. Well to be honest, I was lazy
so anyways here is the new update. I have done so much work under the hood. so here is a list of the things I added:-
Sorry for the aspect ratio.
Hello everyone,
It's been a while since I updated this thread. I have been working really hard these past few months and I haven't had the time to post a new update. Well to be honest, I was lazy

so anyways here is the new update. I have done so much work under the hood. so here is a list of the things I added:-
- Add friends to your friend list.
- Create and host a game.
- There is a game lobby.
- You can chat in the game lobby.
- You can chose which map you want to play.
- There is a server browser where you can connect to any server you want. (works in internet mode only)
- UI has been updated.
- You can play up to 4 player co-op in online and LAN mode. (16 player co-op is supported)
Sorry for the aspect ratio.
Tower defense update #9 25/1/2013 (Click to show)
Tower defense update #9 25/1/2013
Hello everyone,
So for the past few weeks I have been spending all my time working on the multiplayer side of the game. I fixed a lot of bugs and I added a lot of new features.
So let me tell you what I added:-
Sorry for the aspect ratio.
In the older version of the game there was an issue where if the client starts lagging the game will be out of sync and enemies position in the server will be different from enemies position in the client. In other words what is on one client screen will be totally different on the other client screen.
So I fixed this issue by sending the enemy position ever 30 milliseconds. In other word I send the enemy position 33 frames per second. If you watch the video you will notice that the client is not lagging anymore, even though I'm only sending the enemy position 33 framers per seconds. I made both the server and client enemies move according to their path that is set in the map file. Just like in the older version of the game. However I added an if statement that say, if the client starts lagging and get out of sync, then use the positions of the server enemy. So that way I don't use a lot of bandwidth and I make the gameplay smooth as butter.
Here was the issue:-
What every programmer needs to know about game networking
Hello everyone,
So for the past few weeks I have been spending all my time working on the multiplayer side of the game. I fixed a lot of bugs and I added a lot of new features.
So let me tell you what I added:-
- Now you can disconnect from the lobby.
- Now you can chat in the lobby. (Fixed all bugs)
- Ready and Start Game button was added.
- Now you can start the game from the lobby after everyone get ready.
- The host can add towers and the client will add them too. (Like actual Multiplayer).
- Enemies are in sync. So if the client start lagging the game will still be in sync.
Sorry for the aspect ratio.
In the older version of the game there was an issue where if the client starts lagging the game will be out of sync and enemies position in the server will be different from enemies position in the client. In other words what is on one client screen will be totally different on the other client screen.
So I fixed this issue by sending the enemy position ever 30 milliseconds. In other word I send the enemy position 33 frames per second. If you watch the video you will notice that the client is not lagging anymore, even though I'm only sending the enemy position 33 framers per seconds. I made both the server and client enemies move according to their path that is set in the map file. Just like in the older version of the game. However I added an if statement that say, if the client starts lagging and get out of sync, then use the positions of the server enemy. So that way I don't use a lot of bandwidth and I make the gameplay smooth as butter.
Here was the issue:-
What every programmer needs to know about game networking
Tower defense / Map editor update #10 15/2/2013 (Click to show)
Tower defense / Map editor update #10 15/2/2013
Hello everyone,
In this update I'll be showing you my map editor. I have done so much work on the UI. Every piece of UI in my map editor is done by me from scratch using only C# and XNA. I have not used any outside library for the UI.
In the map editor you can create as many layers as you like to draw on them.
You can also load up a any tileset and add tiles to the map.
enjoy
Hello everyone,
In this update I'll be showing you my map editor. I have done so much work on the UI. Every piece of UI in my map editor is done by me from scratch using only C# and XNA. I have not used any outside library for the UI.
In the map editor you can create as many layers as you like to draw on them.
You can also load up a any tileset and add tiles to the map.
enjoy

I have a particle and a lighting system now. And my website looks 100x better than beffor 14/3/2013
Hello everyone,
So for the past few weeks I have been working on my engine. Specifically I was working on the UI system. But then I got so bored and I decided to make a lighting and particle system in my engine. and in this video that is exactly what I will be showing off. Both of the systems use simple pixel shader and a light mask map.
It took me 3 days to make this. In the particle system you can adjust the following:-
- Particle starting color and ending color.
- Particle gravity.
- Particle speed.
- Particle rotation angle and direction.
- Light color for each particle.
- Particle life.
- Particle position and size.
- Particle texture.
So here is the video I really hope you guys enjoy it
Also if anyone is interested check out my website. It looks a lot better thanks to wordpress.
www.vault16software.com
Edited by Fantasy - 3/14/13 at 11:34am







, its driving me crazy 