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

Pages: [1] 2 3 ... 5
GLBasic - en / html5 support
« on: 2012-Aug-16 »

any news on html5 support?

Next Ludum Dare is near and I would like to code something for it that could be played in a browser.
People always complain about having to install in order to test.

any remote possibility to have an experimental build?  =D


he estado usando ultimamente el sistema de escalado que publicó ampostata y me estoy encontrando problemas al usar las fuentes.

Cuando escribo algo usando z_print, las fuentes aparecen sin aplicar alpha, dentro de un cuadrado negro.

No se si ampostata está últimamente por aquí y me puede echar un cable.
De todas formas, si lo habeis usado y sabéis cómo solucionarlo os lo agradecería.

GLBasic - en / apks in android
« on: 2012-Jun-13 »

can anyone explain me wich are the differences between the different apks that are beeing generated?
debug, debug-unaligned and unsigned

which one is the installed by default?
is the release version the usigned one?


GLBasic - en / dpi on iPhones
« on: 2012-Jun-10 »
Hi mates,

Just a trivial question that has crossed my mind several times.

When you develop for devices like iPhone with really big screen dpis, did you do all the graphics stuff at 300 dpi (iphone screen dpi) or at a usual 72 dpi??
Is there any visual difference?

I use to do it all with 72 dpi but I´m not sure if I´m doing right when looking for best aesthetics.

GLBasic - en / Problem with DELETE
« on: 2012-Jun-06 »
I have an enemy type with an array inside wich is used for the A* algorithm result.

If I delete an enemy inside a FOREACH with the DELETE command, the arrays containing the A* result of the rest of the enemies is been modified. It seems like a problem with the pointers, maybe?

In other words, when I deleted an enemy, all the other enemies' paths are messed.

For better understanding I will post you the code.
Thanks in advance and hope anyone can guide me correctly :)

Code: (glbasic) [Select]

Code: (glbasic) [Select]
FUNCTION SpawnEnemy:

LOCAL temp AS TEnemy
temp.x = (sx-1)*RND(1)
temp.y = RND(sy-1)
temp.w = 26
temp.h = 34 = 100
temp.speed = 1

temp.pathlength = FINDPATH(map[], temp.path[], 0.0, temp.x/mapstep, temp.y/mapstep, (sx/2)/mapstep, (sy/2)/mapstep)

IF temp.pathlength > 0
DIMPUSH enemies[], temp


Code: (glbasic) [Select]
FUNCTION MoveEnemies:
FOREACH temp IN enemies[]

LOCAL a = temp.path[0][0]*mapstep - temp.x
LOCAL b = temp.path[0][1]*mapstep - temp.y
LOCAL m=SQR(a*a + b*b)

IF m < 1
//reached checkpoint
IF LEN(temp.path[]) > 1
DIMDEL temp.path[], 0
//reached objective
temp.dx = (a/m) * temp.speed
temp.dy = (b/m) * temp.speed"

INC temp.x, temp.dx
INC temp.y, temp.dy

IF <= 0 THEN DELETE temp

GLBasic - es / van las inapp purchases?
« on: 2012-May-28 »

quisiera saber si a dia de hoy las inapp purchases funcionan y de ser el caso donde puedo encontrar la última versión del código.

Tengo que empezar un proyecto en breve y necesito el tema de las compras obligatoriamente. No quiero tener que hacerlo en cocos sólo por la tienda.

He estado buscando por el foro y está todo el tema bastante liado con varios hilos desperdigados.


for my LD entry I posted a 2D horizontal scroller with a guy walking through a terrain.

I would like to know if its possible to apply a terrain texture the ground sprite in order to paint it on-the-fly following the contour.

Maybe by using polyvectors and some kind of dynamic adapted texture??

In my sample, the terrain is a sprite but if I what I want can be achieved with another kind of object like a poligon mesh is not a problem, Im just looking for the result, texturizing dynamic terrain :)

I attach you here the samples for better understanding of what I want to achieve.

[attachment deleted by admin]

