Tower Swap - Endless Puzzle - Competition Entry

Started by curtastic, July 02, 2018, 21:54:58

Previous topic - Next topic

Derron

Quote from: curtastic on August 05, 2018, 00:00:29
@cannons
If you make it face left and shoot left only, you'd want it on the right edge of the board and that shouldn't be impossible.

I did not really get it... of course it isn't impossible?
moving to the most right tile only is possible when coming from top/bottom (keeping direction of before) - or coming from the left (making it facing to the left).


Quote from: curtastic on August 05, 2018, 00:00:29
@animations
I don't know how to make the chest animation look better besides add more frames, I could speed it up.

Yes ... maybe speed the animation up a bit, this makes it "snappier".


Quote from: curtastic on August 05, 2018, 00:00:29
@grass
That's what I'm doing, I darkened one and tiled it. Should I made the seams straighter, or more blended?
Yes now it looks proper - I am not sure but it was different some time ago... or.... my mind is tricking me.


Quote from: curtastic on August 05, 2018, 00:00:29
@night
Unless I recode with openGL I can't alter image color on the fly. I could put a semi transparent black rectangle over the screen at night but that would cause lag on android.

So how do you do the fade-to-night then? Can't you do the same for the items?



This is how it scales on my small HP Laptop (Windows 10, 1280x800) - pay attention to the black outline and how poor they look.
Other items do not have such harsh black outlines - and therefor they might scale up a bit better (less contrast between item color and outline color/pixels)


bye
Ron

curtastic

@cannons
So if you swap a cannon right it faces left? I guess people could get used to that.

@night
To turn to night I have a darker version of the ground. When getting dark I draw that behind everything then fade out the regular ground. To make everything darker I'd need a darker version of every frame of every object.

@cannon image
Ya I want to get the cannons redone, they are the ugliest thing in the game. For now I'll make the border gray. The game is built for 320x432, so any screen in which the shorter dimension isn't an exact multiple of that, some pixels become bigger than others. It's hard to notice though. I probably should have made the game 32x32 tiles so it's harder to notice. My desktop browser has height 974 so each image pixel is drawn with either 2 or 3 screen pixels, which is a 50% jump. I could lock it at 640x864 for screens that are taller than 864.

@steam
Yes I want to get the game into Steam. I'm currently working on this every day so it should happen.

Derron

Experienced some odd situations:


1) When tapping on tiles during a "lag" (eg. system updates or so) results in tiles switching places
I tapped during an update and suddenly a ballista was placed 4 tiles away from its original position (other row, other coloumn)


2) Item creation slot differs when match3 created by falling-blocks not "swap"
I for example had this layout


--x----
--x----
xxooo--
-------

when "ooo" got removed (and some other blocks collapsed too)
-------
--x----
--x----
xx   --
-------


they moved down to fill the gaps ... and you would assume the tower item to get created in the 3rd coloumn ... but it was created in the first one!

-------
-------
--X----
T  ----

I assume only "manual swapped tiles" get marked as "create there" instead of storing the last "moved in" block position. Suggestion is: for each cell in the game store the last "occupied" time (so when an item got attached to it - by a swap or by a fall-down). Use that time to choose at which spot of a match-X you create the tower/item.


3) Sometimes things do not get created
I had some tiles, swapped them and it created a 4 in a coloumn and a 3 in the neighbour coloumn - but it only created one of both items.


4) +move item is odd
The gold-item does not decrease swap-count when creating a match3 - shouldn't it cost a swap-turn but provide +2 as benefit? (it's a minor but it might be more "logical" if it behaved so). 


5) Still got difficult start situations 
Got start scenarios in which it was not possible to cover all lanes properly. So eg. you are able to get 2 ballistas (+ a cannon?) and then you have 2 dragons flying on a lane without ballista. The cannon (lvl1) is only able to kill 1 ...


6) boss fights
I would suggest to add some boss enemies - which provide you bonus lifes. Of course you could then increase difficulty a bit so that bonus lifes are not just decreasing difficulty of the game.


7) HUD
While the HUD is work in progress you might consider adding a "dark to transparent" background on top (height = HUD height) to make the HUD a bit more "distinguishable" from the background. A slight darkening might already help.


8 ) Bitmapfonts - SpriteAtlas
Instead of storing each character image separately - couldn't you use a simple spritesheet (all chars in one image) and then draw a sub-rectangle of the image? Will decrease initial loading time as file requests are rather expensive (especially on the web-platform). Rendering speed could benefit too, as less texture switches are needed.

