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

#1
GLBScript (now called 123basic)

Hey!

I proudly present the first video preview of the new GLBasic to HTML5 compiler, GLBScript! The compiler is fully self hosting
and works awesome. The compiler produces high quality JavaScript code which runs amazingly fast! Surprisingly
the JavaScript compiler runs even faster than the native GLBasic compiler, isn't that great?

Further I want to say, that EVERY GLBasic syntax element is now fully working. PROTOTYPEs, "FUNCTION in TYPEs",
CALLBACK or even GOTO is doing its job wonderfull!

History!
2 years ago, I wrote the first post about GLBScript (formerly GLScriptBasic) in the german forum
http://www.glbasic.com/forum/index.php?topic=4524.0. Originally it was just considered as a scripting language
for GLBasic with the exact syntax of GLBasic. Development was rapid and with no minor problems. UNTIL there
was a bug - I call it "THE BUG". This little bastard stopped the whole development. I spent hours or hours
hunting the bug... But after two weeks I gave up and suspended development of GLScriptBasic...
One year passed and finally I got myself together and started working on "GLBScript". This time there
was no big surprise... I knew what went wrong and how to avoid this again. So I programmed until september.
I had a lot of syntax elements of GLBasic running in GLBScript and it was quite usable. ALIAS and BYREF
were implemented and some extra goodies! But then school started...

Development slowed down a lot. I had only 5 hours a week time for GLBScript. But i didn't give up and continued
steadily. I tried to make the compiler self hosting (compiles its own source code), which was a hard taks to achieve.
Finally in the end of march I've implemented enough functions and fixed bugs to get this working. I was really happy about this,
because this meant the compiler is stable, fast and the features are also working together. Then easter holidays began and I
was very procuctive... I've implemented the last missing syntax element - goto and I have also reprogrammed the whole filesystem
API. After easter holidays I just started to port some of the included samples of GLBasic... during that I fixed a lot of bugs.


GOTO!
Yep! I've managed to get this beast working in JavaScript and it's quite stable. To get this monster working
in JavaScript I had to reimplement all flow control structures (IF, WHILE, FOR, FOREACH, REPEAT, ...) in a
more machine code like structure. Of course as soon as you use a single GOTO in a scope the whole scope gets
transformed into this, but I think that's quite reasonable.

Filesystem!
The next monster I had to kill was the low level filesystem API of GLBasic. The main problem is, in HTML5
there is no filesystem alike API available (except for Google Chrome, but this was no choice, because I want
GLBScript running in every browser!). There is only a Key - Value storage available in every browser. So I
had to implement a beast I call "Virtual File System". It basically wraps the whole Filesystem into an abstract
persistent file storage across every browser. Even old browsers with no "Localstorage API" this works fine (just
representation in JavaScript. When a file gets saved, I simply serialize this into a string and voilá we have
with less available memory), because as a second choice it uses cookies to save the data. Quite flexible i think!

So all Filesystem functions are available (WRITE... READ... INI... and many more)

I've also ported ALL String and Math functions to JavaScript. And of course a lot of minor problems were fixed (see changelog).
I also spent some time on improving the 2D engine of GLBScript. It is fully capable of converting the "Blocks", "Arkanoid", "FourInARow",
"Pong" and "JumpFrog" samples to HTML5 with literally no changes in the source code (except the GLB_ON_LOOP modification)


Self hosting!
As already mentioned, the compiler is fully self hosting. That means it is capable of compiling itself and produce executable
JavaScript within JavaScript

So what's the goal of this?
- It's a good self test whether the compiler compiles accurate code. Compiling a compiler is not a trivial task.
- EVAL() would be a possible function, and maybe I will include it.
- Online development enviroment is possible. Developing your GLBasic Apps on the web. I already started a simple online IDE!

One thing I want to mention is, that suprisingly the JavaScript compiler compiles _faster_ than the native one. I have no idea why,
but I am quite happy about this.


Improved Debugging!
If an error occurs you see the current line of execution, a detailed stacktrace and of course the error message. The whole API does a lot more
saftey checks. You are able to get the current stacktrace in GLBasic with the new command "STACKTRACE$".

