Java tower defense game

So I’m very new to java I’ve been programming for only about 2 weeks. The past couple days I have been working on this tower defense game. Its in its very early stages many things don’t work in it however for two days of work I’m pretty happy! Let me know what you think all feed back is welcome! I’ll continue to post as I change things!

http://www.youtube.com/watch?v=l4XrAnWxev4 VIDEO 1
http://www.youtube.com/watch?v=Ymww6vpgndA VIDEO 2 UPDATE

New screen shot

http://img710.imageshack.us/img710/9760/screenjb.th.jpg

New game over screen I’ve been working on:

http://img52.imageshack.us/img52/3750/gameover1t.th.png

New first wave zombie sprite:

http://img718.imageshack.us/img718/6558/enemy2.th.png

New tower:

http://img196.imageshack.us/img196/1995/tower2h.png

Any thoughts?

You’ve only been programming in general…for 2 weeks… :o

It’s looking good so far, keep up the good work :slight_smile:

Can’t watch youtube here hehehe ;D

Thank you! I still have a lot to figure out though! Uploaded the new game over screen!

Nice artwork as I can see. Waitin for any version to try it :slight_smile:

Thanks! its taken me forever to do all the art! Hopefully I can have a demo up soon!

Now you put the images. The tower is cool, looks like helmet ;D

I was going for a kind of an Iron man looking tower haha, ill post more tonight either pictures or videos.

Does anyone know if i can use a 3d modeler with java? Like blender or something like that.

You can, with help of library such as LWJGL.

LWJGL is a simple binding to OpenGL. OpenGL has no clue what a model is. All it knows how to do is render geometry and textures.

@thez3r0312
To load a model into OpenGL, you have to use a library that allows you to do that. I believe libGDX has classes that load OBJ and MD5 models.

So i want to make my towers and enemies like this:

http://vickiwenderlich.s3-website-us-east-1.amazonaws.com/wp-content/uploads/2011/10/fieldrunners-iphone-game-1.jpg

Anyone have any ideas how i would make my characters/towers 3d like this and animated? Also anyone have an example code of a targeting system for the towers that makes towers pivot and follow the characters.

animation is simply change sprite in constant time. Target an enemy and calculate the rotation for tower so it looks like following, and shoot in desired rate.

wont i need multiple images for that though? otherwise the whole tower image is going to shift instead of just the barrel of the tower.

For creating smooth animation, it’s pretty common to have multiple sprites/images, except yours are procedural generated. If you want whole tower to rotate, it’ll be neat to have 3D approach.

Considering i have very little java experience this sounds quite complicated. Basically if i understand correctly i have to have the tower target the enemy then depending on its location choose an image that accurately depicts where is should be facing?

and to make this smooth ill need at least 20 images that each are slightly rotated in order to get a smooth rotating image?

Yeah you can do that, but not efficient I think. You can have less image by rotating with code (generated on fly) but it’s expensive with java2d so you better bring it to opengl. My suggest is to leave animation first and create logic first. In the end you’ll have a game where the towers are static but shoot enemy with right directed bullets. Then you can enchant animation.

You don’t need many images to produce a smooth animation. For example, a smooth looking walking animation is only 3-4 images. Animation is very easily simulated with little amount of frames :slight_smile:

im gonna do the shooting system tonight, and ill put up a video of it, if anyone can suggest how i do the image animation after you see it let me know. I have some ideas but i really dont know if they are going to work!