Same of course could be said about every sprite in the game. If you want to replace stuff very often, consider at least to store "animations" in a sprite sheet (so all treasure sprites in one image, all dragon sprites in one image, ...).


bye
Ron

curtastic

1) Or you're crazy. jk. I don't know how that's possible.
2) Good idea. Okay it upgrades the one tile moved now, if some moved and some didn't. If they all moved it still defaults to first in the array.
3) Oh they are all the same type? That counts as a match-7 if they're all the same type and all connected. I guess it shouldn't count as one unless they are connected by a 3-in-a-row.
4) Haven't you ever bought a Scratcher and it just says you win 1 free Scratcher? It's the greatest pointless thing. The chests are going to open up with gold in them as the main way of farming in-app currency also. Almost always 1 gold.
5) Ya but if you have infinite lives to keep restarting it's okay. I'll have to balance it if it costs a life to start a new game and you can run out.
6) Yep I want to try this.
7) Good idea I'll do that for now. I want a font with a border and have the icons be outlined better.
8 ) Right now it's drawing with the CPU so it would actually draw slower with a spite map because it would have to clip it each time. I'm likely going to port the game to Unity because you can get good ad deals and some of the publishers around here get picky. I just met with a puzzle app publisher / friend in Mountain View by the new Facebook building because we're that cool.

Derron

@ 3)
Nope, were 2 different types.

@ 1)
Happened multiple times when I played via chrome browser on an android device doing some "updates" in the background (also afterwards it had some slowdowns here and there...maybe postprocessing updates / recreating some stuff in the background).


@ CPU
Wrong programming language / engine then ;-)


@ Unity
If that helps out... at least you learn something new.


bye
Ron

Derron

@ Lags
When I have a lagging phone (display off during game, then unlock after a while - so previously suspended stuff get re-awakened) I can move a tile without any higher costs.


@ FPS rate and logic rate
Seems logic rate and render rate are connected instead of separated.
So when rendering with 20fps the whole game gets slower instead of just skipping some renders.


@ missiles get removed
Imagine a >lvl1 ballista is firing 4 arrows ... the first three hit an enemie, the last one (the 4th) is now not trying to hit the next enemy but just vanishes.
This means that higher level items loos efficiency - especially if other towers hit too (so only 2 of the 4 arrows would be needed).


bye
Ron

Derron

@ bonus moves on multi-matches

When you have a multi-match-3


  x
  x
xx x <-

it sometimes gives 2 bonus moves (2 extra solved "x")
and sometimes it gives 3 bonus moves (as if it dissolves a tower).

Maybe this happens when logic already created a tower at the spot but the spot is marked for deletion ? Happened just once yet (3 moves).


bye
Ron

Pingus

Excellent game design ! Is it made with MonkeyX ?

Derron

Quote from: Pingus on August 12, 2018, 15:45:14
Excellent game design ! Is it made with MonkeyX ?


No... Touchbasic seems to be used.

Bye
Ron

Derron

@ floating point issues
Seems you are not rendering at fixed coordinates - or scaling is not properly done


Borders around the tiles - on some more (see on the right) than on others (next to it) or just barely visible (tiles outside the map).


bye
Ron

curtastic

@ missiles get removed
Ya every projectile has a specific target enemy. Would be too slow to check collision of every enemy every frame since its a web game. Will work on a way for projectiles to re-target.

@ FPS rate
When it becomes a native app, the app will not be available on any device that it lags on. I could do frame skipping for web and just in case.

@ bonus moves
A match-5 of materials should give 2 extra moves unless it's a treasure chest, then 3. A match-5 of level 1 towers would give 6 extra moves.

@ Lags
what do you mean without higher costs?

@ floating point issues
What is your screen resolution? Does it happen with a smaller browser window?

Derron

Quote from: curtastic on August 13, 2018, 20:11:39
@ missiles get removed
Ya every projectile has a specific target enemy. Would be too slow to check collision of every enemy every frame since its a web game. Will work on a way for projectiles to re-target.
Just had this again - Ballista lvl 4 (?) ... and it was not able to shoot at 3 dragons as they were far away (near top, tower at bottom and just a single "hill" on the lane). While the tower would be fast enough the dragons were faster than the "arrow refresh"...
So I died (again ...) while the towers were upgraded far enough to go past some more levels without further upgrades...



