Progress week 7
Greetings everyone, this week it's my turn to fill you in on what's been going on. You might remember me from a few weeks ago, anyways, i'm one of the programmers, Anton.
This past week we have not gotten that much visual progress done. But fear not, we were fixing non-visual bugs so to say.
I will go ahead and write what we fixed , and how we did it, code wise.
There was a bug with the gatling gun, it was supposed to rotate in the way that it was shooting so to say. But, knowing programming, something was bound to go wrong and it did. The tower kind of went to the middle of the map and started shooting, instead of staying in it's place. The mathematics behind the rotation is a method, which uses both locations and Atan2. We chose to use Atan2 because it's simpler and quicker than doing it manually with cos and sin.I will go ahead and write the "raw code" of it if anyone is interested.
Atan2(Location1.Y-Location2.Y, Location1.X - Location2.Y)
It turns out the rotation was right all along, but the origin of the rotation was faulty. Now, the problem was the texture was 43,32 pixels. And we scaled it, down (with code) to 32,32. Our method to get the correct origin took the textures width and height and split it in 2. And since it was scaled with code, the origin became faulty and gave us all a big headeache. So the lesson here is, dont scale textures with code unless necessary...
We also had another quite brutal bug. The game created around 200 items every second. So if you played the game for a long time the lag became unbearable. There was no visible explaination for this, but as it turned out, it was the explosions that weren't getting removed properly. The solution that we went with was to temporarily disable the explosions.
Last week our enemies had a speed of the datatype "int". But since we wanted the game to be even more adjustable, we decided to change it to a Vector2. It was a simple matter of converting values to float. We have a method that sets the speed, and that is where we converted values to float and it worked. Now that it is a Vector2 it allows for different speeds in x and y, if we want. This is a matter of balancing, and we're not quite there yet.
There is also a new type of enemy, it's a slow moving and very high health enemy. Code wise it's nothing special, it's the exact same as all other enemies, except with different speed and health.
Even though the undead enemies were exactly the same as the pirates, they crashed the game. After about an hour of debugging it turns out it was a syncing error, the undead inherited from the wrong class cause the sync in didnt work as intended.
Another thing that we fixed this week is the mines. What we did was we made them upgradeable via the shop. Not only the mine though, the wizards are now upgradable aswell.
The menu, now has another functioning button, the credits button. It's a slideshow of our names.
About a month ago we uploaded a demo of our game for you guys to watch. Now it's 4 weeks later, and we have made so much progress that we decided to upload another demo.
Anyways, that was all we had for this week. Thanks for tuning in, and i hope to see you back soon.
//Anton
//Anton
Inga kommentarer:
Skicka en kommentar