Google Closure is also used. In release mode Closure optimizes and minimizes the output code and in debug mode it cleans the code and indents. Google Closure is
a really nice tool and it's quite lightweight!

Inheritance!
Yeah that's right! GLBScript supports inheritance and ABSTRACT methods. That means you can program in basic OOP. But I want to keep it simple and not too overloaded.
Implementing this feature was not that difficult. But of course I had to reimplement FUNCTION in types to get "late binding" working.

Automatic media management!
As you know, audio is a pain when trying to be cross platform... Of course in HTML5 it's the same problem. Different browsers support different sound formats. So I wrote an automatic converter for this issue. It takes your audio file and converts it automatically into .ogg and .mp3 files. You have to do nothing as a programmer. GLBScript takes care and converts - a pretty handy feature I think. For converting to mp3 I use LAME and for .ogg SOX.

Videos!
Programming a little game:
Part1
Part2
Deep look into the compiler itself!

Demos!
Debug mode is on in every demo, so it's probably a little slow. But at the moment it just matters THAT it works...
My programming philsophy is "First make it run, then make it run fast".

Self hosting compiler (wait a few seconds until it has compiled itself. After waiting you see the code of GLBScript in
JavaScript. This was compiled a few weeks ago so the actual code of the compiler looks different!
Arkanoid sample
Blocks sample
FourInARow sample
JumpFrog sample
Memory sample
OneMore sample
Pong sample
SPRCOLL Test
XML reader

BIG Changelog:
Code (glbasic) Select
Fixed: FOR had strange behaviour in recursion
Fixed: "FOR i = 0 TO 0" executes correctly
Fixed: "4 - 5 + 6" or "TRUE OR FALSE AND FALSE" do not throw a syntax error
Fixed: i% = 4; STDOUT i% works (the %)
Fixed: Line numbering is now (almost) correct
Fixed: (multidimensional) arrays are more robust
Fixed: Type cloning works with references properly (JavaScript)
Fixed: floats like ".5" implemented
Fixed: Some problems with references fixed
Fixed: Uninitialized arrays have now correct default values
Fixed: TRY - CATCH works in GOTO scope properly
Fixed: "GETTIMERALL" returns milliseconds since page loaded instead of unix timestamp
Fixed: "NOT" returned a boolean instead of an integer
Fixed: GETFILELIST: uses the filter$ parameter
Fixed: Hex values fixed
Fixed: RGB returned incorrect number
Fixed: Now the compiler seperates the generated html file from the javascript file (one big JavaScript file vs. one small html file). So it's easier to distribute your program.
Fixed: 2D uses context.save() and context.restore()
Fixed: Unexpected "gotocounter exception" fixed.
Fixed: Unnecessary unref(), tryClone() and CAST2INT()/CAST2FLOAT() calls are removed, in the generated JavaScript file. => Execution is faster
Fixed: Compiler error messages display correct line number, path and character where the error happened
Fixed: KEY uses GLB Scancodes
Fixed: REPLACE$ works as expected (uses own implementation instead of the native JavaScript one)
Fixed: Some safety checks in the file API
Fixed: Codefolding is supported properly
Fixed: Array position screwed up in 3 or 4 dimensional arrays...
Fixed: Wrong dereferencing when calling a NATIVE function
Fixed: CONSTANT with multiple identifiers (CONSTANT IS_A = 0, IS_B = 1, IS_C = 2)
Fixed: Width and Height from the .gbap file
Fixed: Sound in Opera and IE
Fixed: RGB returned sometimes wrong value
Fixed: SETTRANSPARENCY: Implementation is a weird hack, please use only if there are no other possibilities
Fixed: STRETCHSPRITE stretches the sprite properly
Fixed: Wrong behaviour when performing "IF" with floats
Fixed: STRETCHSPRITE with width = 0 or height = 0 does not crash Firefox anymore
Fixed: Implicit defintion of arrays if there is a []
Fixed: No infinite loop while trying to load a non existing image or sound
Fixed: Array access optimized.
Fixed: Preprocessor screwed around with ?ELSE...
Fixed: \f in strings are not compiled into \n anymore
Fixed: CAST2INT() cuts decimals correctly
Fixed: Numbers beginning with 0 does not throw a syntax error anymore (040 for example)
Fixed: STARTDATA data:\n DATA functCall()\n ENDDATA <- Works now with function calls
Fixed: RND should work as expected
Fixed: CALLBYNAME("10") throws no syntax error when executed...
Fixed: Touch support for Android
Fixed: No context menu on right click onto the canvas
Fixed: Callbacks and function in types are functioning together
Fixed: MOUSEAXIS with mouse wheel support!

Added: FOREACH with multidimensional arrays
Added: ?BLACKLIST "file" - For Blacklisting Files/Folders (are not included in the final .html file), "?BLACKLIST ALL" blacklists all files => no file is included!
Added: "_" symbol for ignoring the newline token
Added: BOUNDS(array, dimension)
Added: Fully functional GOTO - still needs some debugging
Added: "GOTO on demand" overhead reduction: goto overhead (a big switch - case monster) is only inserted when it's really necessary
Added: "Virtual File System" Engine: Flexible managing of your (persistent and non persistent) data in a nice filesystem like enviroment.
Added: MIN/MAX
Added: DEBUG
Added: ASSERT
Added: ABS
Added: SWAP
Added: SGN
Added: SIN
Added: COS
Added: TAN
Added: ASIN
Added: ACOS
Added: ATAN
Added: ASL
Added: ASR
Added: bOR
Added: bXOR
Added: bAND
Added: bNOT
Added: FMOD
Added: LOGN
Added: POW
Added: SQR
Added: STDERR (calls STDOUT with "Error: " prefix)
Added: CALLBYNAME
Added: SORTARRAY
Added: ADDRESSOF
Added: PLATFORMINFO$
Added: STDCOLOR*
Added: END
Added: GETTIMER
Added: LIMITFPS
Added: GETLASTERROR*
Added: SHELLCMD (executes javascript - eval)
Added: SLEEP
Added: SHELLEND (calls SHELLCMD and END)
Added: LCASE$
Added: UCASE$
Added: DECRYPT$/ENCRYPT$: does not use blowfish...
Added: SETCURRENTDIR
Added: FILESEEK
Added: FILEPOSITION
Added: READSTR
Added: READBYTE
Added: READLONG
Added: READULONG
Added: READWORD
Added: READUWORD
Added: READSHORTIEEE
Added: READIEEE
Added: WRITEBYTE
Added: WRITEUBYTE
Added: WRITEWORD
Added: WRITEUWORD
Added: WRITELONG
Added: WRITEULONG
Added: WRITEIEEE
Added: WRITESHORTIEEE
Added: KILLFILE
Added: GETCURRENTDIR$
Added: DOESFILEEXIST
Added: DOESDIREXIST
Added: GETFILESIZE
Added: COPYFILE
Added: CREATEDIR
Added: FILEREQUEST$*
Added: PUTENV (just a key - value storage)
Added: GETENV
Added: FORCEFEEDBACK (basic support, api is not very flexible...)
Added: SETSHOEBOX*
Added: GETCOMMANDLINE (returns the url parameter)
Added: INIOPEN
Added: INIPUT
Added: INIGET$
Added: SPLITSTR
Added: URLENCODE
Added: URLDECODE
Added: NETWEBEND
Added: PUSHLOOP loop$ (new command: pushes a new Renderloop onto the stack)
Added: POPLOOP (new command: pops the last renderloop from the stack)
Added: GETCURRENTLOOP$ (new command: returns the current name of the renderloop)
Added: RETURNTOLOOP: loop$ (new command: "walks" through the loopstack until it gets to the given loopname)
Added: ANYKEY: (new command: instead of KEYWAIT, returns true if a key is pressed if not it returns false)
Added: USEASBMP
Added: LOADBMP
Added: Google Closure compatibility (compilation_level = ADVANCED_OPTIMIZATIONS): Now the JavaScript code is perfectly optimized by Google Closure (a wonderful JavaScript Optimizer) It optimizes the file size but the code gets a little slower...
Added: Useful debug information (if a error occurs) in debugmode: Stacktrace (prints the complete function call history and its parameters) and the current line of execution
Added: ?OPTIMIZE NONE | SIMPLE | AGGRESSIVE - How much should be optimized? None does nothing, Simple does very little optimzation and aggressive does nearly everything (problem with aggressive is, that it runs sometimes slower than the other techniques)
Added: Implicit variable declaration (Use variables without their declaration)
Added: STACKTRACE$ (new command: returns the current stacktrace in debug mode)
Added: LOADSOUND
Added: PLAYSOUND
Added: SOUNDPLAYING
Added: HUSH
Added: Automatic audio converting to the common HTML5 audio formats (.mp3 and .ogg) - A very handy feature!
Added: ALPHAMODE
Added: SEEDRND
Added: Improved lexing speed: Uses now Hashmaps (In future I will rewrite the "identifier search engine" to use hashmaps, at the moment the native GLB arrays are used for this...)
Added: GRABSPRITE
Added: "Compile to HTML5" macro for GLBasic IDE - compile to HTML5 easily from the IDE.
Added: GOTO checks are now performed: You are only able to jump to defined labels.
Added: IIF(condition%, onTrue%, onFalse%)
Added: GLB_ON_LOADING: As long as GLBScript is loading data, this sub is callen... to check whether a sprite is loaded or not, use GETSPRITESIZE!
Added: SPRCOLL
Added: GETMOUSECOUNT (mult touch support, need some bugfixing on Android/iOS...)
Added: SETACTIVEMOUSE
Added: Experimental inheritance feature, FUNCTION in types reprogrammed...
Added: Experimental ABSTRACT feature

* This function is just a dummy, because it is not possible to implement this feature and/or it's not worth it.


Download!
Not yet available... but soon you are able to test it on your own!

Future goals!
- Optimize compiler speed (At the moment the compiler is really slow...)
- Implement missing functions!
- Bug fixing!
- Fix all TODOs in code
- Compile every 2D game and execute it properly (after the GLB_ON_LOOP change)
- Get 3D commands working and implement a WebGL driver (that will take a lot of work...)
#2
Hey Leute!

Da ich in letzter Zeit wieder etwas mehr in GLB programmiere sind mir ein paar Problemchen aufgetreten:
1) PROTOTYPE mit Strings funktioniert nicht.
2) SELECT Seiteneffekte (SELECT Foo() CASE 0: CASE 1: ENDSELECT => Foo() wird zwei mal aufgerufen. Dies kann unerwartete Seiteneffekte hervorrufen. Vor allem wenn man so Konstrukte hat wie "SELECT GetNextToken$(); CASE "FUNCTION"; ... CASE "SUB"; ... ENDSELECT" :P
3) SELECT Mehrfachmöglichkeiten für Strings "SELECT GetCurrent$(); CASE "FUNCTION", "SUB", "METHOD"; ENDSELECT" wäre eine sehr große Erleichterung
4) Öffnende und schließende Klammer hervorheben, da wo der Cursor ist in der GLB IDE. Es gibt zwar einen Menüpunkt hierfür, allerdings wäre es praktischer, wenn dies automatisch passiert.
5) Makros auskommentieren bringt nichts //?DEFINE BLABLA definiert trotzdem "BLABLA"
6) LOCAL var AS blublali = CreateBlubali() //keine Syntaxfehler und auch keine C++ Errors, aber CreateBlubali() wird nicht auferufen.
7) SUB kann mit ENDFUNCTION geschlossen werden und umgekehrt (nur ein Schönheitsfehler)
8) CODEFILE$() gibt File.gbas.gbas zurück
9) Wenn man die GLB IDE unter Wine startet, werden keine Konsolenanwendungen gestartet (Man muss diese manuell in der Kommandozeile starten)
10) Außerdem funktioniert unter Wine "Multiplatform Erstellen" nicht ("Veraltete Platform")
11) Eine Funktion namens "Gehe zu Zeile" wäre sehr nützlich (vor allem wenn man viel mit CODELINE() arbeitet)
12) Eine Funktion namenx "X_LOOKAT x, y, z" wäre sehr nützlich. Diese setzt die Rotation der aktuellen Bewegungsmatrix in Richtung x,y,z. Falls du diese nicht direkt in die Sprache implementieren willst, könntest du eine FUNCTION zeigen, die das macht (biin nämlich zu blöd dafür :/)
13) Der Debugger stürzt unter Wine mit der Meldung "Unhandled Exception" ab. Dies passiert mit einer Konsolenanwendung nicht.