Quote from: curtastic on August 13, 2018, 20:11:39
@ FPS rate
When it becomes a native app, the app will not be available on any device that it lags on. I could do frame skipping for web and just in case.
Do not make apps inavailable just because your "loop" is flawed. Not all of us need 60fps - you need to do your logic fast enough (eg. 60 logic updates per second) but it should never matter if you are able to "render" fast enough. Render is "optional", logic is "required".
Split Logic and Drawing apart and use "tweening" ("I am at 0.4 of 1.0 to the next update" -> so draw dragons as if they moved 40% further already).
 

Quote from: curtastic on August 13, 2018, 20:11:39
@ bonus moves
A match-5 of materials should give 2 extra moves unless it's a treasure chest, then 3. A match-5 of level 1 towers would give 6 extra moves.
As said I had sometimes different numbers - think it processed stuff already which it should not - so it processed tiles twice.


Quote from: curtastic on August 13, 2018, 20:11:39
@ Lags
what do you mean without higher costs?
I even had it on my desktop machine (multi core, not "limited" by your game). During a "tiles collapse and build a tower" I was able to move the "in that moment getting created"-tower to another tile - without loosing one of the "switch tile"-turns.


Quote from: curtastic on August 13, 2018, 20:11:39
@ floating point issues
What is your screen resolution? Does it happen with a smaller browser window?
1980x1200
When manually resizing the window "some pixels" the borders are gone.
Nonetheless: do not scale your stuff to "non integer" pixel values. Also all tile positions should be integer based to avoid any "gaps".

Side note: without moving the browser window I see items "flickering" during their renders. not the whole tile but the "borders" - as if the scale is not fixed and sometimes it needs to render 1-2 more pixels to the right or left. And nope, it is not an animation being offset - I am talking about a non-animated/static tile.
If there is interest, I could create a little recording/animation of it.



bye
Ron

Pingus

That game is pretty addictive  :D, it really deserves to be polished, improved (with different creature waves) and adapted as a native app for generating few bucks (IOS/Android).
I suggest to add a button 'shuffle' for the start, that way the player can shuffle the first board until he get a 'good' start, that would be less annoying than restarting the page.

Any strategy hint to score more ;) ?

Derron

@ hint
I think the difficulty got increased somewhen - I most of the time loose all of my lifes in the waves 33 and up - it just "suddenly starts". Most of them are based on "deleted ammo" (flying arrows get removed when the initial target is killed).

So until that is fixed, a "high level ballista" looses against "multiple low level ballistas" on the same lane.

Arrow towers do not need to get put lane after lane, use the space inbetween for "ballista + slowdown" lanes.
Arrow towers' range is too low to have multiple slow-down-hills.

If you have ballistas, just put a "high level"-hill at the bottom of this lane. For ballistas every slow-down means another shot.
Neighbours of slowdowns are cannons - the higher the slow down level the better for a "horizontal shooting" item like the cannon.

Do not match-3 level x towers into level x+1 towers if you are barely able to kill all dragons in a level (I know, the spawning-lanes are random and sometimes you have 40+% of the enemies in one lane...so you need luck too).

Avoid "single base tiles" at the ground. The more you progress in the game, the more towers/hills you will have - and the less matchable-tiles will exist. The game makes sure that you can match something (at least I think so) but this might mean to move a bottom tile way to the top (2-3 rounds).

Before switching tiles check if the "collapse movement" could match-3 another one - so sometimes moving a tile up instead of left will create another match



@ switch start scenario
good idea.
I had game starting with match-3s until I got 12 "turns" to switch tiles - but I was not able to secure all lanes. Such games most often have nearly all start dragons in one lane. So if you get only 2-3 ballistas and 1 cannon you will loose already 1 life if more than 1 dragon flies on a non-secured lane (only cannon shoots at it - but a level 1 cannon only kills 1 dragon of a dragon-group).


@ Deleted ammonition
Couldn't one just speed up the ammo a bit?
And another - better idea - could be to have a "shot ammo at me"-counter per dragon. If that amount equals to "hitpoints" then a tower will target another dragon. That way less ammonition will get lost - albeit "simultaneously shooting towers" will still try to hit the same dragon.


bye
Ron

iWasAdam

#29
After playing this for a while I had thoughts that something was 'not right' with the balancing...

Quote
Ya every projectile has a specific target enemy. Would be too slow to check collision of every enemy every frame since its a web game. Will work on a way for projectiles to re-target.

A. thats the dumbest thing I've ever heard
B. If you cant do it properly and check everything then start reducing things

I've seen things (arrows, etc) disappear for no reason, etc. All make sense now  >:D

Fix it or get someone to check the code to make it work correctly!

And...
Deron is quite right about black edges appearing round the background tiles - whatever you di recently really screwed things up there too.