BASIC

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BdR

Pages: 1 2 [3] 4 5 ... 21
31
This is a recommendation I don't really understand (yet), as applying a texture to an object is an extra step in the GL-pipeline.  I would expect the coloured objects without applying a texture to be a bit faster.
Perhaps KungPhoo can shed some light on this issue.
My thoughts exactly, I'd really like to hear from Kitty or KungPhoo about this.

Btw apart from being faster I personally think they also look better. Compare the 2 screenshots in the opening post, for example the yellow surfaces in the color and texture example are both using the exact same color (#FFFF00). But the colored surfaces look much brighter (imho better) while the yellow textured sufaces looks pale and dull. EDIT: I take this back, this was due to the texture I was using. :-[ When using the same texure colors it looks the same as just colors.

32
Don't usecolors on gles. Use a texture instead.
You keep saying this, but what is the reason? Could you please clarify or reply in this thread? -> Colored 3D models are faster on mobiles. My findings..

33
Just uploaded a preview version for Windows, see openingpost :)

Currently the explosion is one single yellow ball model. Which is drawn 6 times that move position using code (with SIN and COS) and scale with X_SCALING. I don't know what would be faster and less CPU; doing the animation in code with X_MOVEMENT and SIN/COS and X_SCALE, or using a pre-animated .DDD file with pre-calculated keyframes.

34
I just now played the Flee, Fish, Flee!, it's cool but a little easy and I finished it in about 10min. So it was a great idea elaborate the game a little more and add more levels etc. :good:

I tried your PC version and I think there's a bug in level "Depth 4m" when you do from the start Down, Down, Right, Right, Down, Down, Right, Right, Right, Down, Right, Right. With the last move to the right the squid will move ontop of the sponge, I mean they're both in the same location. :doubt:

And another minor thing, I really like the cliché 8bit kidnapped princess intro, however you don't get to see the bad guy, only a yellow submarine. I think it would add a little more personallity to the game to add an evil marine biologist doctor or something. :D I mean look at the intros of many many 8bit games like Ghost n Goblins, Adventure Island, Popils, Castle of Illusion, Lolo, etc. you always see the bad guy.

35
Announcements / Re: GLBasic V11 public beta
« on: 2013-Mar-10 »
Is anybody else experiencing issues with sound on V11.322 on Android?  In other words - NO sound at all! :(
No problems here, I'm using 16bit mono 44kHz .wav files and sound playback seems to works fine on (HTC Desire X, GLB v11.322)

36
The converter program wont unfortunately convert textures and what.  3D objects will take the colour/material of the last set colour/material.

Yes I know, that's the bug I encountered and that's why I reported it here. ;)

37
That looks pretty cool, erico. 8) That's exactly how I want to make my explosions. I though about a Metal Slug-like explosion, except a little simpler so some different sized low-poly spheres that grow and shrink.



However, I ran into something; when I create a 3D animated model with Convert3D it removes all colors so you are forced to work with textures. It seems the convert tool doesn't support colors. Would be nice if it could import .obj+mtl files or .ddd files as keyframes. I already posted a bug report.

38
Okay, this is all nice, but like I said, I already call X_SETTEXTURE once. Also, I use texture with powers-of-2 dimension (64x64 and 256x256), and I use "X_CULLMODE 1" for backface culling. I haven't tried lowering the far clipping value of X_MAKE3D. But my main question is:

Why recommend using textures, while my test here indicates that just using colors is in fact faster? :doubt: (I just changed the topic title for clarity)

39
How many vertices do these objects have ?  Try to go for as low as possible on mobiles

AC3D Tools -> Model info -> Total objects: 2   surfaces: 26   vertices: 24
I understand that I should use lowpoly models for mobile. But for this speed test I use the same model in both tests, so the nr of vertices doesn't really matter here.

It may also be important to check with and without lighting.
BTW. if you just call X_SETTEXTURE one time and then draw all objects, this is way faster than calling X_SETTEXTURE for every objects again (at least on most devices that i tested).

That is what I already do here in this test, I call X_SETTEXTURE only once before drawing all objects. So in that aspect the routine seems optimized. But with textures it is slower than just colors.

40
I've been working on a 3D game and Kitty mentioned (here and here) that it is recommended to use textured models instead of just colored models because they are faster on mobiles. I thought this was strange, so I've created a GLBasic project to see this for myself. The program displays an increasing number of objects and displays the frames per second (fps). The models are created and textured with AC3D and exported using the glbasic plug-in. See attachement to this post for the project and models and textures.



The colored models look different than the textured models, but that's not the point here. I've tested it on my available devices and here are the findings (colors=colored non-textured, txt64=textured with 64x64 bitmap, txt256=textured with 256x256 bitmap):

