Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 3 [4] 5
  ignore  |  Print  
  Crabs!  (Read 13581 times)
0 Members and 1 Guest are viewing this topic.
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #90 - Posted 2011-10-11 02:11:13 »

VBOs work just fine here on the Galaxy S2. Looks like they basically don't work anywhere else Smiley I'd best give up on them. No performance change anyway.

Cas Smiley

Offline Evil-Devil

Senior Member


Medals: 2


Fir Tree Master


« Reply #91 - Posted 2011-10-11 07:21:18 »

Yay, it works.

1200 sprites at 15/16 fps. 1300 sprites at 14/15 fps.

Cleaning up background apps did not improve performance for me.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #92 - Posted 2011-10-11 07:42:52 »

1000 crabs is fine, 1100 it start to become erratic, the fps jumps between 11 to 17.

Endolf

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline pitbuller
« Reply #93 - Posted 2011-10-11 07:50:47 »

900 with 15fps. Huawei ideos X5. Android 2.21
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #94 - Posted 2011-10-11 10:00:26 »

Haven't figured out what's causing the erratic framerate yet Sad Also discovered a lifecycle bug if you hold down the button to get the recent tasks list up - game pauses and never recovers. So don't do that Smiley

Cas Smiley

Offline zammbi

JGO Coder


Medals: 4



« Reply #95 - Posted 2011-10-11 10:20:52 »

Framerate seems stable for me now.
400 crabs gives me 15 fps.

Current project - Rename and Sort
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #96 - Posted 2011-10-11 11:11:20 »

Framerate seems stable for me now.
400 crabs gives me 15 fps.
Sad You're not going to be playing any Puppygames any time soon then...

Cas Smiley

Offline theagentd
« Reply #97 - Posted 2011-10-11 11:30:21 »

