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

Pages: 1 [2] 3 4 5
Support / How to force object creation?
« on: December 10, 2013, 10:02:33 am »
When I create my scene some objects are not created immediately, they are created when camera get closer to them (or camera is pointing on them not sure).
I want to avoid it, I want to force to create VBOs for all objects on scene. Is any possiblity to do that (beside moving camera to different locations)?

Projects / Pumpkin 3D Live Wallpaper
« on: October 18, 2013, 03:02:20 pm »
Hello everyone.
I decided to create small production which should put your phone in Halloween mood.
The wallpaper has two animation modes, in first the pumkin will play short scene after touch, in second mode sliding your finger across the screen rotates the pumpkin.

Projects / Voxel Craft Live Wallpaper
« on: August 13, 2013, 05:05:54 pm »
This small piece code was created using routine from my last game - it builds 3D objects from images. Wallpaper has builtin small editor so you can create your own objects.

Projects / Re: Craft Breaker
« on: July 11, 2013, 09:45:02 pm »
Thanks for translation :D
The position should not be updated from other thread, but I might miss something. You are right - the position is received from server in other thread (in single player too) but it is contained in separate variable, in the rendering thread I make interpolation of position (based on those variables received in other thread) and after calculation it is assigned to graphical object. For the time of scene update the variables are locked (the receiver thread should be locked), but maybe there is something wrong. Those kinds of errors are hard to find... it is not my first multithread application but this is my first mutiplayer game so it might contains some glitches ;)

Projects / Re: Range Shooter 3D - my first game
« on: July 07, 2013, 05:47:34 pm »
The game is nicely done. I think it would be great if you could add targeting with sensors (something like in game "Guncrafter"). Someone after playing my game wrote to me: "try to add control with accelerometer, it is more fun to wave your phone" :D and I agree with that.

Projects / Re: Craft Breaker
« on: July 05, 2013, 11:28:48 pm »
Sure. As usual, I will be very grateful.

Projects / Re: Craft Breaker
« on: July 05, 2013, 07:40:39 pm »
Thanks. The lighting model was little problematic for me, because I wanted to have something similar to flat shading with high contrast between different sides of boxes and this might cause this effect, but so far I have no solution for it, maybe I will change skybox brightnes. I will think about it.

Projects / Craft Breaker
« on: July 05, 2013, 04:26:32 pm »
Hi everyone

I would like to introduce my newest production - "Craft Breaker". It is a combination of classic Arkanoid-type game with 3D graphics in the style of Minecraft and with added multiplayer option - which makes this game also similar to another famous production - Pong, with the difference that you can play up to 4 players simultaneously.
You control bat using the accelerometer, swiping your finger across the screen changes the camera view, and if you get bored with single player game, you can invite friends to play multiplayer (co-op or battle) using Bluetooth or WiFi (in case of WiFi you have to be connected to the WiFi network).

Thanks again to Egon for changes in jPCT.
The game is using internally a kind of voxel engine to display blocks (one object for one brick was inefficient), the objects are dynamically recreated when the brick is destroyed. It is my first attempt to create multiplayer game, for communication I have used Kryonet (TCP) and my own bluetooth client/server with Kryonet serialization.

Support / Re: Mesh optimization
« on: May 17, 2013, 05:56:35 pm »
Thank you !  :D
I works perfect now.

Support / Re: Mesh optimization
« on: May 17, 2013, 03:23:45 pm »
I don't use method addTriangle(). I have all data in arrays:

Code: [Select]
        currentObject = new Object3D(vertices, uvs, indices, TextureManager.getInstance().getTextureID(_textureAtlas));
        VertexAttributes attribs = new VertexAttributes("faceBrightness", brightnes, VertexAttributes.TYPE_SINGLE_FLOATS);

Support / Re: Mesh optimization
« on: May 17, 2013, 11:47:07 am »
I forgot, this is vertex shader:

Code: [Select]
precision mediump float;
precision highp int;

uniform mat4 modelViewMatrix;
uniform mat4 modelViewProjectionMatrix;

uniform vec4 additionalColor;
uniform vec4 ambientColor;

uniform vec3 lightPositions[8];

attribute vec4 position;
attribute vec3 normal;
attribute vec4 tangent;
attribute vec2 texture0;
attribute float faceBrightness;

varying vec2 texCoord;
varying vec4 varVertexColor;

void main(void)
vec4 normal4 = vec4(normal, 0);
vec4 position4 = modelViewMatrix * position;
vec3 position3 =;// / position4.w;

vec4 eyeNormal4 = modelViewMatrix * normal4;

varVertexColor = vec4(faceBrightness,faceBrightness,faceBrightness,0);//vec4(1,1,1,0);

texCoord = texture0;

gl_Position = modelViewProjectionMatrix * position;

and fragment shader:

Code: [Select]
precision mediump float;
precision highp int;

varying vec2 texCoord;
varying vec4 varVertexColor;

uniform sampler2D textureUnit0;
uniform sampler2D textureUnit1;

uniform float alpha;

void main (void)
vec4 finalColor = texture2D(textureUnit0, texCoord) * varVertexColor;
gl_FragColor = finalColor;//base;//vertexColor ;//vec4(1, 0, 0, 1);

Support / Re: Mesh optimization
« on: May 17, 2013, 11:41:29 am »
It helped, but it looks like there is problem on GPU side :(
This is screen of nine objects (every object is build from mesh of 4x4 boxes) in default shading with one light:

I have added attribute to control brightness of selected face. This screen shows when first four values of additional attribute are set to 0 - first face (box wall) of every object is black:

So far so good... but next screen shows when the attributes are set to make all front walls black:

and the same for top wall:

fail  :'(

The scene has no spot lights and ambient light is set to 255 and for every object before calling build() I call disableVertexSharing() . The only thing I can do is to decrease contrast between brighter and darker values.

Support / Mesh optimization
« on: May 16, 2013, 09:26:37 pm »
Is there any way to disable mesh optimization, or can you add something like a switch to enable/disable it?
It might help me in 2 things:
1) speedup object creation
2) add flat shading
I wanted to create "flat shading" and I wanted to use undocumented method Mesh.addVertexAttributes(), however when I build object some vertices together with my attributes were removed from mesh (or it looks like they were removed) :(
Can you help me with this Egon please?

Projects / Re: Music Game: Sound of Infinity
« on: April 18, 2013, 09:09:36 pm »
I made similar approach to this one in your link. However I did not look forward and backward to find beat in time distance (it is helpful if you want to find exact rate/tempo or speed changes). In my solution I first calculate FFT, and try to find power peaks on few selected frequence ranges, in that case I am able to detect "beats" of different "instruments", and I use variance calculation to correct the "energy ratio". I used C to implement this because C++ is not recommended in NDK (C++ is not fully supported).
I am using average power values to create base shape of track.
One more question: how do you get decoded data, I am using lame and ogg sources to create decoder (it tooks me a lot of time to compile and make lame to work :/ the ogg is a lot easier to use), do you have another solution?

Thank you for translation :D . Sure you can add it to projects page.
If you install this wallpaper it will ask you to accept terms of advertising,  and if you select "close" not "OK" the ads won't show :) (it should not), but next time when the wallpaper will be reastarted it will ask you again. If you uninstall it then you will not receive any ads, it is not a virus (some people says it is ).
The side effect is that I won't earn anything :p

Pages: 1 [2] 3 4 5