Code: GLBasic [Select]
iOS, iPod4 retina:
            colors txt64  txt256
  1 objects ~60fps ~60fps ~60fps
  8 objects ~60fps ~60fps ~60fps
 27 objects ~60fps ~60fps ~60fps
 64 objects ~60fps ~60fps ~60fps
125 objects ~60fps ~60fps ~45fps
216 objects ~56fps ~45fps ~33fps
343 objects ~39fps ~32fps ~26fps
512 objects ~27fps ~22fps ~21fps

Android, HTC Desire X:
            colors txt64  txt256
  1 objects ~60fps ~60fps ~60fps
  8 objects ~60fps ~60fps ~60fps
 27 objects ~60fps ~60fps ~60fps
 64 objects ~60fps ~60fps ~43fps
125 objects ~53fps ~39fps ~28fps
216 objects ~35fps ~25fps ~19fps
343 objects ~24fps ~17fps ~13fps
512 objects ~17fps ~12fps ~10fps

WebOS, Palm Pre (320x480 device):
            colors txt64  txt256
  1 objects ~60fps ~60fps ~60fps
  8 objects ~60fps ~60fps ~60fps
 27 objects ~60fps ~60fps ~50fps
 64 objects ~60fps ~60fps ~32fps
125 objects ~51fps ~43fps ~23fps
216 objects ~30fps ~27fps ~18fps
343 objects ~20fps ~19fps ~14fps
512 objects ~13fps ~14fps ~11fps

Maybe these devices are the exception to the rule. Or maybe my 3d models and textures are non-standard, or my fps function is wrong or something. But it seems that colored non-textured models run a bit faster than the same model textured (although it's not that much).

So, does this mean I can just use colored non-textured 3D models? Maybe this was an issues on 1st generation iPhone and Android, and the newer graphics chips can handle this better? O_O

41
Aha! I think I understand the cause of my problem now.

Currently there are the following Apple devices:
ipod/iphone no retina (<=3G) ->  320 x 480
ipod/iphone retina (4G) -> 640 x 960
ipod/iphone retina (5G) -> 640 x 1136
ipad1/ipad2/mini -> 768 x 1024
ipad3 -> 1536 x 2048

There is some objective-c code missing, but the part you posted determines which one of these devices it is, retina or non-retina. It makes this destinction between the old devices where max(dg_resx, dg_resy) == 1024 and the new devices where max(dg_resx, dg_resy) > 1024 (namely 2048 for ipad3 or 1136 for iPhone5).

My Snake Slider project has a problem here, because it is 'universal' app and I want to support both the new iPhone4 and the old iPad2, but not the new iPad3 (because I don't have retina graphics files for 2048*1536, also the appsize would become huge). So, I have set the resolution for iPhone in project options to 768 x 1024 (='old ipad2'). On the new iPad I want it to use 1024*768 and use a scale factor (which works correct now in v11). However, I thought this would also "encapsulate" the new iPhone (640x960) resolution but apparently it doesn't.

So, I think using the following code would fix this problem:
Code: GLBasic [Select]
//if(max(dg_resx,dg_resy) == 960 || max(dg_resx, dg_resy) > 1024 ) // wants retina in iPhone4 or iPad3
if(max(dg_resx,dg_resy) == 960 || max(dg_resx, dg_resy) == 2048 ) // wants retina in iPhone4 or iPad3

Or better yet, also add iPhone 5 support
Code: GLBasic [Select]
if(max(dg_resx,dg_resy) == 960 || max(dg_resx, dg_resy) == 1136 || max(dg_resx, dg_resy) == 2048 )

42
You are not using transparencies right?
Nope, I don't use transparencies. Do you ask this because those are performence killers too maybe?

And yes, I will add 1st person perspective but only as easteregg.. ;)

43
I also like the flat shaded look, just like in Starfox for SNES. 8) I think I'll use a texture that is mostly just prime colors, with minor actual texture only some "techno" stripes or something. I suspect from reading on the forums here that the Android & iPhone hardware work better with textures than with flat shaded colors. Is this correct? Because I want to release this game on the appstore and Google-play.

Btw the umbrella bonus UFO looks the same as in my old Cash Invaders msdos game. :) I'll post another update this weekend maybe.

44
(note: I know I shouldn't use flat colors, I'll create properly textured models later)

work-in-progress/alpha version download -> 3dinvaders.zip



I wanted to do a 3D game, but I figured it's best to start simple. So at the moment I'm working on a Space Invaders game using 3D models instead of bitmaps. :) It has several levels and power-ups. Still lots of stuff to add like score display, player destroy, level intro etc.

I don't normally do this, I usually don't post about a game until it's "ready". But hopefully it will be just a little extra motivation to finish this game and maybe also get some feedback. :good:

45
I downloaded GLBasic v11.322 and the GETJOY commands now work correctly again on Android :good: sweet

Pages: 1 2 [3] 4 5 ... 21