[Game] Defend the Kingdom!

Finally finished the game! here is the link I used some images but I manually modified the images for the sprite sheets. I have a new found respect for those who like to create the images and the sprite sheets! I did learn quite a bit by doing this. If you do not hear the sound please go to options and use the volume slider. The game has 3 levels and 3 levels of difficulty. I will do some enhancements.

1 Like

Hi Greg,

I really like the theme, it’s very refreshing :slight_smile:

I noticed that I couldn’t place defenders where I wanted, they always went into the far left hand column? Also, I had a scenario where I had two defenders on the same square in the column after clicking the row again.

After a few attackers, the time continued to go down, the funds stopped increasing and no more attackers were scene?

I like the text providing the count down at the bottom, it may be more useful at the top of the screen for the player, and to create the space you could consider placing the costs of the defenders over the defenders sprites (like we do in the course etc).

As I said, really nice to have a more unique theme, I will keep my eyes peeled for your next update - well done :slight_smile:

Oh, and the Win music made me recall the Old Spice advert from many years ago… hehe… very good :slight_smile:

Thank you Rob for taking the time to play the game! I designed the game so only 1 defender can be on the 1st column on each row. It seemed to be too easy to have 3 defenders on the same row. Not sure why you were able to get 2 defenders on the same square. I tested for that scenario and couldn’t get it to do that in Unity. The defender’s that cost more points have additional health, can shoot at a faster rate and add addtional points. The attackers are random so sometimes there is a gap when the attackers spawn and I did not want to pause the timer until a new attacker was spawned. I did not want to bore the player. I might change that with the 3rd diffiulty level. I designed the game so the attackers spawn on each row before starting to spawn on the same row again.
The funds are added only when the projectiles are created and the funds are decreased when the attackers are attacking the defenders. Yes, there is limited room on the top and I was looking at it from the player’s perspective, when playing the game for the 1st time, and putting the points by the defenders offered no explanation. I have an Easter egg in the game so when an attacker gets past the defender and if they have more points then when they started the level they win. One more note the difficulty works I timed the clock and attackers speed by the difficulty level.
Thank you for your comments.

1 Like

Hi Greg,

Just to follow up on the minor issue I spotted;

Not sure why you were able to get 2 defenders on the same square.

After a little more testing, it would seem that it allows it if the defender is a different type to the one which is already placed.

Hope this helps :slight_smile:

Interesting I have tested it with Unity and with my build game it does not allow me to place the defender on the same cell. What browser are you using and which defenders? Even in game bucket I am not able to re-produce the issue. I have tried all levels with the different levels of diffuclty.

1 Like

Hi Greg,

Google Chrome, both Knight, and Dark Knight it would seem;

Hope this helps :slight_smile:

Ok, not sure if this is a Chrome issue I will have to explore that. IE and Mozilla developer edition is working fine. Doubt if this is an OS issue but are you using Mac?

1 Like

I will try on chrome thanks!

1 Like

Windows 10 this end, unlikely I would imagine. Good luck! :slight_smile:

Nope still not able to emulate the issue :face_with_raised_eyebrow: works on my version of Win 7 in chrome and Win 10 in chrome which the OS should have no baring on the issue. It should be using JavaScript as the main engine. Not sure exactly what Unity is using in the background. Very interesting bug.

1 Like

How bizarre…

To fathom it out, I’d be happy to build your project at this end, on Windows 10 and then upload it to GameBucket.io for a comparison? I suspect your project files are larger than 10mb (forum limit), so if you did zip the whole project up you’d need to share via something like Google Drive / DropBox so that I could grab it.

Again, only if you want to, the offer is there. :slight_smile:

Thanks for the offer but I will look into it. I did zip it up but even with the 10mb limit the project should have been rejected on game bucket’s site. The project does exceed the limit. The size is 28.3 MB unzipped. 28,988 KB zipped not sure why the size would be an issue because if it was than I should have been able to reproduce it. I have asked some friends to play the game and see what they are experiencing. I will try itch.io as to compare the sites. I do use the cloud to back up my data. I am now on a mission. lol

1 Like

Sorry, when I mentioned the 10mb limit I meant here, on the forum, as in for sharing the project files, not the actual game upload.

If you change your mind at any point just tag me @Rob and I will respond. :slight_smile:

I added the code to prevent the game objects from spawning in the same space but I still cannot emulate the issue ugh! Nor has several other people playing the game. Also noticed that on Android I can place the game object outside of the core panel( right next to the slider) so I have the code to check for the Y coordinates to make sure they are in the correct range. Mathf.RoundToInt method can return 0. Will have to test that feature on another build. I also noticed that when you win the third level the catapult is still attacking. I will correct that. I am beginning to understand that the different OS’s does effect how the game is working so Unity is using different engines for the builds. The application.quit method proves this. (Java) supports this feature. JavaScript has no concept of that method. It does not surprise me considering that when I am developing web apps we have to check for each browsers parsing features. Just difficult to adjust the code without seeing the end result.:stuck_out_tongue_winking_eye:

1 Like

Glitch Garden V1.1 I made the changes but still cannot emulate the issue. Hopefully this version has resolved it!:thinking:

1 Like

Hi Greg,

What ever you have changed has resolved the issue I had raised. I am unable to place either the same or the other type of defender on the same space now.

By the way, I really like the little battle sprite, hehe, one of my favourites! Nice work, well done :slight_smile:

Thank you for helping to improve upon the game Rob. Your input is appreciated.
I have it on Google Play in Alpha testing. Another issue is that the player can (being fast at clicking on the defenders) drop all the defenders on the game board in one go. Corrected that so they can only add what the points allow. If they get lucky enough to get 3 defenders on the board then will run into a negative value and will have to wait longer to add another defender. I guess you can call the defender is on credit. lol

1 Like

Great to hear this Greg, well done.

Regarding the spending of points, might just be a bit of a logic check/change to prevent that from happening.

FYI,
For those who want to prevent the defender sprites from exceeding the total points (Stars), having more sprites on the board than the allowed points, move the calling defender subtract method to the defender spawner class. If you place it in the animation and call it there as explained in the course the points will be updated after the sprite has been created. So the solution is to call the method before you instantiate the sprite and then check for Insufficient funds. This is a better solution than the previous comment.

I hopefully this will save other game developers time.

1 Like

Privacy & Terms