Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Touhou on Android? -- Initial test -- Sprite Rendering

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,416
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 10, 2009

Cirno shooting ⑨ x 10 bullets (90 bullets on screen at any second).

This was my first test at rendering sprites on the android platform and specifically using the HTC Magic (sapphire) hardware. This little test was done using the Canvas method of rendering sprites which is by far the slowest [but really easy ^_^]. The test that you see in the vid has 90 randomly aimed bullets moving at random speeds and is running at or above 50fps.

At first I was a bit worried because the same test initally done with only 30 bullets was having choppy slow downs periodically. This is java at work! D: Although we all make jokes about how slow java is, it was simply the garbage collector at work causing this slowdown. We can still play by the java programming conventions and avoid all those GC events by the following:
1) Avoid memory allocation -- Allocation causes the GC to run which can take up to 300ms
2) No Iterators -- I hate iterators anyways.
3) No Collections/Hash Maps/Fancy pants Data structure things that you dont have in plain old C -- these things cause allocations; see #1

As for further optimizations, well I'll get to those soon. They involve forgetting every thing your intro to java class tought you. -- private data? not in my VM!

But yea, first impression is good, with full attention to all the real time optimisations and using OpenGL ES + HW acceleration (as opposed to canvas sprites which are all cpu drawn) a shmup like something ZUN-sama makes should be possible on android.

Category:

Gaming

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Top Comments

  • Android needs a Touhou game.

  • lol your phone says 6:00 am

    what a trooper

    anyways, i am quite interested in this opengl es on android that you mentioned.

    are you using it right now in this one?

    would it be asking too much to see your code?

    since i tend to learn better studying things that work instead of blindly trying to build up a a heap of crud that uses the crappier (built-in) methods because the documentations doesn't tell you which one sucks haha

see all

All Comments (7)

Sign In or Sign Up now to post a comment!
  • Im thinking of working on a touhou game...

  • I have an android and I woul LOVE to have touhou on it :3

  • i love cirno

    i love programming/playing bullet hell :O

    i program on android

    i very much approve of this >:V

    lol freakin gc(),

    i had problems with this too and i came to the same conclusion hahaha

    to pretty much reuse the same few variables and avoid making anything new in the whole code

    and screw objects, arrays and for-looping is just fine :D

    i actually find coding like this more straightforward and simple.

  • if this actually becomes anything playable, this would be amazingly awesome

  • gimme your phone !

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more