Es kann sein, dass einige Fehler bereits bugfixed worden sind, kann mir leider nicht das V10 Update laden, weil hier das Internet in Kroatien zu langsam für ist :/


MfG
#3
GLBasic - de / GLScriptBasic
2010-May-11
Da man irgendwie keine Blogs/Worklogs/whatever erstellen kann, erstelle ich hier nun einen Thread. Es soll quasi ein Worklog sein.

Nunja was ist GLScriptBasic? GLSB soll die gleiche Syntax wie GLB haben, also auch gleiche Funktionen und so. Der einzige Unterschied ist halt dass das ganze direkt interpretiert wird, also ohne C++/C Code Erzeugung. Dadurch kann man mehr Platformen unterstützen usw.

Die Vorteile wären:
* Sehr schnelles Kompilieren: Da hier kein komplizierter Code erzeugt wird sondern simpler Zwischencode (Bytecode)
* Jede beliebige Platform: Anders als fürs normale GLBasic muss es für die Zielplatform keinen gcc geben oder dergleichen, sie muss ledliglich eine Turing Vollständige Sprache haben (was JEDE Platform hat). Da man ja "nur" eine VM schreiben muss Ich hab so Visionen von GLSB für Handys usw.
* Einfache Erweiterbarkeit: Der Code wird im Gegensatz zu GLBasic frei ersichtlich sein, womit jeder der etwas davon versteht den Code erweitern kann
* Verwendung von GLBasic als Scriptsprache: Wer kennt es nicht? Man will ein MMORPG/Strategiespiel/anderes Mega Projekt programmieren und hat keine vernünftige Möglichkeit den Spielinhalt auszulagern, damit ist nun Schluss.

