Math Defense or so

Enemies are what is currently represented by circles with numbers.

Are these sketches good. If they are I’ll start the line art:

2 Likes

I like them, yes.

Anything you think I should change?

This sounds like a good idea, I just got that done :+1:
I made it so that you can drag the tanks to change their position, and there’s a clip that you can drag and drop the tank clips on to sell them.

I’m only using a placeholder for that now. Maybe we can replace it with something like a trash bin, box icon, a button, or such. I’ll leave that up to you to decide.


I made the selling value half of the tank’s original price, rounded up.

I also added in a way to earn hearts when energy is low.

Aside from minor changes and bug fixes, that’s pretty much everything.
Here’s the latest file:
Math Defense.wick (103.8 KB)

2 Likes

Hi, just a small update, I have created this tile set for the terrain…

I recommend to take the png, and copy/rotate as needed, then instead of using 80x80px, resize them to be 81x81px, so that extra pixel overlaps the 80x80 grid, so no white lines are visible.

terrainSample6-6-2023_22-20-00.wick (20.9 KB)

2 Likes

These look nice!

I just finished adding them in, it didn’t take that long:


The range of the tanks is a bit easier to see without the grid too

I made the size of the tiles 80.59 to hide the white lines you mentioned.
I also made it so that the grid only shows when moving/ placing tanks on the map:

Here’s the latest file:
Math Defense.wick (95.1 KB)

Finished:
Math Defense6-7-2023_13-42-20.wick (42.1 KB)

2 Likes

Woah, these look amazing!

I tried them really quickly with the project and they look great

I might change the enemy health system a bit tomorrow to improve it
We might be able to replace the numbers with something like a health bar or hearts or such for the enemies… what do you think @jovanny ?
Math Defense.wick (104.6 KB)

2 Likes

Very, very nice effort guys. @DesmondE the enemies are very cool!!!

@Hamzah_Alani, life bar are ok for now. Ill send you some improvements dor the menu and hearts, etc… also there are 2 new tanks that I would want to introduce. Give me a day or so.

2 Likes

Another Update:
I have animated the enemies, but at 30fps. I think we don’t need 60fps anyways. @Hamzah_Alani, could you consider to cut the fps by half?

Also, I have edited enemy4, so it can match a little bit more with a game.

MathDefenseEnemies.wick (69.5 KB)

1 Like

Name: Mines
Math Operator: Subtraction
Currency Cost: x1
Impact Space: 1 block
Enemy Damage: 3

It has 2 states, deactivated and activated.
During deactivated:

  • It doesn’t damage the enemy.
  • The math problem is visible.

then when the user solve the math problem, it goes to activated.

During Activated:

  • The math problem is solved and no visible anymore.
  • It will wait until the enemy pass through it.

After explosion, the mine despaired and it is not useful anymore.

The advantage of this is that users can activate the mine by solving the math problem way before the enemy even walk through it. Disadvantage is that is a one time use.

2 Likes

Latest File: Math Defense.wick (151.3 KB)


Summary for changes:
:white_check_mark: Added in animation for enemies
:white_check_mark: Replaced enemies’ previous health text display with health bars
:white_check_mark: Added in new weapon: Mine
:white_check_mark: Changed FPS from 60 down to 30
:white_check_mark: Adjusted most numbers & equations to work with the new FPS setting
:heavy_minus_sign: Needed to move answer text outside menu since shop got larger (temporary?)

I also added a small extra detail to the mine: they damage not one but all enemies within range when exploding. It’s not easy to get, but if you solve the math equation exactly when 2 enemies are on the mine, they’ll all get die, unless if an enemy has enough hp to survive (hp>3).

3 Likes

I can’t see it until night, but the mine behavior should be to be set before the enemies are on the mine. Is that still on place?

Yep, once you answer the equation for the mine, it activates, even if there are no enemies on it.
If activated, it’ll only explode once touched by an enemy, then deactivates after that. Once deactivated, it won’t activate again until the level ends. Every new level, the mine resets.

1 Like

I have tried to export the HTML to play it full screen in my PC, but the currency remains in zero when the game starts.

Whoops, I just found the issue–
When I added the mine on the road, the mine clip was going over the enemies, so I moved the enemies in the top layer to fix that. However, by changing the layer the clip was on, the order that the code was run in changed slightly (top clips run before lower ones), which led to the project trying to use a variable before it was defined in another script.

Thanks for pointing that out, here’s a fixed version: Math Defense.wick (151.2 KB)

2 Likes

Game Assets Refresher soon! Here is a sneak peek… (I haven’t finished, give me a day or so…)

3 Likes

I’m still working with some of the sprites, once they are ready I’ll send you all of them in a separate wick file so you can integrate it into the game. I’ll also work in some animations as well. Meanwhile, @Hamzah_Alani, you can work on these new shop items.

Time Hourglass:

  • Math Operator: Division
  • Enemy Damage: None
  • Cost: $1
  • Behavior:
    ** It is disable until the user solve the division problem.
    ** Once activated, It will stop Enemy movement in the entire map for 3 seconds or so (This could change later)

Hearts: (This will be replacing the current random heart mechanic that we have in place right now.)

  • Math Operator: Random between the 4 ( + - * / )
  • Cost: $1
  • Behavior:
    ** Depending on how many you put at the map, it would appear on the map after you take a hit.
    ** Example: if you buy 2, by dragging them into a map, they will be disable at the beginning until you take a hit. When the user takes a hit, the first heart would be enabled with a math problem. If the problem is solved, then the heart disappears and the user recover the heart at the energy UI. Then, one disabled heart is left, when the user takes a second hit, then the second heart will be activated with the math problem and so on…
2 Likes

Are you using another software to draw those?

2 Likes