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

Messages - mangoo

#16
Soooo


selbst mit Systempointer FALSE kommt der Fehler:


Hier ein Beispielprogramm.


Ein Rechteck wird immer an der Mouseposition angezeigt. wenn man nach oben ( zur Kamera ) hingeht
kommt irgendwann als x immer 65 und der rest 0, bei allen mäusen

geht man mit dem finger dann ohne abzusetzen zurück ändert sich nix

Der Fehler tritt nur in 95% der Fälle auf, unten tritt er nie auf. Man kann auch aus dem Rand oben raus und über einen anderen Rand wieder rein, dann funktioniert es wieder.


Code (glbasic) Select


GLOBAL mx,my,mb1,mb2
SYSTEMPOINTER FALSE


WHILE NOT KEY(01)
CLEARSCREEN RGB(0,0,0)

FOR i = 0 TO GETMOUSECOUNT()-1
LOCAL tx,ty,tb1,tb2
SETACTIVEMOUSE i
MOUSESTATE tx,ty,tb1,tb2

PRINT tx + " " + ty + " " + tb1,0,i*15

IF tb1
mx = tx
my = ty
ENDIF
NEXT


DRAWRECT mx,my,100,100,RGB(255,0,0)
SHOWSCREEN

WEND
#17
hi,

habe bei meinem iphone spiel das problem, dass wenn der finger ausm bild ist, also man z.b. den finger zu weit über den bildschirm streicht und über den rand rausgeht, dass dann wenn der finger zurückgeht (ohne abzuheben), dieser nicht mehr erkannt wird.

erst wenn ich den finger abhebe und aufsetze geht es wieder.

ich erinner mich daran dass hier schon mal was ähnliches gepostet wurde, finde es aber leider nicht mehr.
kann mir da wer aushelfen?

heute abend werde ich auch ein beispiel posten können.


Gruß
mangoo
#18
Hallo,

mir ist gerade ein MouseState Fehler aufgefallen auf dem Iphone bei Verwendung von einer

höheren Auflösung 960x620 bzw 620x960.

Die x und y Koordinaten der Maus (bzw. des Fingers) werden nicht richtig berechnet: Hilfslösung(en) habe ich unten angefügt.

Auf Dauer wärs natürlich klasse wenn es richtig berechnet wird :-)


Hier ein Beispiel

Code (glbasic) Select


GLOBAL mx,my,mb,mb2
WHILE NOT KEY(01)
MOUSESTATE mx,my,mb,mb2

CLEARSCREEN RGB(0,0,0)

DRAWRECT mx-20,my-20,40,40,RGB(255,255,255)
SHOWSCREEN
WEND
END


Die Zwischenlösung bei mir ist jetzt:

Horizontal: 960x640
Code (glbasic) Select

MOUSESTATE mx,my,mb,mb2
my = -640 + my*2
mx = mx*2


Vertikal:
Code (glbasic) Select

MOUSESTATE mx,my,mb,mb2
my = my*2
mx = mx*2
#19
Hi,


thanks for your hard work gernot :-)

I got some compile errors while it worked well for WIN32. IT cant find some files inside a subdirectory ( .h files )

For WIN32 it works fine, also for IPHONE,i only get the errors for WebOS

WIN32:
Code (glbasic) Select

_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.7.826 SN:b7faa967 - 3D, NET
Wordcount:2173 commands
compiling:

linking:
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 17.3 sek. Zeit: 18:20
Erstellen: 1 erfolgreich.



WEBOS:

Code (glbasic) Select