Die Nachteile:
* Langsamere Laufzeit: Da der Code interpretiert wird gibt es einen entsprechenden Overhead
* Nicht alle Syntaxelemente umsetzbar: Höchstwahrscheinlich werde ich auf PROTOTYPE und CALLBACK verzichten, da diese zu implementieren ein sehr hoher Aufwand darstellt. Vorallem Inline C++ ist vollkommen unmöglich.
* Keine iPhone Version: Da Apple strikt gegen solche "Interpretierte" Sprachen ist wird es keine iPhone Version geben.

Da es mehr Vorteile als Nachteile gibt, finde ich dass es sich lohnt.

Folgende Dinge funktionieren bereits:
IF - ELSE - ELSEIF - ENDIF
WHILE - WEND
FOR - NEXT
REPEAT - UNTIL
LOCAL - GLOBAL

ToDo (nach der Reihenfolge):
SELECT - CASE - DEFAULT - ENDSELECT
Funktionen und Subs (sind im Prinzip dasselbe)
Arrays
Alle Funktionen "wrappen", damit man *fast* jeden GLBasic Code auführen kann.

Technik: GLSB ist intern ein single pass Compiler, das heißt er arbeitet den Code in einem Durchgang durch. Dadurch ist er besonders schnell. Implementiert wurde er als Rekursiver Top Down Parser, dieser ist eine sehr stabile und auch leicht wartbare Compilerbau Variante.

