Show us yer programming projects!
Re: Show us yer programming projects!
Stop whining man! When I started coding I would have shat myself if I had seen a lit untextured cube going at 15fps! 
Re: Show us yer programming projects!
T-Mobile G1sack wrote:on what hardware?Kamineko wrote:My first Android app is a lit untextured cube that you can rotate using the trackball.
It runs at 15fps. Hmm.
Re: Show us yer programming projects!
Okaie! 60fps!
The trick is to never allocate memory, never create an object directly or indirectly and never call functions. That's... bizarre.
The trick is to never allocate memory, never create an object directly or indirectly and never call functions. That's... bizarre.
Re: Show us yer programming projects!
...because that implicitly allocates memory...Kamineko wrote:The trick is to never allocate memory, never create an object directly or indirectly
...because that can also implicitly allocate memory (i.e. automatic variables causing the stack to expand).Kamineko wrote:and never call functions.
That is, indeed, quite bizarre.Kamineko wrote:That's... bizarre.
I wonder if there's something unusual or weird about the phone's memory architecture. Because the symptoms make it sound like it has essentially non-existent memory bandwidth or something bizarre like that - as anything that could explicitly or implicitly require allocation seems to kill the possibility of 60fps. That is a touch strange, to be sure.
(As an aside, I did try to look up the phone's specifications online to see if there was anything mentioned about its memory architecture - there isn't, at least not from T-mobile themselves with a quick Google search - but I did notice something truly absurd in the small print: "T-Mobile and the magenta color are federally registered trademarks of Deutsche Telekom AG". What the fuck?!? T-Mobile owns a trademark over a fucking colour?!? I already thought that trademark law was somewhat ridiculous, after all the Tim Langdell nonsense, trademarking the word "Edge" and getting away with what amounts to, in my mind, extortion for decades. But trademarking a colour? That's getting beyond ridiculous.)
"Words ought to be a little wild - for they are assaults of thought on the unthinking."
- John Maynard Keynes
- John Maynard Keynes
Re: Show us yer programming projects!
No, that's Android.KlaxonCow wrote:I wonder if there's something unusual or weird about the phone's memory architecture. Because the symptoms make it sound like it has essentially non-existent memory bandwidth or something bizarre like that - as anything that could explicitly or implicitly require allocation seems to kill the possibility of 60fps. That is a touch strange, to be sure.
The phone itself is made by HTC and has a Qualcomm MSM7201A (ARM11 with Jazelle) SoC running at 528 MHz. It has 192MB of memory, and there's nothing particularly strange about the architecture.
If you're trying to do stuff that's performance-critical under Android, you can't allocate any memory on the fly. If you do, you will end up triggering the garbage collector, and your performance goes down the shitter - indeed, 60fps to 15fps is not what I'd consider a "hard" hit, being only a factor of 4 slowdown. This means that large amounts of the Android API are basically off-limits if you want to do games, especially if you're considering that 60fps might be a good idea.
As an example, handling touch events (which must, as far as I can tell, go through the Java layer) will probably preclude you from doing 60fps.
That magenta thing's arse, though.
"massive retard™", "full of shit™", "tiny bitch™", "retarted™", "a bit of a one trick pony™", "petty™", "simple minded idealistic twat™", "miserable humourless fucker™"
Re: Show us yer programming projects!
It is a bit shit, here's some hoops you need to jump through:
http://developer.android.com/guide/prac ... mance.html
If I were devving for Android I'd probably use the NDK
http://developer.android.com/guide/prac ... mance.html
If I were devving for Android I'd probably use the NDK
- sack
- Baaaaaaa!

- Posts: 7077
- Joined: Fri May 10, 2002 4:13 pm 0
- XBL Gamertag: evilgopher
- PSN: sixFiveOhTwo
- Location: Rijswijk, The Netherlands
- Contact:
Re: Show us yer programming projects!
i was told that NDK is best - but ARM would say that because it locks in to their CPUs.
Fair enough though - I don't reckon we'll be seeing an x86 smartphone any time soon...
EDIT: not coded by me but...
Have some lit, untextured 3D objects at over 15FPS on a 12mhz ARM 2 in 1MB of memory
Fair enough though - I don't reckon we'll be seeing an x86 smartphone any time soon...
EDIT: not coded by me but...
Have some lit, untextured 3D objects at over 15FPS on a 12mhz ARM 2 in 1MB of memory
Re: Show us yer programming projects!
I'm mostly working from the advice from the Replica island guy.
As you've said, you should never make enough objects (i.e. any) so that the GC will interrupt your game.
I've just found this, which has proven to be absolutely magnificent advice. In my case, the text on the left is a bunch of triangles whos vertex and texcoord data is recalculated every frame into an array of floats, which is then put into a FloatBuffer and drawn with glDrawArrays. Now that I've changed it so that the array of floats is copied into an array of ints which is then copied to the FloatBuffer via an IntBuffer alias and drawn with glDrawArrays, it's soopah fast.
Why is it that the EXACT function that a complex OpenGL ES game would need is slower than the similar ones? STRANGE, some might say.
Now I have a Vinnie that you can spin by dragging around the centre of the screen. I call it Spinnie Vole's Existential Nightmare. (Thank you, I'll be here all week.)

