Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Making a tower defense game?  (Read 1226 times)
0 Members and 1 Guest are viewing this topic.
Offline wreed12345

JGO Knight


Medals: 25
Projects: 2
Exp: 2 years


http://linebylinecoding.blogspot.com/


« Posted 2012-12-29 05:18:53 »

Im not asking how to code this but I am asking if anyone has any advice or techniques useful for making such a game. This will be my second game so any advice is welcome! I am looking to make this something like bloons tower defense. Thanks in advance!

Offline ReBirth
« Reply #1 - Posted 2012-12-29 05:24:03 »

I have prototyped TD before. The two biggest problem,
1) enemy movement when the path consists of curves
2) tower aiming and locking logic (but it's easy now)

Offline wreed12345

JGO Knight


Medals: 25
Projects: 2
Exp: 2 years


http://linebylinecoding.blogspot.com/


« Reply #2 - Posted 2012-12-29 05:26:15 »

Ok so I am pretty sure I have the first part figured out to some degree, but how would I figure out that second part? I have never done an angles or anything like that in java yet...

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline appel

JGO Wizard


Medals: 68
Projects: 4


I always win!


« Reply #3 - Posted 2012-12-29 05:52:20 »

Enemy movement is hardest. Although finding a path is trivial, how the enemy entities traverse it can be done very easy or hard (steering, flocking, collision avoidance, etc).

Simply interpolating the position of entities between a set of coordinates is simplest.
Spawn enemy entities at different times, like 200-300 ms. between each, so that they don't overlap each other in one blob.
You could offset coordinates in each path so entities don't seem to moving along the same line, and gives them a little spread.

But this is fine tuning, just get them to traverse a set of coordinates first via interpolation.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 139
Projects: 4
Exp: 3 years



« Reply #4 - Posted 2012-12-29 17:38:18 »

You said you figured out the first part, what are you thinking?
Offline wreed12345

JGO Knight


Medals: 25
Projects: 2
Exp: 2 years


http://linebylinecoding.blogspot.com/


« Reply #5 - Posted 2012-12-29 17:48:24 »

Well I had previously posted a thread about that which gave me some pretty good ideas : http://www.java-gaming.org/topics/making-something-follow-a-particular-path/28257/view.html

Offline wreed12345

JGO Knight


Medals: 25
Projects: 2
Exp: 2 years


http://linebylinecoding.blogspot.com/


« Reply #6 - Posted 2012-12-29 21:31:08 »

Does anyone know how I could make the towers attack the attackers?

Offline Jimmt
« League of Dukes »

JGO Kernel


Medals: 139
Projects: 4
Exp: 3 years



« Reply #7 - Posted 2012-12-29 21:52:59 »

If the attackers come in a certain radius (easy - distance formula) then attack.
For attacking (I'm assuming projectile) just animate the image moving towards the attacker (use some linear algebra or a bunch of if statements if you're lazy).
Offline wreed12345

JGO Knight


Medals: 25
Projects: 2
Exp: 2 years


http://linebylinecoding.blogspot.com/


« Reply #8 - Posted 2012-12-29 22:14:11 »

Oh ok i think i understand now. thanks!

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (114 views)
2014-11-26 15:22:04

toopeicgaming1999 (102 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!