Whenever someone says "sprites" I get the picture of Pokemon on Gameboy and the old Final Fantasy games on Snes, so I'm having a little trouble imagining how you would put 400 sprites on the screen at the same time... Care to share an example from a real game?
(I'm not criticizing you at all, I'm just curious about what game you're making xD)

Myomyomyo.
Offline zammbi

JGO Coder


Medals: 4



« Reply #98 - Posted 2011-10-11 13:02:06 »

Framerate seems stable for me now.
400 crabs gives me 15 fps.
Sad You're not going to be playing any Puppygames any time soon then...

Cas Smiley
Darn and this was the top model 2 years ago. I hacked it a little, forcing my graphics drivers to be 16bit and now I can do 500 but that's all it seems.

Current project - Rename and Sort
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #99 - Posted 2011-10-11 13:26:56 »

Aha I can force it to to 16-bit too, didn't realise that would make such a huge difference. So I shall, in the next quick test, when I've figured out how to fix that small lifecycle problem.

@theagentd: so... basically a Sprite is any little rectangular bit of graphics. Once upon a day on machines like the C64 we'd have only 8 "hardware sprites" and a character-mapped background which could be arbitrarily scrolled 8 pixels in any direction, and people designed games around this curious limitation and did pretty well at it though of course it did rather limit the designs.

These days, every single thing you see on the screen is made up from one or more sprites layered on top of each other. Each sprite can be arbitrarily positioned, rotated, offset, scaled, coloured differently in each corner, and arbitrarily transparent, and also each sprite runs its own independent animation program. One small exception in the Puppygames sprite engine is that things like those expanding circle effects and bitmap fonts are actually psuedosprites injected into the scene at the appropriate point. They're not just simple rectangles but arbitrary bits of dynamic geometry, so they're a bit more expensive to draw than plain sprites but that's why there's not that many of them around - we only use them for text rendering and the odd special effect like a radar range or strobe.

It may not look like it at first but Titan Attacks typically has around 500-1000 sprites on screen in any single frame, drawn at 60fps, and each sprite is animated. Some sprites are huge - for example, the background and HUD consists of a few really big sprites - and some are tiny. This is why it always makes me chuckle when people dismiss Puppygames' graphics as being no better than what you can achieve in Flash Smiley I haven't yet seen Flash reliably demonstrate maybe a tenth of that performance, typically, and we've been able to achieve that in Java for about 8 years now through LWJGL. Our more complex games like Droid Assault and Revenge of the titans have literally maybe 4,000 - 8,000 sprites in every single frame. This is also probably why though many people like to dismiss our "retro" style as being trivial and simplistic, nobody has actually managed to emulate it or copy it yet because it's actually a lot more involved than it looks.

So anyway: porting Titan Attacks to Android, we're aiming for 30fps on account of the fact that it's almost indistinguishable from 60fps on small phone screens and there's no point in aiming too high just yet what with Dalvik being so lame. This means we need the average phone to be able to cope with at least 1,000 sprites @ 30fps, just to port our crappy Space Invaders game! We could maybe optimise some of that stuff away - at least 300-400 of those sprites are particles in things like bullet trails and explosions and smoke from ruined buildings in the background, so we'll be looking to tweak in those areas to get the performance we need.

Cas Smiley

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

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #100 - Posted 2011-10-11 13:31:03 »

Would I be mad to mandate Android 2.3+? I know that means quite a few of you couldn't test but... it'd also mean a far greater likelihood of only people who have phones fast enough will be trying the games out.

Cas Smiley

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 798
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #101 - Posted 2011-10-11 13:40:15 »

Would I be mad to mandate Android 2.3+?
Nuts! Smiley

Fallbacks FTW.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #102 - Posted 2011-10-11 14:11:57 »

Fallback to what, though? No explosions? It's hard to really sensibly draw a line at this point. Even relatively modern Android phones are getting risible framerates because they were cheapass in the first place :/ Myself, I can't see why anyone would buy one for less than $500 and then expect it to be "good" at stuff but there we go Smiley

Cas Smiley

Offline Evil-Devil

Senior Member


Medals: 2


Fir Tree Master


« Reply #103 - Posted 2011-10-11 14:27:38 »

The difference between Android 2.2 and 2.3 is minimal as the opengl ES subsets and the hardware support for several features may still be missing depending on the used phone.

Stay with 2.2 and only use opengl es 1.1. Though not even all 1.1 features were supported by all android phones...
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #104 - Posted 2011-10-11 14:40:27 »

Indeed VBOs don't seem to work at all.
The reason for going for 2.3+ is to filter out hardware released 2 years ago that's just not fast enough anyway. And: incremental GC in 2.3 Smiley That's very handy in an action game if you don't want to have to arse about with object pools polluting your nice simple to understand code everywhere. The sprite engine is already hairy enough with all the object pooling it has to do, and as we all know, object pools are the enemy of the actual required GC that the collector has to do.

Cas Smiley

Offline Evil-Devil

Senior Member


Medals: 2


Fir Tree Master


« Reply #105 - Posted 2011-10-11 15:05:06 »

Does that incremental GC in 2.3 do so much more than in 2.2?
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #106 - Posted 2011-10-11 15:21:34 »

Depends how much garbage you produce and how stable you want the framerate Wink But it is a noticeable, perceivable difference.

Cas Smiley

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 798
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #107 - Posted 2011-10-11 15:58:13 »

300 crabs at 25fps on that galaxy-gio piece of crap

Did not respond to physical cancel/quit button

After 30sec it crashed...

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #108 - Posted 2011-10-11 16:39:21 »

Crash logs always appreciated Smiley (Tip: get Elixir2)

Cas Smiley

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 798
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #109 - Posted 2011-10-11 16:57:21 »

NPE onTouch() line 279

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline pitbuller
« Reply #110 - Posted 2011-10-11 18:28:45 »

I have 2.21 and I have  paid full 160 euros for it. I demand that I can play all the best and newest stuff out there and if possible with full fps.

Maybe I can bought new phone when my Boxtrix is relesed and I will be rich.
Offline dishmoth
« Reply #111 - Posted 2011-10-11 19:26:36 »

Another data point from the cheapskate end of the market:

HTC Wildfire S (Android 2.3)
100 crabs at 30 fps, but with a lot of slow-down (reported as ~20 fps).

So no Titan Attacks for me. Emo

Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #112 - Posted 2011-10-11 19:35:40 »

Well you will go buying cheapass poo to save a buck or two Smiley

Cas Smiley

Offline xinaesthetic

Senior Member


Medals: 1



« Reply #113 - Posted 2011-10-11 21:23:54 »

Just gave the version currently linked by the qr code in the first post a quick try on my Defy (which doesn't officially run 2.3).

Framerate starts to drop below 30 (to about 26) with 500 crabs.  1000 crabs is 15fps,  2000 crabs is sitting at about 5-7fps.
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 798
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #114 - Posted 2011-10-11 21:43:50 »

Well you will go buying cheapass poo to save a buck or two Smiley
Fixed the NPE on line 279? Go go go! Pointing

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline theagentd
« Reply #115 - Posted 2011-10-12 01:17:32 »

You are doing a lot of math on the CPU that I think could/should be offloaded to the GPU. I don't know how you're batching your drawing, but it seems to me that all of the transformation could be done in a vertex shader while not having to submit much more data to the GPU...

Myomyomyo.
Offline zammbi

JGO Coder


Medals: 4



« Reply #116 - Posted 2011-10-12 05:15:23 »

Quote
You're not going to be playing any Puppygames any time soon then...
I know this is totally different... but I was playing Minescraft on high settings.

Did you try this trick?:
http://developer.android.com/resources/articles/window-bg-speed.html

Current project - Rename and Sort
Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #117 - Posted 2011-10-12 10:58:37 »

Ok, new version's up, and hopefully screen rotation and lifecycle management all work now. Also I tried that background hack - maybe it'll get us a few more fps. Gentlemen, fire up your phones and benchmark! Now what I'm interested in is the point at which it consistently drops under about 27fps and stays there, and also whether it seems smooth or erratic.

Cas Smiley

Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #118 - Posted 2011-10-12 11:06:47 »

It's now 1000 crabs that mine seems to slow down, 900 is 30 steady, 1000 and it starts to wobble, anything from 17 to 29, normally around the mid 20s. The last version seemed to quit fine, this one seems to leave the music playing after I hit home. Roll it back to the previous version Wink.

I had to create crabs fast as the flashing background was eye hurting Wink

Endolf

Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #119 - Posted 2011-10-12 11:18:08 »

It is decidedly weird how the framerate goes funny like that. It's not garbage collection. Just the vagaries of thread scheduling I think, under load.

Cas Smiley

Pages: 1 2 3 [4] 5
  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.

Dwinin (29 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (78 views)
2014-09-10 06:39:09

Tekkerue (38 views)
2014-09-09 02:24:56

mitcheeb (58 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (30 views)
2014-09-07 01:12:14

Longarmx (35 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!