As you've said, you should never make enough objects (i.e. any) so that the GC will interrupt your game.
I've just found this, which has proven to be absolutely magnificent advice. In my case, the text on the left is a bunch of triangles whos vertex and texcoord data is recalculated every frame into an array of floats, which is then put into a FloatBuffer and drawn with glDrawArrays. Now that I've changed it so that the array of floats is copied into an array of ints which is then copied to the FloatBuffer via an IntBuffer alias and drawn with glDrawArrays, it's soopah fast.
Why is it that the EXACT function that a complex OpenGL ES game would need is slower than the similar ones? STRANGE, some might say.
Now I have a Vinnie that you can spin by dragging around the centre of the screen. I call it Spinnie Vole's Existential Nightmare. (Thank you, I'll be here all week.)

Re: Show us yer programming projects!
I've put some more quads on it, and it could go faster if I used the faster buffer copying stuff. I want to use the NDK, but I really, really, really don't want to install Cygwin. Argh!
Re: Show us yer programming projects!
Use a linux, then.
"massive retard™", "full of shit™", "tiny bitch™", "retarted™", "a bit of a one trick pony™", "petty™", "simple minded idealistic twat™", "miserable humourless fucker™"
Re: Show us yer programming projects!
That's the plan.
Re: Show us yer programming projects!
Sure, I need to use a different computer every time I want to update the library, but I cares not!


- super charlie
- Baaaaa!

- Posts: 1809
- Joined: Wed Mar 31, 2004 7:53 pm 0
- Location: Ipswich, suffolk
- Contact:
Re: Show us yer programming projects!
Probably the most chaotic level in the game. This one takes all the levels from my older Bullet Candy game, and condenses them into about 3 minutes.
Cheers
Charlie
Cheers
Charlie
Visit my website here to have a look at my game.
Re: Show us yer programming projects!
That's awesome!super charlie wrote:Probably the most chaotic level in the game. This one takes all the levels from my older Bullet Candy game, and condenses them into about 3 minutes.
I love the background music, too: it's just about perfect for a game like this. Who does your music? (Have I asked you that before?)
"I am a very considerate person. If I want to go out all night on my miniature golf course and shoot lizards, well, no reason to keep the neighbours awake..."
- super charlie
- Baaaaa!

- Posts: 1809
- Joined: Wed Mar 31, 2004 7:53 pm 0
- Location: Ipswich, suffolk
- Contact:
Re: Show us yer programming projects!
Thanks! The music is by the super awesome John Marwin, who's done the whole soundtrack to this game, my older Irukandji game and the odd track for some of my others. I really like his stuff, and i think it fits well with the visuals. His website is: http://www.johnmarwin.co.nr/, but his archive.org page is more useful if you're after the tracks: http://www.archive.org/search.php?query=john%20marwin.Firefox wrote:That's awesome!super charlie wrote:Probably the most chaotic level in the game. This one takes all the levels from my older Bullet Candy game, and condenses them into about 3 minutes.
I love the background music, too: it's just about perfect for a game like this. Who does your music? (Have I asked you that before?)
Cheers
Charlie
Visit my website here to have a look at my game.