Hi guys,
recently I wanted to record a gameplay video of my LD entry with fraps but Im having several isues with the audio sync.
I remeber that I expercienced this type of problems before :(

How do you record them?

Code Snippets / Shaders - Sepia, BLack & White
« on: 2012-Apr-25 »
Ive been playing a bit with shaders and 2D tints and managed to compile 2 of them.

I post it here in case it could be useful for anyone or even me in the future.

for sepia tint just use this

Code: (glbasic) [Select]
uniform sampler2D image;

void main() {
vec3 texel = texture2D(image, gl_TexCoord[0].xy).rgb;
gl_FragColor = vec4(texel.x,texel.y,texel.z, 1.0);

gl_FragColor.r = dot(texel, vec3(.393, .769, .189));
gl_FragColor.g = dot(texel, vec3(.349, .686, .168));
gl_FragColor.b = dot(texel, vec3(.272, .534, .131));   

For a Black & white filter this one

Code: (glbasic) [Select]
uniform sampler2D image;

void main() {
vec3 texel = texture2D(image, gl_TexCoord[0].xy).rgb;
gl_FragColor = vec4(texel.x,texel.y,texel.z, 1.0);

gl_FragColor = max(texel.r,max(texel.g,texel.b));


During the last LD I found a problem that coudnt solve properly.

I had a 2D terrain with a collision mask and just wanted to implement a sprite walking over it.
I just needed to use one point calculation (medium bottom) for the checks.

I thought about using setpixel but discarted for beeing slow.
I finally did it by adjusting up/down all the times the Y, but that obviously ends with a bit of flickering and another related things like an "elevator motion" when you move fast and the character goe trough the terrain. Im still thinking about a good solution without having to precalcullate the terrain heights.

Some sort of raycast collision calculation is possible in 2D?
Wich is the best way?

GLBasic - en / 2d shader possible?
« on: 2012-Apr-20 »

I was asking myself if its possible to use a shader with 2d in glbasic.

I thought shaders were only for 3d but recently have found some videos about blur effects, pixel shaders and black and white shaders for 2d.
Is this possible?

Anf if it is? how?


llevo unos días trasteando un proyecto en iPhone y siempre me encuentro con el mismo problema.
Os explico mejor, a ver si me podeis echar una mano porque ando ya muy rallado.

Quiero poner una view en una región de la pantalla y poder interaccionar.
Para ello, creo un nuevo controlador y asigno la vista como una subview de window. Dentro de la vista pongo todo el código que necesito y tal.
El problema aparece cuando una vez acabada la interacción con la view, quiero seguir con el juego en sí. Siempre acabo perdiendo el foco y la vista de glbasic ya no recibe ningún evento más.
Entiendo que la vista que he creado está capturando la entrada pero no se como lidiar con ello sin eliminar la vista.

Vamos, que no se como hacer para que las 2 capas (el juego y la que he creado) puedan convivir sin problemas.
Este problema de interacción de glbasic con capas de IOS me lo encuentro a menudo al querer integrar cualquier cosa y siempre acabo sin solución.

Espero que me podais echar un cable porque esto es un desespero  :(

GLBasic - en / rootViewController
« on: 2012-Apr-17 »

How can I access the root view controller in IOS?

I have tried in several ways but it doesnt work.


Hi mates,
I´m trying to integrate sharekit lib in order to share twitter/facebook content in GLB.

All is working fine but once I finish the sharekit interaction the focus is not regain by glbasic and taps are not been detected anymore.
I believe I must dissmiss my subview once sharekit has finished but I don´t know how to capture the event or even if this is the right way.
I´m sure I´m missing something. I need some help as I´m not really and IOS expert.

I have tried several ways without luck. I´ve post the question also in stack overflow, you can find the code there:

Hope anyone can give me a hint.

Hi guys,

I´m looking for an easy way to wrap a twitter/facebook sharing library on an iPhone app.

I´m trying with this IOS third pary libraries:

ShareKit was my first target and nearly worked but the library seems not been updated anymore and is kinda buggy.
Socialize seems really good but must be compiled with flags -ObjC -all_load and is giving a lot of crashes and headaches.
My last try is using AddThis with no luck by the moment.

any of you had luck with another method?

Pages: [1] 2 3 ... 5