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.

Topics - zammbi

Pages: 1 [2] 3
Support / Trouble adding Android UI on top
« on: March 05, 2012, 09:54:41 pm »
Currently having trouble with adding Android UI on top. I can't seem to find a stable way to do this and support resuming.

I first had everything in the xml layout but going back to the previous activity and then forward again makes everything black every time.  It can do it by just minimising at rare times(does this in my game).
I believe its something to do with the GLSurfaceView needing to be recreated every time. Nothing online has really helped me - that I need Android 3.0+ or a custom GLSurfaceView.

I'm currently now doing this in code in the create method after I create the GLSurfaceView each time.

Code: [Select]
tvScore = new TextView(this);
ll = new LinearLayout(this);
this.addContentView(ll, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));

But I'm not sure if this is the right way to go.
There is no removeContentView, so I can't reuse the above controls for the new Activity. And I'm not sure if the old ones are being released. But I know that I need to keep adding them each time or my UI stuff will never show.

Projects / Illumalaxy (spaceship game)
« on: March 04, 2012, 01:33:12 pm »
I coded up a small spaceship game today(needs a name). Quite incomplete and a number of bugs at this stage.

Would be great if I could get some fps readings on random devices, see if there are any crashes and feedback on controls.

So far you can shoot, destroy ships(100 scattered around), fly around, zoom in and out, it has background music and tries to scale graphics depending on your device stats.

Minor update:

Should be a bit more optimised now.

Update 2:
I have decided that this will be an online game. I have already added logging in,registering and some positioning on the server.
I've fixed up a number of client bugs.
Can't allow any testers yet until I get a server. For now I'll leave the old installer if anyone wants to test that.

[attachment deleted by admin]

Support / Tile texture on a SkyBox
« on: March 04, 2012, 08:08:07 am »
I might be missing something but I can't see how to tile a texture on a SkyBox.
Is it possible?

Bugs / Huaweu x1 renders very glitchy
« on: February 29, 2012, 11:52:44 pm »
I'm currently testing the Huaweu x1 however it's very glitchy. Tested with both the beta and the stable version.

I have a plane with a texture on it which is under my model, but the texture is warped and the plane goes on top of the model. Clipping of the model also messes up.

03-01 12:03:22.322: I/jPCT-AE(2544): OpenGL vendor:     Android
03-01 12:03:22.342: I/jPCT-AE(2544): OpenGL renderer:   Android PixelFlinger 1.3
03-01 12:03:22.342: I/jPCT-AE(2544): OpenGL version:    OpenGL ES-CM 1.0
03-01 12:03:22.342: I/jPCT-AE(2544): OpenGL renderer initialized (using 2 texture stages)

Its Android 2.2.2.

I'll try get a screen shot...

Support / Drawing an advance line
« on: February 28, 2012, 09:54:32 pm »
Hi, it's been a while since I've visited here, this time it's for work :)

I'm here in behalf of CricHQ ( and looking if this library is suited for what they want for it. We are creating an Android version of CricHQ mobile. One of the things needed is a 3d wagon wheel just like the current iPhone version.

Everything has been going well however it seems that Jpct doesn't support primitive line drawing by default which has put a halt in my work and I don't want to use another library if possible.

I basically need one basic method like the iPhone engine 'populateAsLineStripWith', which basically you give it a width and an array of points. And of course allows to colour it with any colour.
Everything else I can port over.

Here is an example of the wagon wheel:

Support / Getting the bounds of the world
« on: October 15, 2010, 08:09:30 am »
How does one get the bounds of the whole world? I want to make it so if a user gets a glitch(fall through a polygon), which they end outside of the map, it warps them back.

So I need to check on the bounds of the whole world. I guess the bounds could change from the character(or any other movable thing) but I'll take a snapshot when the level has loaded.

Feedback / WebP new image type
« on: October 02, 2010, 05:20:55 am »
So Google has made a new open source image type called WebP which seems like a nice option over jpeg. Seems they got a better compression rate (40% or so better) with the same quality.
It would be nice to see this format supported in JPCT or as a separate library. Anyone up for the challenge?  :)

Support / Broken light in software mode
« on: September 26, 2010, 06:51:17 am »
So I was trying out my new obj cave model but when I loaded the textures, things really got messy. But when I used hardware mode everything was fine again. Bug? solutions?

