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 ... 5
Projects / Craft The Path 2
« on: October 02, 2015, 08:43:54 pm »
I have recently published the sequel of my game: "Craft The Path 2".
It has improved block hit detection (this version uses "ray cast", don't ask how i have done it in 1st version ;) ), second major addition is first person camera - this was quite a challenge, but unfortunately I have failed in some cases: "climber" the block where you can climb up and down might not work in "some cases" in 1st person camera. I have also added new blocks TNT, coal and other things. I didn't have enough ideas to create levels that is why it has only 25 levels.

Projects / Re: Cut The Clothes
« on: May 04, 2015, 10:00:36 am »
Interesting...I found the controls hard to understand. Even with the initial help text, it took me several tries to find out that I have to touch the screen somewhere to enter cutting mode and release it to actually do the cut. Why is that? Why don't I draw all the time and cut once a section is completed? Is there any benefit from stacking colored sections and cut them all at once?

When you are in drawing mode the pencil move slower, that's why when you are chased by enemy you can escape them by releasing draw mode but then you lose lines already drawn.

Projects / Cut The Clothes
« on: May 03, 2015, 03:30:36 pm »

Finally I managed to finish my game "Cut The Clothes". The idea for it comes from arcade (coin op) game called "Dancing Eyes". The game was released in Japan only, and the hardware of this arcade was similar to PSX One, allowing it to display 3D textured graphics - that's the short history :)
Your task is to move along the grid lines and draw closed area, when you do it the selected area (part of clothes) will disappear, the goal is to remove all "panels".
Implementing it was a small challenge, I had to take care of things like: line drawing, depth buffer inaccuracy, grid creation, graph cycle detection, detection of panels inside cycle, changing the visibility/color of panels - for this I am using dedicated shader that's why I am able to control visibility of more than hundred panels without performance lost.
You can find jPCT logo and address in "about" section.

I will be glad for positive ratings on GoolePlay. Thanks ;)

Support / Re: Disappearing transparent geometry
« on: April 26, 2015, 01:22:31 pm »
I have figured it out, it was my fault - the missing geometry was discarded by depth test, because it was covered by other object rendered to depth buffer only.

Support / Disappearing transparent geometry
« on: April 25, 2015, 09:31:44 pm »
In some cases when camera moves around object (transparent object) a part of this object disappear. As you can see on second image, a part of object is missing.
Is it possible to set some kind of flag to disable this geometry "culling" (the back-face culling is disabled for this object)?
When I disable transparency for this object it is rendered ok.

Support / Drawing Lines
« on: October 26, 2014, 09:15:51 pm »
I was searching how to draw lines in jPCT but didn't found any good solution that's why I want to present my code and ask: what are possible problems with this solution? I am suspecting that when object/triangle leave camera sight the lines might disappear. Will it cause other problems and how to prevent them?

