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

#46
Quote from: MrTAToad on 2012-May-11
It might be advisable to (aside from some sort of demo), to release 2D and 3D parts separately.

That way any major problems for the former can be found and dealt with before any work starts on the latter - after all, you wont want to stop anything in order to fix problems...
Yes that's what I'm aiming for.

Changelog
And of course the current changelog since last post:
Code (glbasic) Select
Fixed: GETFILELIST infinite loop under mysterious circumstances...
Fixed: INI parser (for the INI... commands) can handle comments properly.
Fixed: STARTPOLy now with optional parameter and colored polygons (no gradients)
Fixed: Some array speed improvements

Added: EXPORT now with custom name: EXPORT MyAwesomeFunction, "FunnyName" <- generates function called "FunnyName" in JavaScript
Added: Case insensitivity (optional)
Added: Very very very experimental C# target (compiles but does not execute because no library function is ported...) basically it was just a test whether the abstract syntax tree is generic enough...
Added: POLYVECTOR with image tinting (no gradients possible...)


Very experimental C# generator
This was just a test. I wanted to see whether the compiler can also generate valid code for statically typed languages (since they are much stricter in terms of type system) and the test was very successful. In around 5 hours of programming the compiler generated valid C# code (it was bootstrapping itself - I have now GLBScript compiled into C# :D). Of course the code is not runnable because I didn't port the standard library of GLBasic. As i mentioned this is just a test, so I won't port the library, but maybe in future? C# is a much simpler target than JavaScript because it has all the missing features I had to emulate in JavaScript (pointer for BYREF and ALIAS; goto; ...)

Image tinting with POLYVECTOR
HTML5 does not support image tinting per se. There is a wonderful trick to do so (http://www.playmycode.com/blog/2011/06/realtime-image-tinting-on-html5-canvas/)

Gradients with POLYVECTOR does not function, because this technique does not allow this. Soon I will try to find a solution.

Some other minor changes are implemented. For example: optional case insensitivity and a few bugs were also fixed.

bye!
#47
Looks like I'm an intrapersonal thinker... I didn't expect this.

but quite nice quiz
#48
My results are(http://www.ludumdare.com/compo/ludum-dare-23/?action=preview&uid=11847):

#222   Graphics   3.36
#232   Fun   3.18
#252   Mood   3.00
#308   Overall   3.18
#354   Theme   3.18
#426   Humor   2.22
#511   Audio   2.27
#658   Innovation   2.45
#1074   Coolness   14%
#49
I hope I'll find the time... but shouldn't be too time consuming.

It's possible to write a wrapper for V8 (an awesome JavaScript compiler/interpreter, used by Chrome) in GLB, then execute the generated JavaScript code. But I hope that won't be necessary...
#50
Sorry for forgetting to mention:

I've made a post in the english section:

http://www.glbasic.com/forum/index.php?topic=8087.0
#51
Changelog:
Code (glbasic) Select
Fixed: Negative width/height with STRETCHSPRITE work on Firefox
Fixed: SYSTEMPOINTER TRUE works
Fixed: Castings are much faster
Fixed: Some memory improvement (less micro freezes in Firefox) hard to find these memory "leaks"
Fixed: WHILE 0.1 WEND <- Was never executed... same with REPEAT - UNTIL
Fixed: More Unnecessary CAST2FLOATs are removed from the source code => faster execution
Fixed: Array access in 3 or 4 dimensional array was incorrect
Fixed: TYPE TFoo; f AS TFoo; ENDTYPE <- throws syntax error, because of a cyclic references!


Added: LOADANIM
Added: DRAWANIM
Added: STARTPOLY (experimental!)
Added: ENDPOLY
Added: POLYVECTOR
Added: POLYNEWSTRIP
Added: ZOOMANIM
Added: ROTOZOOMANIM
Added: ROTOANIM
Added: STRETCHANIM
Added: SETSPRITEANIM
Added: EXPORT (exporting functions to JavaScript)
Added: REQUIRE (includes source code)


Quote from: spacefractal on 2012-May-10
Greedy Mouse is one of the game that require a lots and using POLYVECTORS, shadows and such thing (but I did avoid using problem commands like GRABSPRITE and other typical OS limit issues) as well I also using GOTO as well.

So its could been fun to checkout how its really perform with this game. Also I can change resoulution, details as well as well removing scaling to save cpu time.

Would been fun to do a light version of this game in html5 (even the game got delayed around a month throught).

So all in all this is a pretty cool project to show on as Flash is also not required to do a internet game, hehe.

POLYVECTOR: does work but no tinting is performed, not sure whether it will ever work...
GRABSPRITE: should work.
GOTO: works 100%

Basically it _should_ work but there are some (hidden) problems at the moment. For example: ddgui is compiling and executing but it doesn't work properly yet.
#52
Nope sorry... GLBScript is a freetime project and so it's very unpredictable when it's done. Especially when it's about something as big as a 3D engine with WebGL...

Currently making the 2D part up and running has a much higher priority than 3D stuff...
#53
INLINE throws a syntax error and IMPORT simply imports javascript files instead of c++/mm files.

I could implement INLINE with JavaScript instead of C++, but this would not be very useful, because variable/function names are changed by the compiler (so they don't interfere with JavaScript keywords).

If you don't want a function to be changed you can use "EXPORT" which basically says the compiler "hey dude, I want this function untouched!"
#54
HTML5 is an all in one thing. You have all 2d commands included and all the other stuff. So on the JavaScript side there won't be any problems, because I also don't use any third party libraries (jQuery, Prototype, ...). So there are no "real" dependencies.

On the GLBScript side: GLBScript only compiles used functions, so your "executable" keeps small.
#55
Thanks for your replies!!

Quote from: djtoon on 2012-May-06
3d?
As Schranz0r already said: Not yet. But when 2D commands are implemented I will of course implement 3D via WebGL (WebGLBScript  =D). WebGL is OpenGL ES 2.0 for the web. I will offer this as an Add-on for GLBScript.

Quote from: Moru on 2012-May-05
Great work! I want this! What are the terms? :-)
GLBScript won't be free / open source. Mainly because I spent so much of my time into this project - and I will continue spending time ;). I think the online version (with limited lines of code) will be free and the 2D version will cost in the first month around 30€ and then I will increase the price).
Please understand, I've spent a lot of time into this project and the price is quite reasonable I think.

Quote from: Falstaff on 2012-May-06
When do we get to play with it :D
Soon! I think in around 2- 3 months a first test version of GLBScript is available.
#56
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...)
#57
Ja.
#58
X_LOADOBJ "", dieObjektNummer

Löscht das Objekt aus dem Speicher.
#59

Hey!

I've just released my first Android game "JoeTheAlien"

Joe The Alien is an awesome 2.5D platformer!
It offers hilarious gameplay with a lot of game elements. From bouncy mushrooms to ladybugs is everything included.
Features:
- Impressive jump behaviour!
- Huge maps
- Cutting edge gameplay.
- Nice 3D graphics
- Not in 4D!
- No dye and preservative in it!
- Ladybugs
- Mushrooms!
- Spikes
- Have I already mentioned the awesome graphics?
- Epic story!
- And much more!

Download here: https://play.google.com/store/apps/details?id=com.programmingwithdesign.joethealien
#60
Not yet... but maybe - I think - it will!