OpCodes gibt es bereits 25. Von Rechnen bis hin zur Variablen Verwaltung ist alles dabei.

Wie das mit der Lizenz aussehen wird, werde ich mit Gernot weiter besprechen, wir haben da bereits eine Idee.

Folgende Codes werden bereits ohne Fehler kompiliert und ausgeführt:

Standard Syntax:
Code (glbasic) Select
STDOUT " Hallo "+5

IF 5*9-99
STDOUT 1*4 + " Hallo Welt"
ELSEIF TRUE
STDOUT "GAGA"
ELSEIF FALSE
STDOUT "DABA"
ELSE
STDOUT 73
ENDIF
IF TRUE
GLOBAL k=200
STDOUT k
ENDIF
STDOUT k
LOCAL i
LOCAL j

j=800
STDOUT j
i=100
STDOUT "Variable var: "+i

i=0
WHILE i<10
STDOUT "i: "+i
STDOUT "j: "+j
j=j-1
i=i+1
WEND

FOR i=0 TO 10 STEP 2
STDOUT "For: "+i
NEXT


Simples Pong:
Code (glbasic) Select

GLOBAL SpielerX=320, BallX=320, BallY=240,Angle=RND(360), Life

Life=4


WHILE TRUE
DRAWRECT SpielerX,50,80,20,RGB(255,0,0)
IF KEY(205)
SpielerX=SpielerX+4
ENDIF
IF KEY(203)
SpielerX=SpielerX-4
ENDIF
BallX=BallX+COS(Angle)*8
BallY=BallY+SIN(Angle)*8
IF BOXCOLL(SpielerX,50,80,20,BallX,BallY,32,32)
BallX=BallX-COS(Angle)*8
BallY=BallY-SIN(Angle)*8
Angle=360-Angle
ENDIF