Code: [Select]
public class SimpleLineManager {

public class LineSegmentContainer {
public int segmentLen;
public FloatBuffer segmentBuffer;
public SimpleVector segmentColor;

static final int COORDS_PER_VERTEX = 3;
private final int VERTEX_STRIDE = COORDS_PER_VERTEX * 4; // 4 bytes per member

private ArrayList<LineSegmentContainer> _lineSegments;
private GLSLShader _lineShader;
private Object3D _root;
private IRenderHook _renderHook = new IRenderHook() {
public void setTransparency(float arg0) {}
public void setCurrentShader(GLSLShader arg0) {}
public void setCurrentObject3D(Object3D arg0) {}
public boolean repeatRendering() {
return false;
public void onDispose() {}
public void beforeRendering(int arg0) {
public void afterRendering(int arg0) {}

public SimpleLineManager(GLSLShader lineShader) {
_lineSegments = new ArrayList<SimpleLineManager.LineSegmentContainer>();
_lineShader = lineShader;

float[] vertices = { 0,0,0, -0.0001f,0,0, 0.0001f,0,0};
float[] uvs = { 0,0, 1,1, 1,0};
int[] indices = {0,1,2};

_root = new Object3D(vertices, uvs, indices, 0);

public void addToWorld(World w) {

private void drawLines() {
int verticesHandle = GLES20.glGetAttribLocation(_lineShader.getProgram(), "position");
int lineColorHandle = GLES20.glGetUniformLocation(_lineShader.getProgram(), "lineColor");
for(LineSegmentContainer ls : _lineSegments) {
GLES20.glUniform3f(lineColorHandle, ls.segmentColor.x, ls.segmentColor.y, ls.segmentColor.z);
GLES20.glVertexAttribPointer(verticesHandle, COORDS_PER_VERTEX, GLES20.GL_FLOAT, false, VERTEX_STRIDE, ls.segmentBuffer);
GLES20.glDrawArrays(GLES20.GL_LINE_STRIP, 0, ls.segmentLen);

public void addLineSegment(float[] coords, SimpleVector color) {
ByteBuffer bb = ByteBuffer.allocateDirect(coords.length * 4);
FloatBuffer vertexBuffer = bb.asFloatBuffer();
LineSegmentContainer lsc = new LineSegmentContainer();
lsc.segmentBuffer = vertexBuffer;
lsc.segmentColor = color;
lsc.segmentLen = coords.length/3;

public Object3D getRoot() {
return _root;

vertex shader
Code: [Select]
precision mediump float;

uniform mat4 modelViewProjectionMatrix;
attribute vec4 position;
//attribute vec3 normal;
varying vec4 varVertexColor;

void main(void) {
gl_Position = modelViewProjectionMatrix * position;

fragment shader
Code: [Select]
precision mediump float;

uniform vec3 lineColor;
uniform float alpha;

void main (void)
vec4 base = vec4(,alpha);//varVertexColor ;
gl_FragColor = base;

Projects / Re: Craft The Path
« on: October 26, 2014, 08:11:29 pm »
   Nice puzzle concept ! Seeing so much of your projects/ works inspired by minecraft's blocky graphics , you are probably a great minecraft  fan, I think  ;D :D!!
 The look and feel  of the game is enhanced due to  ambient occlusion ! You mentioned about fake AO.
 May you please tell me something about it ? And also can it be extended to complex models, geometries instead of simple blocks?

Sorry for so late reply but I don't come to this forum too often, and looks like I have missed the notification. Anyway my idea is very simple and unfortunately it can't be used for other type of geometry - when I generate surface I check if it is surrounded by other blocks when it is then I decrease "color intensity" of given vertex. This color intensity is stored as separated vertex attribute so the rest of the work is done by shader.

Projects / Re: Craft The Path
« on: September 01, 2014, 10:24:09 pm »
Nice idea, it reminds me Lemmings :)

And you are right :D
My first idea was to make something similar to Lemmings with minecraft motif. But I thought that many creepers with independent path finding and logic will kill every device that is why I decided for one user-controlled character.

Projects / Craft The Path
« on: September 01, 2014, 08:55:26 pm »
Hi everyone.

I want to present my newest game: Craft The Path. The goal of game is to build a way (by appropriate adding or removing blocks) for the creeper, so he can walk to exit. It isn't so easy because you have limited number of blocks and pickaxe hits.
Some technical info: the game is using modified version of "flat shader" -  I call it "fake ambient occlusion", the collision of touch point and box is done by calculating line-sphere intersection, and path for creeper is created using A* (a star) algorithm.
I wanted to add to this game wallpaper (together with wallpaper editor) but there is problem with TextureManager - when the wallpaper and game are in one application then they will share TextureManager in that case the wallpaper service and game activity mess up with each others textures (I am loading resources in dedicated threads).
Link to game:

Projects / Craft World 3D Live Wallpaper
« on: March 31, 2014, 01:20:51 pm »
My another small production, with motif of Minecraft. This time I have created Minecraft world in spherical coordinates. This construction is very simple, that is why it cannot have things like caves, and another drawback - the cubes closer to poles are deformed. I have decided not to use shaders because I don't want the flat shaded surfaces (the flat shader consume more memory) and after few tests it looks like rendering the scene using GL 1 was bit faster than GL 2.
I was thinking about game using this kind of generated world, but so far I don't have reasonable ideas.

Support / Re: How to force object creation?
« on: January 06, 2014, 09:33:21 pm »
Thanks for advices. Disabling VBO looks as best option for me.

Support / Re: How to force object creation?
« on: January 06, 2014, 08:45:33 pm »
The "blocks" share geometry but the other types of objects not necessarily (for example track segments can't share geometry).

Support / Re: How to force object creation?
« on: January 06, 2014, 08:12:52 pm »
Maybe I have explained it wrong, but the problem is with "VBO creation". The objects are build and compiled but when I call FrameBuffer.draw() only for few of them are created VBOs, and during the game I can see all the time messages: "creating buffers" and "VBO created for object..", and in situation when the larger group of objects becomes visible for the camera, the slow devices are freezed for few seconds.

Support / Re: How to force object creation?
« on: January 06, 2014, 04:55:47 pm »
I am still unable to resolve this problem. The objects are added to world and their visibility is set to FALSE. In the initialization procedure I want to force objects to be created, so I make something like this (the objects might appear behind camera):
Code: [Select]
for(int i=0;i< _blocks.length; ++i) {
  _trackGen.getPositionAtTime(_tempVector, 2000, 0);

but instead of series of messages "VBO created for object 'object' " I got:
I/jPCT-AE(7001): Additional visibility list (195) created with size: 512
The cleanup procedure makes objects invisible again. I am suspecting that this group of objects might freeze the game for a few seconds on slow devices. The objects have attached a shader so there is additional pause for shader compilation. Am I doing something wrong?

Projects / Music Ride 2
« on: December 28, 2013, 07:27:58 pm »
I would like to present second version of my game "Music Ride 2".
Compared to previous version this is much improved completly new race generation algorithm (track has turns now), much interesting game modes, possibility to shot etc.
For those who didn't know first version: Music Ride 2 is a rhytmic-racing game. Based on selected by user song it generates racing track, and our task is to collect rhythm gems, the idea of this game is very similar to PC game Audiosurf.

Pages: [1] 2 3 ... 5