Software mode:

Hardware mode:

Support / Server collision triggers
« on: September 07, 2010, 03:42:12 pm »
I'm stuck a little trying to work out how I will do collision triggers on my server.

So a simple example would be someone walking in a door and warping the user.

Another example would be a user walking in through one aka, to open a door.

Then I will also need to support room size triggers aka security or lava. Which I could have many triggers inside that large trigger.

The triggers will only need to fire once, but some cases I'll need to check if I'm still inside one.

I'm quite lost on how I would tackle this problem. So any help on the subject would be great.

Support / Rain effect
« on: September 01, 2010, 09:08:49 am »
Just wondering what everyone else has done for their rain effect? I don't want to reinvent the wheel when I don't have too.
Or any suggestions on creating ok looking rain which is quick enough for the software renderer?

Support / blitting not showing texture on quality change
« on: August 28, 2010, 07:33:37 am »
Having a little trouble with blitting.
It's not showing the texture on quality change with software mode. Doesn't matter if its transparent or not, what file type it is, tried different textures, setMipmap to false, etc..
It will only show for 'SAMPLINGMODE_NORMAL'. Nothing else is effected, only blitting. No problems at all when I switch to hardware mode.

Anyone else having this issue?
A forum search didn't show anything. So any help will be great...

Support / A few questions
« on: August 19, 2010, 08:28:48 am »
Finally can post, forum trouble?

1) So I been thinking to use toXML when I get to that stage. Is there any documentation on this? I couldn't find any what exactly it exports.

2)Why does my hardware switcher crash, when going from hardware to software mode.

I get this crash:
OpenGL renderer disposed
Software renderer (OpenGL mode) initialized
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
   at com.threed.jpct.SoftGLRenderer.drawPolygon(Unknown Source)
   at com.threed.jpct.SoftGLRenderer.drawPolygon(Unknown Source)
   at com.threed.jpct.SoftGLRenderer.drawVertexArray(Unknown Source)
   at com.threed.jpct.World.draw(Unknown Source)
   at com.threed.jpct.World.draw(Unknown Source)
   at com.threed.jpct.World.draw(Unknown Source)
   at base.GameWindow.<init>(
   at base.GameWindow.main(

which is at this line:

Code: [Select]
for (int i = 0; i < numOfUpdates; i++) {
state = null;
while (!talkfield.isActive() && (state = keyMapper.poll()) != KeyState.NONE) {
processKeyEvent(state); // Process key events here using the 'state' object

window.evaluateInput(mouse, keyMapper);
world.draw(buf); <-----crashes here.
world.drawWireframe(buf, Color.WHITE);

My switcher code is:

Code: [Select]
private void switchHardwareMode(){
switchHardware = false;
Config.glFullscreen = fullscreen;

if (!hardware) { //hardware mode
hardware = true;
buf.enableRenderer(IRenderer.RENDERER_OPENGL, IRenderer.MODE_OPENGL);

mouse = new MouseMapper(height);
keyMapper = new KeyMapper();
} else { //software mode
hardware = false;
       if (fullscreen) {
buf.enableRenderer(IRenderer.RENDERER_SOFTWARE, IRenderer.MODE_OPENGL);

mouse = new MouseMapper(frame);
keyMapper = new KeyMapper(frame);


3) How can I have child lights to a object? I want to have a light follow a object but not worry about this myself as I'll be tracking a lot of of lights. Is this possible? or will be possible?  ;)

Support / Optimising for headless mode
« on: July 29, 2010, 06:18:10 am »
What would be the best options to setup JPCT for headless mode to be the most optimised? Going to be running JPCT on a server.

Support / Polygons flipped the wrong way
« on: March 04, 2010, 10:59:16 am »
I'm currently loading a 3ds landscape and it seems to have flipped the polygons(water is on top of the hills). I have never seen this problem before.
When I load it in blender it appears correctly. I don't know what's causing this, maybe some silly error on my part.

Anyone else get the same issue?

Support / Breaking maps into zones
« on: September 12, 2008, 11:42:22 am »
I'm trying to figure out how to break up a map into zones for the server so it can work out when to send positions of players to another.
I need the map to be broken into equal squares on all maps. But since there is no kind of get width method of a world/object3D, how am I meant to do this?

Pages: 1 [2] 3