IF BallX>640-32 OR BallX<0
Angle=180-Angle
ENDIF
IF BallY>480-32
Angle=360-Angle
ENDIF

IF BallY<0
Life=Life-1
BallX=320
BallY=240
Angle=RND(360)
ENDIF

DRAWRECT BallX,BallY,32,32,RGB(0,255,0)

PRINT "Leben: "+Life,10,450
IF Life<1
END
ENDIF
SHOWSCREEN
WEND


mfg
#4
Hallo,
gibt es eine Alternative zum Befehl "GETPIXEL"? Ich brauche ne M?glichkeit in einem akzeptablen Zeitraum die RGB Werte eines Bildes rauszulesen (Es muss nicht realtime sein, aber doch unter 1Minute). Gibt es in GLBasic sowas wie Pixmaps oder so?

Ich versuche n?mlich dieses Tutorial umzusetzen: http://east-power-soft.de/index.php?menu=blitzbasic_blitzbasic_codes_worms
#5
Hallo Leute,

Heute beim Programmieren ist mir ein Fehler aufgekommen, der f?r mich unerkl?rlich ist. Wenn ich ein CreateScreen Bild "ver?ndere", wird beim aufrufen von SPRCOLL das alte Bild auf Kollision gepr?ft und nicht das Neue.
Beispiel:

Code (glbasic) Select

SYSTEMPOINTER 1

CREATESCREEN 1,1,100,100
//LOADSPRITE "mouse.png",0
CREATESCREEN 0,0,1,1
USESCREEN 0
DRAWRECT 0,0,100,100,RGB(0,255,0)
USESCREEN 1
DRAWRECT 0,0,100,100,RGB(255,0,0)
USESCREEN -1

BLACKSCREEN
WHILE TRUE
MOUSESTATE MX,MY,ML,MR
DRAWSPRITE 1,100,100
DRAWSPRITE 0,MX,MY
IF ML
USESCREEN 1
DRAWRECT MX-100,MY-100,32,32,RGB(255,0,128)
USESCREEN -1
ENDIF
IF SPRCOLL(1,100,100,0,MX,MY)
PRINT "Kollision",10,10
ENDIF

SHOWSCREEN
WEND
#6
Heute als ich GLBasic weiter an meinem Projekt programmieren wollte bekam ich folgende Fehlermeldungen:

_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.7.045 SN:44443ebf - 3D, NET
Wordcount:6 commands
compiling:
cc1plus.exe: C:\DOKUME~1\Coolo\LOKALE~1\Temp\glbasic\gpc_tempg.cpp: Invalid argument
In file included from C:\DOKUME~1\Coolo\LOKALE~1\Temp\glbasic\gpc_temp0.cpp:1:
C:\DOKUME~1\Coolo\LOKALE~1\Temp\glbasic\gpc_temp.h:1:26: C:\DOKUME~1\Coolo\LOKALE~1\Temp\glbasic\gpc_temp_def.h: Invalid argument
C:\DOKUME~1\Coolo\LOKALE~1\Temp\glbasic\gpc_temp.h:6:28: C:\DOKUME~1\Coolo\LOKALE~1\Temp\glbasic\gpc_temp_class.h: Invalid argument
*** FATAL ERROR - Bitte die Compiler-Ausgabe ins Forum kopieren
_______________________________________
*** Fertig ***
Dauer: 6.5 sek. Zeit: 16:51
Erstellen: 0 erfolgreich.
*** 1 FEHLGESCHLAGEN ***

