Page 1 of 1

Bullet Hell (Touhou Style)

Posted: Wed Nov 28, 2012 1:11 am
by layhooo
Hey guys, I've lurked these forums for a while and was inspired by a thread about a topdown zombie shooter that was put on xbox live (I can't find the thread anymore though - nevermind haha it's still on the first page) and obviously the AIGD series so I thought I'd post my own creation.

Here's a video if you don't know what Touhou is (I highly suggest playing it, it's made by one dude which is pretty nutts considering the quality+quantity)

http://www.youtube.com/watch?v=4Nb5Ohbt1Sg

Recently single (thank god) and hit hard by senioritis (I'm actually procrastinating for a physics lab right now)
:mrgreen: I'm going to be doing a lot more programming (java). In the past I've made pong and a map editor but now I think it's time to make something legit.
(yea I know java is hated in these forums haha but I want to make it playable on android devices)

I plan to use this thread in order to log my progress and to post pretty pictures (it's a bullet hell game man, it's gonna be sexy)

Day 1 Progress:
Image

Day 2 Progress:
Image

The enemies are created by reading time, coordinate, etc... information from a text file and they currently follow paths which are designated by coordinates in a text file (each route has its own file)

Image

Currently the game just has a controlled framerate game loop, input, some output, basic collisions, levels via files, routes via files (I plan on adding a level editor and a route editor this weekend), and really terrible graphics

Today I worked for four hours on collisions, two of which consisted of debugging a logic statement haha... Hopefully tomorrow my time will be used better. Maybe I'll get alphablending working or something (if somebody experienced in java can help me on this topic that would be much appreciated).

Thanks!
(Oh yea, I plan on adding music to the game, this producer is making the tracks so check him out too! http://soundcloud.com/dj-skipsalot - hopefully this is ok)

Re: Bullet Hell (Touhou Style)

Posted: Wed Nov 28, 2012 3:49 pm
by Falco Girgis
Looking, good, homes! You using a shitload of trig for the bullet projections?

And you aren't going to hear anybody bitch about your language of choice... Sure, it isn't my favorite, but you're doing something awesome with it, and that's all that matters.

Re: Bullet Hell (Touhou Style)

Posted: Wed Nov 28, 2012 4:33 pm
by dandymcgee
Cool project! You seem off to a good start, hope you stick with it and make something fun.
Also, feel free to post links to soundcloud or whatever, we welcome that sort of thing!

Re: Bullet Hell (Touhou Style)

Posted: Thu Nov 29, 2012 1:42 am
by layhooo
Falco Girgis wrote:Looking, good, homes! You using a shitload of trig for the bullet projections?

And you aren't going to hear anybody bitch about your language of choice... Sure, it isn't my favorite, but you're doing something awesome with it, and that's all that matters.
Yea dude haha I need to fix a few things I think I'm doing excess calculations because once 30 or more enemies get on the screen it just craps out. When I add rotations that's the true test...

Day 3 Update:
Image

I started a todo/done list so for today here's what I got done:
Monster Health 11/28/2012 (you can kill stuff now!)
Check Bullet velocity - it should not be so fast that the bullet skips over stuff 11/28/2012
Change bullet velocity to depend on theta and r 11/28/2012
- Change it from Cartesian coordinates to polar coordinates basically
Fix Multiple Collisions Issue - just have to remove the bullet upon first collision 11/28/2012
- This was just dumb
Optimize calcVelX/Y (should calc once per coordinate and not while the bullet is traveling to that coordinate) 11/28/2012
- Previously I was recalculating every velocity component every single frame ha...
Transparency DANG'T!!! 11/28/2012
- This took SOOOOOO long but now that it's done let the sexy begin ;)

It's feeling really good. I'll try to make a video once there's more cool stuff to show
Suggestions much appreciated!!!

Re: Bullet Hell (Touhou Style)

Posted: Thu Nov 29, 2012 8:40 am
by Falco Girgis
What graphics library/API/framework are you using? Is this basica Java forms/rendering?

Your poor rotational performance is more than likely a side effect of the rendering mechanism rather than your own slow calculations. I can't see even 30-ish inefficient trig projectile calculations coming anywhere near a slowdown. Your rendering mechanism is probably software-based. Scaling and rotating is quite slow in an environment like this.

Nice update, though. Looking sweet. :D

Re: Bullet Hell (Touhou Style)

Posted: Thu Nov 29, 2012 1:55 pm
by layhooo
Well honestly I hadn't realized that the built in java graphics class wasn't hardware accelerated and it was just built in all nicely so I didn't think about using any outside libraries (I read that there is an opengl api for java so I might look into that)
This page talks about a method for java hardware acceleration: http://www.javalobby.org/forums/thread. ... 0&tstart=0 but most of the people are saying that the normal graphics classes should handle most anything.. I'm not sure I'll run some tests (it probably really is a fault of my programming though it's pretty sloppy considering I just add stuff without really planning for organization)
edit: on second thought if I'm going to making something as graphical as a bullet hell game good graphics should be my primary concern so I'll try to implement that volatile image class

Re: Bullet Hell (Touhou Style)

Posted: Thu Nov 29, 2012 4:56 pm
by lalacomun
Well, the game is looking great, pretty much like the video one!
as regard to the slowdowns, maybe its just a limitation of the java graphic software rendering, you may wanna try lwjgl(Lightweight Java Game Library), it gives you acces to OpenGL, OpenAL (for audio) etc.. and since its a lib it contains lots of usefull "Tools" like importing Blender models easily or access to controllers like joysticks and much more ;)

Re: Bullet Hell (Touhou Style)

Posted: Thu Nov 29, 2012 8:58 pm
by layhooo
That library looks really good and looking at it for a while brought me to this library http://libgdx.badlogicgames.com/ which claims desktop(pc and mac)/android (and apparently in the future ios) cross platform support. That all sounds really nice haha :shock2: The only thing is I'm not sure how good of a library it is, does anyone have any advice in choosing an API?
Edit:
Found a useful post
" ra4king
Re: Help me choose (libGDX or LWJGL)
« Reply #1 on: January 21, 2012 »
You can't compare libGDX and LWJGL because they are two different things. LWJGL just provides a simple binding to OpenGL in Java. libGDX is a framework developed around LWJGL for the desktop and also has an Android backend.

libGDX lets you use OpenGL without worrying about how OpenGL works. If you want to get something done quickly, use libGDX. To learn OpenGL, use LWJGL "
Well I wasn't really planning on learning OpenGL so it seems libgdx would be a good choice but then again it's higher level and OpenGL is pretty universal so ill have to learn it eventually. Any thoughts?

Re: Bullet Hell (Touhou Style)

Posted: Thu Nov 29, 2012 10:35 pm
by lalacomun
layhooo wrote:That library looks really good and looking at it for a while brought me to this library http://libgdx.badlogicgames.com/ which claims desktop(pc and mac)/android (and apparently in the future ios) cross platform support. That all sounds really nice haha :shock2: The only thing is I'm not sure how good of a library it is, does anyone have any advice in choosing an API?
Edit:
Found a useful post
" ra4king
Re: Help me choose (libGDX or LWJGL)
« Reply #1 on: January 21, 2012 »
You can't compare libGDX and LWJGL because they are two different things. LWJGL just provides a simple binding to OpenGL in Java. libGDX is a framework developed around LWJGL for the desktop and also has an Android backend.

libGDX lets you use OpenGL without worrying about how OpenGL works. If you want to get something done quickly, use libGDX. To learn OpenGL, use LWJGL "
Well I wasn't really planning on learning OpenGL so it seems libgdx would be a good choice but then again it's higher level and OpenGL is pretty universal so ill have to learn it eventually. Any thoughts?

Well, its like asking, what do i learn, OpenGL or Ogre3D, Ogre3D in this case libGDX its a lib that makes your job easier, it provides lots of functions that "wrap" OpenGL, you dont even have to learn it, you just need to know the Lib's functions for example:

Code: Select all

void RenderTriangle()
{
        glClear(GL_COLOR_BUFFER_BIT);
        glBegin(GL_TRIANGLES);
                glVertex3f(0.0,2.0,-5.0);
                glVertex3f(-2.0,-2.0,-5.0);
                glVertex3f(2.0,-2.0,-5.0);
        glEnd();
}
you just need to know RenderTriangle function and you are ready to go, you wont be learning any OpenGL stuff, and you wont be designing any kind of rendering logic, the lib will do it for you, you wont understand what you are doing, you just know if you type this function, baam a triangle appears, in certain way its easyer and will save you a ton of time sometimes but it limits you to just the functions the lib offers, on the other hand lwjgl its just a port of OpenGL to java, this will allow you to do anything, literally anything! the beauty is that you create your own functions the way you want, you can create your own lib, and use it in your future projects, knowing that you can edit the lib the way you want, this is what i do, obviously its much harder, and will take you a lot more of time, but once you made you lib/engine you just need to edit it for your projects needs, here a video falco made wich explains what i just said:




i really recommend you to learn OpenGL, but its your choise ;)

Re: Bullet Hell (Touhou Style)

Posted: Fri Nov 30, 2012 2:00 pm
by layhooo
Yea I think I wanna go with lwjgl so this thread might go a little bit slower for a while considering I'll have to rewrite a hefty chunk of the code

Re: Bullet Hell (Touhou Style)

Posted: Sun Dec 02, 2012 11:02 pm
by layhooo
So over the weekend I began learning lwjgl (it's not as bad as I thought it would be, but I'm sure it gets a lot harder). Here's my current progress porting:
Image

Textures are on my todo list now. Also I need to add a lot of functionality back in that I had to erase to make porting easier (for example, I need to add enemy spawning back in)

I also did some work on the main character sprite but it's on another computer so I'll try to edit it into this post tomorrow

I'll make a video once I've kinked out all the bugs and textures are in

Re: Bullet Hell (Touhou Style)

Posted: Mon Dec 03, 2012 8:48 am
by Falco Girgis
Very nice. I will be extremely shocked if you don't notice CONSIDERABLE performance boosts after doing this.