_______________________________________
*** Configuration: WEBOS ***
precompiling:
GPC - GLBasic Precompiler V.7.826 SN:b7faa967 - 3D, NET
Wordcount:2169 commands
compile+link:
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:497:33: error: extern/xml/XMJcalls.h: No such file or directory
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:499:38: error: extern/xml/JPR_GetNxtLne.h: No such file or directory
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:501:40: error: extern/xml/JPR_GetNxtLne.cpp: No such file or directory
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:503:35: error: extern/xml/XMJ_rSrc.cpp: No such file or directory
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:505:35: error: extern/xml/XMJ_sNew.cpp: No such file or directory
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:507:35: error: extern/xml/XMJ_tDel.cpp: No such file or directory
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function '__GLBASIC__::DGStr __GLBASIC__::XMJ_GetVersion_Str()':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:549: error: 'XMJ_getVersion' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function '__GLBASIC__::DGStr __GLBASIC__::XMJ_GetDate_Str()':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:610: error: 'XMJ_getDate' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function '__GLBASIC__::DGStr __GLBASIC__::XMJ_GetLastError_Str()':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:671: error: 'XMJ_getLastError' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_ReadFile(__GLBASIC__::DGStr, __GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:715: error: 'XMJ_readFile' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_GetFirstGroup(__GLBASIC__::DGStr, DGNat)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:744: error: 'XMJ_getFrstGroup' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_GetLastGroup(__GLBASIC__::DGStr, DGNat)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:773: error: 'XMJ_getLastGroup' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_GetNextGroup(__GLBASIC__::DGStr, DGNat)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:802: error: 'XMJ_getNextGroup' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function '__GLBASIC__::DGStr __GLBASIC__::XMJ_GetAttribute_Str(__GLBASIC__::DGStr, __GLBASIC__::DGStr&)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:846: error: 'XMJ_getAttribute' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_Reset()':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:892: error: 'XMJ_reset' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_NewFile(__GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:920: error: 'XMJ_newFile' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_NewGroup(__GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:948: error: 'XMJ_newGroup' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_PutGroup(__GLBASIC__::DGStr, __GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:977: error: 'XMJ_putGroup' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_GroupPutValue(__GLBASIC__::DGStr, __GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1006: error: 'XMJ_newGrpPutVal' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_PokeNewGroupPutValue(__GLBASIC__::DGStr, __GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1035: error: 'XMJ_pokeNewGrpPutVal' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_NewAttribute(__GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1063: error: 'XMJ_newAttribute' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_PutAttribute(__GLBASIC__::DGStr, __GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1092: error: 'XMJ_putAttribute' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_NewAttributePutValue(__GLBASIC__::DGStr, __GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1121: error: 'XMJ_newAttPutVal' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_WriteFile(__GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1149: error: 'XMJ_writeFile' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_NewComment(__GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1177: error: 'XMJ_newComment' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_DeleteGroup(__GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1205: error: 'XMJ_delGroup' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_DeleteAttribute(__GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1233: error: 'XMJ_delAttribute' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_DeleteComment(__GLBASIC__::DGStr)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1261: error: 'XMJ_delComment' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_NewStream(__GLBASIC__::DGStr, DGNat)':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1290: error: 'XMJ_newStream' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function '__GLBASIC__::DGStr __GLBASIC__::XMJ_GetStream_Str()':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1333: error: 'XMJ_getStream' was not declared in this scope
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp: In function 'DGNat __GLBASIC__::XMJ_DeProfundis()':
C:\Users\alex\AppData\Local\Temp\glbasic\gpc_tempb.cpp:1376: error: 'XMJ_deProfundis' was not declared in this scope
*** FATAL ERROR - Bitte die Compiler-Ausgabe ins Forum kopieren
_______________________________________
*** Fertig ***
Dauer: 11.8 sek. Zeit: 18:23
Erstellen: 0 erfolgreich.
*** 1 FEHLGESCHLAGEN ***




I just use normal c includes:


extern/xml/XML.gbas
Code (glbasic) Select

#include "extern/xml/XMJcalls.h"
#include "extern/xml/JPR_GetNxtLne.h"
#include "extern/xml/JPR_GetNxtLne.cpp"
#include "extern/xml/XMJ_rSrc.cpp"
#include "extern/xml/XMJ_sNew.cpp"
#include "extern/xml/XMJ_tDel.cpp"


And the extern/xml/ folder exists and contains all necessary files

C:....\GLBasic\siasola\extern\xml\


I also tried to move the files to other directories like  extern\  and siasola\  and changed the includees but it didnt help.

Any idea?
#20
Bug Reports / 3d iphone bugs
2011-Jan-31
Hi,

ich habe Probleme bei 3d funktionalitäten fürs iphone

1.) shader funktionieren nicht aufm iphone, können nie geladen werden, werder auf dem 3g,3gs noch auf meinem ipod touch 4.    hatte dazu einige alte threads gefunden in denen gesagt wurde dass shader support kein problem ist und eingebaut wird? sind die eingebaut worden?


2.) einige 3d funktionen tun es nicht

X_SCREEN2WORLD

aufm pc klappts perfekt, aufm iphone nicht: siehe screenshot

auch verstehe ich nicht den 3ten parameter.  mouseX,mouseY,mouseZ?  , x,y,z
hatte angenommen dass es vlt der abstand ist, aber es sind nur werte zwischen 0 und 1 erlaubt (znear zfar?)
jedenfalls klappt es nicht aufm iphone damit bei mir

X_DRAWAXES

sieht man keine achsen aufm iphone (siehe screenshot)


http://cid.stw-bonn.de/ftp/dev/pc.jpg


http://cid.stw-bonn.de/ftp/dev/iphone.png

#21
Hi,


thanks for your hint.

I think you are totally right. We will fix it with the next sia sola update.

Regards
Alex
#22
Tools / Re: Bada
2011-Jan-11
Hi,

i just want to let you know that i bought the  Wave II with an installed Bada 1.2 OS. 

So if i can test anything or try anything, just let me know.


The market doesnt have many apps so far, (about 500 games) so it would be good for us to get an available bada port fast :-)

Regards
Alex
#23
Sia Sola        -  http://itunes.apple.com/us/app/sia-sola/id408246448?mt=8
Sia Sola Lite -  http://itunes.apple.com/us/app/sia-sola-lite/id411278957?mt=8

Genre: Puzzle

50 ancient Egyptian temples... Resolve their curse! Red and green need to change positions, but up to eight grey guards block their way. Each step you take is answered by the step of a guard – you're caught within a labyrinth of moving walls!


Sia Sola is a sliding block puzzle game with a novel and dynamical moving rule. You may move a stone if its way is blocked by a single guard only. But this causes the guard you've passed to swap its position, too. Hence, the labyrinth changed its shape! If you finally managed to interchange the position of the two big stones, you're done. Can you do it with a minimum number of steps?

The full game contains more than 50 levels of increasing difficulty. To get you into the game, a tutorial is included. While the first levels are introductory ones, most of the levels need some clues to be solved – and the last ones are really tricky! Yet there is a tale of secret levels to unlock, barely solvable by a mortal mind... May Sia, Egyptian goddess of cleverness, guide you through this challenging puzzle!



#24
Ok klasse, das mach ich dann so.

Wie ist das denn mit dem Typ int in c++,  sind das immer 4 Bytes?
Auf Iphone, Windows Mobile ....

Wenn nein, wie kann ich das sicherstellen?
#25
Hm bei mir klappt das Beispiel ohne Probleme, ka was es noch sein könnte. Hast du die Premium Version? Also glbasic gekauft? In der kostenlosen ist ja irgenwas beschränkt mit NET Funktionen.
#26
Hallo,

habe jetzt erst seit einigen Tagen glbasic und bin bisher super zufrieden.
Vorher hab ich lange Zeit mit C# programmiert und bin auf glbasic wegen Iphone und Windows Mobile Support gekommen.

Bisher komm ich auch gut klar, jetzt hab ich allerdings eine Frage:

Ich habe in C# einen TCP/IP Server programmiert, die Übertragung erfolgt byte basiert und pro Nachricht schicke ich immer die Länge der Nachricht als Integer, mit einem Byte Array als Daten

int length;
byte[] data;

in diesem byte[] sind jetzt verschiedene Datentypen, wie unsigned int, long, short, byte ........

Das auslesen erfolgt dann so in C#

Code (glbasic) Select
       
protected override bool deserialize()
        {
            PlayerIndex = BinaryReader.ReadByte();
            Time = BinaryReader.ReadInt32();
            Actions = BinaryReader.ReadInt16();
            return true;
        }



Mein Problem ist jetzt, ich weiss nicht wie ich das hier einfach in glbasic umsetzen kann.
Ich hab in den Forenbeiträgen gelesen, dass man einen String mit SOCK_RECV bekommt, dieser aber zum Glück einfach nur ein byte array ist. Soweit so gut, damit komm ich klar.

Jetzt muss ich allerdings in glbasic die entsprechenden byte arrays auswerten und aufstückeln.

Für File auslesen gibt es ja was tolles:

READBYTE, READLONG .......

Aber eben nur für File Operation oder lieg ich da falsch?

Genauso muss ich auch meine Werte wieder in den Socket schreiben.

WRITEBYTE ......


Wie mach ich das jetzt hier am schlausten? Muss ich dafür Inline C Code verwenden?
Ich will vermeiden die Nachricht in eine temporäre Datei zu schreiben und diese dann mit den bequemen READ Funktionen auszulesen bzw zu beschreiben, das wäre doch ein bisschne unprofessionell und langsam :-)


Kann mir da wer helfen?
#27
Tools / Re: Bada
2010-Oct-15
The emulator is included in the BADA SDK (using an Eclipse IDE) and i heard that it should also run from Visual Studio.

So what i believe is that its just a command line tool and can be used without a spefic IDE.

I ll have a try on it later on.
#28
Tools / Bada
2010-Oct-15
Hi,

what about support for Samsung's new Mobilephone platform "BADA"
Although the platform is very new, SAMSUNG did a great job so far (having a great C++ API)

As its using C++ its maybe not too difficult to support it in glbasic?

I would really appreciate it :-)

http://de.wikipedia.org/wiki/Bada_%28Betriebssystem%29