gestern hats noch ohne Probleme funktioniert, au?erdem ist noch anzumerken, dass pl?tzlich eine Projekt Datei besch?digt war, und die einzelnen Files auch zum teils abgeschnitten (was mich sehr ?rgert, da es bei einem sehr weit fortgeschrittenen Projekt passierte).

Hier ein Source wo das auch passiert:
WHILE TRUE



   SHOWSCREEN
WEND


Ach und neuinstallieren hat auch nichts gen?tzt...
#7
Hall?chen,
heute (bzw. gestern...) habe ich versucht mein GLBasic Spiel f?rs iPhone zu kompilieren, doch da passierte etwas sehr suspektes. Erstens hat das Kompilieren ewig gedaurert (So um die 385Sekunden) dann pl?tzlich kommt die Fehlermeldung "MakeApp.exe hat ein Problem festgestellt und muss deshalb beendet werden, Aber die Konsole meint der Kompiliervorgang w?re Erfolgreich beendet worden.

_______________________________________
*** Configuration: IPHONE ***
precompiling:
GPC - GLBasic Precompiler V.7.045 SN:44443ebf - 3D, NET
Wordcount:472 commands
compiling:
arch:
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 384.7 sek. Zeit: 18:09
Erstellen: 1 erfolgreich.


?ffnen kann ich das Projekt in XCode, doch beim Kompilieren gibt es folgende Fehler: http://coolo.kilu.de/files/Error.png

