Menu

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.

Show posts Menu

Topics - kaotiklabs

#1
GLBasic - en / html5 support
2012-Aug-16
Hi,

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
#2
buenas,

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.
#3
Hi,

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?

thanks!
#4
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.
Thanks!
#5
Hi,
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
TYPE TEnemy
x
y
w
h
dx
dy
speed
life
path[]
pathlength
ENDTYPE


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
temp.life = 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
ENDIF

ENDFUNCTION


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
ELSE
//reached objective
DELETE temp
ENDIF
ELSE
temp.dx = (a/m) * temp.speed
temp.dy = (b/m) * temp.speed"
ENDIF

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

IF temp.life <= 0 THEN DELETE temp
NEXT
ENDFUNCTION



#6
Buenas,

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.

#7
Hi,

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]
#8
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?
#9
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));
}
#10

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?

#11
Hi,

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?
#12
Buenas,

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  :(
#13

How can I access the root view controller in IOS?

I have tried in several ways but it doesnt work.
#14

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:
http://stackoverflow.com/questions/10173871/sharekit-lose-focus-when-actionsheet-is-closed

Hope anyone can give me a hint.
#15
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?
#16
Does GLBasic support the new Mac App Store?
Has anyone tried to publish there?

I don´t know if the app must be specially crafted or a regular mac app is still valid.
#17
Hi,

I just wonder if there´s any Ipad app already published.

Apple only approve Ipad apps if they support all the orientations, or at least both vertical or both horizontal.
How glbasic deal with this? any code sample?
#18
Hi mates,
I ´ve been very busy lately in a secret project and finally I´m free to speak :P
After the release of DEFCON Z, we were contacted by a publisher who was interested in our game.
The day has come and finally we have released our first game under a third party!  :booze:

We are really proud to be part of All-In-1 ZombieBox pack!
Our first release under Appy Spotlight label is due to hit the iPhone App store in time for Halloween!.



All-In-1 ZombieBox contains 10 (count'em!) Zombie-themed Apps at one incredible low price!
Get Ten Full Zombies Apps For The Price Of One!
Just in time for Halloween comes a horde of zombie apps for one low price! Every app is a full version, just like you'd find on the App Store ... but with the All-In-1 ZombieBox you get all these apps together in ONE Unbeatable Undead Deal!
With all these brains, guns, blood, bullets, saws, swords, whales, and pizza on offer, there's bound to be something for everyone. You'd have to be a brain dead zombie to pass this up!



This would never be possible without the invaluable help of Trucidare and Gernot who worked really really hard to integrate glbasic into the publisher´s compilation framework. Many many thanks for your effort, you are really great!!
This pack is also a real proof which shows the great power and awesome flexibility of GLBasic language, that´s what you can expect with such a talented people behind.  You rock!!! :nw:

I also want to ask you to retweet this message if possible because we need to make all the possible noise:
All-In-1 ZombieBox has 10 fully-featured zombie apps for under a buck. Details: http://ht.ly/2N47Y iTunes: http://ht.ly/2N4lu RT!

If you are interested, you can read the press release here: http://gamasutra.com/view/pressreleases/63644/ALLIN1_ZOMBIEBOX_OFFERS_TEN_ZOMBIE_APPS_FOR_ONE_VALUEPRICE.php

iTunes Link: http://itunes.apple.com/app/all-in-1-zombiebox/id393960044?mt=8

Our web: http://www.MonkeyArmada.net

#19
Hi,

I just want to draw an Y form using lines and push and pops but is only drawing the first line. Nothing is drawed once rotated or translated, so I believe I should be doing something wrong.

Please give me a hint  :)


Code (glbasic) Select

GLOBAL height, width
height = 600
width = 600

SETSCREEN height, width, FALSE

WHILE TRUE
X_MAKE3D 1, 2500, 45
X_CAMERA 0,0,500, 0,0,0

X_MOVEMENT width/2, height-20, 0

  X_LINE 0,0,0, 0,60,0, 10, RGB(0,0,255)
  X_MOVEMENT 0, 60, 0   
 
  X_ROTATION 30, 1, 0, 0
  X_PUSHMATRIX
  X_LINE 0,0,0, 0,60,0, 10, RGB(255,0,0)
X_POPMATRIX

X_ROTATION -60, 1, 0, 0
  X_PUSHMATRIX
  X_LINE 0,0,0, 0,60,0, 10, RGB(255,0,0)
X_POPMATRIX

SHOWSCREEN
WEND


#20

Just as a remainder.
in iPhoneGetDocumentsPath(), variables should be released.