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 - dectar

Pages: 1 [2]
Support / Frame rate issue
« on: March 03, 2011, 12:31:17 am »

Im currently working on a simple game to try to get familiar with jpct-ae but Im having a problem with my frame rate.
It generally runs at about 55-60 frames a second but every now and then it drops to 35-40 and I can see in the logs that its being caused by java doing a garbage collection (which seems to be forced upon me). 35-40 frames a second would be sufficient for the whole game but when it goes up and down randomly it feels very glitchy - the user would definitely see the slowdown for the moments when it drops.

So does anybody know of any way to make this smoother? Perhaps a way to limit the number of frames per second to 40? Or is there a better way to control speed? At the moment the games speed is based entirely on frame rate but it would be better if i cant limit the frame rate to have those frames skipped and ensure that all objects are where they should be based on the real speed. Im not sure if im explaining this well enough but any help would be appreciated.

Many thanks.

Support / Re: Menu System
« on: February 24, 2011, 04:22:10 pm »
That game looks pretty damn awesome raft  :)

So all the individual in game objects are blits yes? But the menu screen at the bottom of the page is the android ui stuff? This is an interesting approach. So is this done by having a layout view that is just set to invisible unless its needed or do you render the components on the fly?

I know its not exactly part of this thread but Im interested in the control system in the bottom right of the pictures. Can you give me an overview of how that works? Even just a high level understanding. I have seen similar controls in various games but I wasn't sure how it was implemented. Are you just picking up touch co-ordinates or how does it work?

btw, Is it on the market yet? I searched for it but didnt find anything that looks like this?


Support / Re: Menu System
« on: February 24, 2011, 03:43:11 pm »
Thanks for your reply. I have been thinking about blitting as being my number 1 option as well. I currently for test purposes have an activity with some buttons on it to load different levels but you cant really do much with that kind of menu system and I don't like popping in and out of activities.

So right now, I reckon I will probably do something similar to what you spoke about. Would be nice to have some sort of framework built around blitting for a menu system that would be reusable.

Support / Menu System
« on: February 24, 2011, 02:33:56 pm »

for an android game what do people suggest is the best way to create a menu system?

1) A separate android activity with button widgets etc (isolated from jpct-ae)
2) Blitting a full menu via jpct-ae
3) 3d objects with a camera facing them head on
4) Any other suggestions?

Im not looking for any example code or anything like that, Im just curious as to what is the general method for developing a menu system for a jpct-ae game so that I can start investigating that method without wasting time on something which people may know to be a dead end.

Many thanks

Support / Re: skybox in jpct-ae
« on: February 24, 2011, 01:58:39 pm »
Thanks Egon. I somehow did not notice that there was an android specific support forum. This should keep me busy for a while :)

I do need some sort of skybox because my game is based on a floating platform of sorts and to have a single colour background would not look very aesthetic. I will keep digging around with a few other ideas.

Support / skybox in jpct-ae
« on: February 24, 2011, 01:37:07 pm »

First of all, I only starting using jpct-ae about 3 weeks ago but I want to thank you Egon for developing this library - it is absolutely awesome!

Now, I am trying to write a simple game for android at the moment but I noticed that the framerate for my prototype to date was running at around 30fps on a 1ghz phone so I spent some time trying to optimize it. I have it running at 50fps now after some work but I find that if i remove my skybox from the world (or fog it out) then the fps jumps to 60. So it seems that the skybox is really hurting my framerate.

My approach to the skybox is :
1) Modeled a cube in blender and flipped the normals on the faces of the cube so that the textures will render on the inside
2) Exported the cube as 3ds file - i did not texture the cube in blender.
3) load the 3ds into the world (same world as the rest of the game, not a seperate world like in one of the demos) and used setTexture method to put the same jpg on each of the faces.

This renders well and does what i would like but its the framerate that bothers me.

Is this being caused by the fact that I have a massive cube and the textures are being stretched across the faces of the cube?

What would be a better approach?

I have one or two other questions but I will post them separately so that any answers will be easier to find for others who encounter the same issues.

Thanks in advance.

Any help would be appreciated. Thanks.

Pages: 1 [2]