Ach und noch ne Frage: Was sollte ich als Dev Account angeben? Ich hab jetzt die E-Mail Adresse angegeben von meinem Apple Dev Account, aber anscheinend wird das nicht gefunden (Habe es genausowie  in diesem Video gemacht http://www.youtube.com/watch?v=eGdTdmCI34w)

Ich hoffe ihr k?nnt mir helfen.

EDIT: So Problem gel?st, ich darf nicht Simulation anw?hlen sondern muss Device verwenden, jetzt bleibt nur noch die Fehlermeldung, dass er meinen Dev Account nicht kennt...
#8
GLBasic - de / Einige Fragen
2009-Sep-20
Hallo,
ich hab nun eine Woche in GLBasic intensiv programmiert (Mein kleines Jump/n/run ist schon weit fortgeschritten) und dabei sind mir einige Fragen aufgekommen:
1. Wie funktioniert der Debug Modus? Bei mir Kompiliert das Programm ganz normal, dann steht in der Kommandozeile "Starting Injection" und schluss, kein Fenster zu sehen gar nichts. Was mach ich falsch?
2. Gibt es eine M?glichkeit verlustfrei via UDP Daten zu verschicken, bzw. auch was anderes au?er Strings, weil nicht immer muss man ja Text verschicken (Zum sparen der Ressourcen)?
3. Wie sieht es mit der Netzwerk Funktionalit?t am iPod Touch/iPhone/gp2x/WinCE aus? Ist die voll integriert oder gibt es einige M?ngel?
4. Welches Ger?t braucht man um die WInCE Versionen von GLBasic spielen zu k?nnen? Ich brauch n?mlich ein neues Handy und w?rde mir da gerne eins kaufen worafu GLBasic l?uft. Mir schwebt im Moment folgendes vor: http://www.amazon.de/HTC-Diamond-Bluetooth-Smartphone-Branding/dp/B001ULCGY6/ref=sr_1_1?ie=UTF8&s=ce-de&qid=1253358112&sr=8-1. Hab n?mlich mal wo gelesen das irgendeine Handy Marke nicht mit GLBasic zusammenarbeitet.
5. Wenn dieses Handy unterst?tzt wird, wie sieht es denn mit der Kipptechnik aus, kann man die irgendwie auch in Spiele sich zunutze machen?
6. Gibt es auch sowas wie von BlitzMax bekannte "SetAlpha" also das alle Zeichenoperationen (DrawRect, DrawSprite,...) einen speziellen Alpha Wert bekommen? Hab irgendwo mal was probiert hat aber nicht richtig funktioniert.
7. Gibt es eine Funktion die eine Ellipse zeichnet, also sowas wie DrawOval?
8. Wie sieht es mit CocoaTouch am iPhone aus, gibts da schon eine verwertbare Lib (In ScribbleMP scheint ja CocoaTouch verwendet geworden zu sein)
9. Warum kann man in Types keine Untertypes speichern also sowas:
TYPE TAuto
Auto AS TAuto
ENDTYPE

Damit k?nnte man n?mlich super eine Art Event System machen, oder Gegner Formationen, oder ein Zug/Wagon System, wo jeder Wagon eine Message an den hinteren versendet, oder oder oder...
10. Kann die DDGui auch SpinBoxes? Also so eine Art "Lautst?rke" Regler (Damit k?nnte man n?mlich super die Winkel von Gegner bestimmen)
11. W?rde es auch m?glich sein das die DDgui internes Copy/Paste zur verf?gung stellt? Also nicht das vom OS (Damit mans auch auf dem gp2x oder WinCE verwenden kann)
12. Wie siehts mit einer Funktion aus, welche herausfindet ob die Maus innerhalb eines Dialogs von DDgui ist?

Schlussendlich m?chte ich sagen das GLBasic eine geniale Programmiersprache ist, die ich jedem weitermepfehlen w?rde.
#9
Hallo,
ich suche schon seit l?ngerem eine simple Scriptengine f?r GLBasic, habe aber leider keine gefunden :(. Aber leider brauche ich eine sehr dringend f?r mein aktuelles Projekt. Darum frage ich ob sich vllt. jemand dazu bereit erkl?ren w?rde einen Wrapper einer beliebigen Scriptengine zu schreiben. Ob Lua oder JavaScript ist mir pers. egal hauptsache If Abfragen und Schleifen.

Ich bin leider zu bl?d einen Lua Wrapper zu schreiben (Habs schon sehr lange versucht) und frage nun ob das einer von euch machen kann?

English (My English is reeaaly bad :( ):
Could anyone program a Script Engine Wrapper for GLBasic? I searched a long time, but I didn't find anything, so I ask you. It could be Lua or JavaScript as long as it supports If Cases and Loops.  I'm to stupid to code it.

(Ich bin mir nicht sicher wohin ich das hinposten soll, darum habe ich dieses Forum ausgew?hlt da es ja ein quasi ein Feature Request ist)
#10
Hallo Leute,
heute als ich mit der DDGui einen FileDialog erstellen wollte hat es mich sehr gewundert warum der File Dialog keinen Pfad zurpck gibt sondern eine 0?

Liegt der Fehler an mir oder an GLBasic neuste Version?

SETCURRENTDIR("..") // seperate media and binaries?
DDgui_pushdialog(10,10,200,200)
DDgui_file("id_text", "test.bmp", "Graphics|*.bmp;*.png|All files|*.*", 0,0)

BLACKSCREEN
WHILE TRUE
   
   IF DDgui_get("id_text","CLICKED")
      PRINT DDgui_get("id_text","TEXT"),20,20
      SHOWSCREEN
      MOUSEWAIT
   ENDIF
   
   DDgui_show(FALSE)
   SHOWSCREEN
WEND
#11
Tools / NintendoDS?
2009-Jul-13
Can I speak German here?

Also Leute
Ich beobachte GLBasic schon sehr lange, und ?berlege mir schon ernsthaft es zuzulegen (Bis jetzt hab ich nur gutes gelesen - vorallem jetzt mit der kommenden iPhone Unterst?tzung!). Aber eine Sache h?tte ich gerne in GLBasic, welche ich schon in vielen Basic Dialekten gesucht habe. Eine NintendoDS Unterst?tzung, er gibt sogar einen SDL port und C++ Unterst?tzung! http://forum.palib.info/ Legal ist es auch, da man nichts von Nintendo lizensiertes Verwendet. Hier gibts auch noch eine ausf?hrliche Anleitung, die alles beschreibt: http://www.spieleprogrammierer.de/phpBB2/viewtopic.php?t=7724 Wie w?rs damit?