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

Pages: 1 ... 17 18 [19] 20 21
Thanks guys,
with your changes the performance has boosted  =D

I suspect drawing the circle is the cause - comment it out for a while and see.  If it is, I would suggest using a sprite for that.

I got now the expected frame rate (nearly 60fps) The DrawCircle function was the botleneck. might be calling MOUSESTATE too many times, these are only needed once in the main loop.

I undestand MOUSESTATE should only call once in the main loop (but is correct to loop trought the entire Mouse matrix) correct me if I?m wrong.

Furthermore, SETACTIVEMOUSE should only be needed once per run, and not looped.

I?m not getting this.
If I have several on screen buttons, they could be pressed at the same time.
So, is not correct to store each iteration all the different mouses positions like this way?
How should I assign the mouses values?

Code: (glbasic) [Select]
FOR imouse% = 0 TO nummouse%-1
MOUSESTATE mx%, my%, b1%, b2%

Great, I will change this.
But what do you believe about performance?
This change won?t give me 20 fps more and I?m just moving one sprite...

where?s the problem with the performance??
Anyone has a good frame rate in landscape mode on the iphone? any tips?


I?m just trying some little demos on landscape mode on the iphone and I?m having very bad fps.

I?m just testing some on screen touch controls ideas using rotosprite for showing one moving 32x32 png.
The frame rate is stacked at 17fps without moving the object. Why is so slow??
I?ve tried also with smoothshading on and off, without any fps changes.

Another problem, not related, I?m implementing control movements calculating a vector inside a touchable area (the big circle area), I cannot get the vector from center of the big circle to the touched region inside the circle. This is working on Windows but is not working on Iphone.
Maybe the landscape mode is not working properly?

I?m attaching the project,  in case anyone could help me will be apreciated.

[attachment deleted by admin]

Finally solved it reorganizing the folders structure and changing the paths.

I thought, glbasic starts searching directly on the media folder, but had to explicitly force the path, like this way, "Media/file.dat".
It seems I misunderstood how to use the new glbasic .app estructure..., but is rare, was working fine on Windows.
Just for info, I?m not using the setcurrentdir method.

Maybe the default path behaviour is different trough this platforms?

Yes, it exists.

Could be maybe something related with permisions?
I will try to debug it harder today.

Trucidare, I understand that for writing, but I?m jus trying to read a binary .dat file inside the Media folder.

Hi mates,

I have problems while trying to read a binary .dat file.
I use    OPENFILE(1,"file.dat",1) and read it later with READUWORD 1,value.

I don?t have any problems on a Windows machine but on an Iphone there?s a segmentation fault.
I?ve checked several times that the file has the correct path and is located on the media folder of the project.
Other files, like sprites load correctly.

Using the debugger I?ve found this line:

<notice> request: fopen ("file.dat", "rb") failed
<notice> shut down GLB

Any clue??


Many thanks mates.

I was not understanding correctly how it works.

Now is solved.  =D


Of course, mates.

Code: (glbasic) [Select]
SETSCREEN 512,384,0

GOSUB main

MOUSESTATE mx, my, b1, b2
PRINT "<=", mx, my

SUB main:
WHILE TRUE // Endless loop


Sorry, can you explain it a bit? I dont catch you.

If you are refering to setmouse, Im not using it in the code...

GLBasic - en / Hijacked mouse in windowed apps
« on: 2009-Jul-13 »

I?m programming a little app for windows platforms.
I?m using a 512x384 res.

When I?m executing the app, the mouse cannot leave the game window borders.
I?ve checked my code and I?m not drawing the mouse in any weird way.

is this the usual behaviour in windowed applications or am I missing something?

GLBasic - en / Re: Problems writing to Wiz
« on: 2009-Jul-08 »

The problem is totally solved.
You just shall never use GETLINE or PUTLINE and all works fine on the Wiz.



That?s what I needed.
You know, altought now is very common to find glx support enabled in new distributions, is not still a default option.
This way is easy to distribute. :)

IDE/Syntax / Re: Extend header files
« on: 2009-Jul-06 »

As long as I know needing to add a blank file at the end of the file is still unpatched.

GLBasic - en / Re: Problems writing to Wiz
« on: 2009-Jul-05 »

As I asume from your example, maybe the trick part is reading without using GETLINE...

Gonna check it.

Pages: 1 ... 17 18 [19] 20 21