blitzbasic

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

Pages: [1] 2 3 ... 17
1
Code Snippets / Re: StateMachine
« on: 2013-May-06 »
I've compiled to HTML5 and uploaded to Kongregate just to see if this is possible. http://www.kongregate.com/games/Alberton/glbasic-test-game
Not the perfect game to showcase GLBasic true performance but I wanted smthing playable fast.

2
GLBasic - en / Re: 2D Lightning & Kerning
« on: 2013-Apr-30 »
With ALPHATEST it looks quite cool!

3
2D-snippets / Re: Isometric Engine IsoGL
« on: 2013-Apr-30 »
Very interesting stuff. What a pity it has some serious issues (it crash for me quick). Wonder what the community will make with this code!

4
Nice!

5
Code Snippets / Re: Isometric look code
« on: 2013-Apr-22 »
Now It's working on HTML5 too: https://dl.dropboxusercontent.com/u/292449/html5/Iso/isometricdemo.html
Strange fact that I had to remove DRAWLINE from the IMGUI codebase to run properly (There was 4 lines in the window's title). Drawline is too slow stuff?

6
Code Snippets / Re: Blobmonster
« on: 2013-Apr-22 »
For a little HTML5 benchmark test modify tha main code again to this:

Code: [Select]
//create a blobMonster object
GLOBAL test[] AS blobMonster
CONSTANT numBlobs=10
REDIM test[numBlobs]

FOR i=0 TO numBlobs-1
test[i].Create(RND(300), RND(300), RND(1000))
NEXT

SETLOOPSUB "GLB_ON_LOOP" // - GLBasic V11 calls this at the END of "main"


//main loop
@SUB GLB_ON_LOOP: // this is called by the framework after the "main" init module
//update and draw the blobmonster
CLEARSCREEN
FOR i=0 TO numBlobs-1
test[i].Update()
test[i].Draw()
NEXT

SHOWSCREEN
ENDSUB

and blobMonster.Create to this:
Code: [Select]
//function that returns a new blob monster object. Blitzmax equivalent (kind of)
//of a constructor in C++/Java
FUNCTION Create AS blobMonster:inX#, inY#, inTime#
DIM self.tail[self.segments]
//starting point of the blob monster
self.x = inX
self.y = inY
self.time = inTime
//give the tail some coordinates, just make them the same as the main x and y for now
FOR i = 0 TO self.segments - 1
self.tail[i].x# = inX
self.tail[i].y# = inY
NEXT

RETURN self
ENDFUNCTION

And you got this:
https://dl.dropboxusercontent.com/u/292449/blobmonster30.html

7
Code Snippets / Re: Blobmonster
« on: 2013-Apr-22 »
Change part of the the main code to this:
Code: [Select]
//create a blobMonster object
GLOBAL test AS blobMonster

test.Create(10, 10)

SETLOOPSUB "GLB_ON_LOOP" // - GLBasic V11 calls this at the END of "main"


//main loop
@SUB GLB_ON_LOOP: // this is called by the framework after the "main" init module
//update and draw the blobmonster
CLEARSCREEN
test.Update()
test.Draw()

SHOWSCREEN
ENDSUB

Compile to HTML5 and you get this:

https://dl.dropboxusercontent.com/u/292449/blobmonster.html

8
GLBasic - en / Re: Blackberry
« on: 2012-Nov-27 »
And now they are working hard on BlackBerry 10.0 (QNX) mobile phones. I want compile to QNX from GLBasic NOW!

9
Announcements / Re: GLBasic V11 public beta
« on: 2012-Sep-26 »
I've played a lot with emscripten by now, and I think tha libcxx* problem is related to 64 bit win7

10
Announcements / Re: GLBasic V11 public beta
« on: 2012-Sep-26 »
I've some difficulties compiling for html5. Now I'm trying to run command-line. I've got this:

Code: [Select]
c:\GLBasic_v11\Compiler\platform\JavaScript\bin\python>python.exe "C:/GLBasic_v11/Compiler/platform/JavaScript/bin/\emsc
ripten\emcc" -O1 --llvm-lto 0 --typed-arrays 2 -IC:\GLBasic_v11\Compiler\platform\Include -IC:\Users\bd\Dropbox\glba
sic\Blobmonster -DEMSCRIPTEN -DNDEBUG -DWANT_SDL -DHAVE_OPENGL C:\Users\bd\AppData\Local\Temp\glbasic\gpc_tempg.cpp
C:\Users\bd\AppData\Local\Temp\glbasic\gpc_temp0.cpp C:\GLBasic_v11\Compiler\platform\JavaScript\bin\libGLBasicWebGL
.o -o C:\Users\bd\AppData\Local\Temp\glbasic\output.html -DHTML5=1

==============================================================================
Welcome to Emscripten!

This is the first time any of the Emscripten tools has been run.

A settings file has been copied to ~/.emscripten, at absolute path: C:\Users\bd/.emscripten

Please edit that file and change the paths to fit your system. Specifically,
make sure LLVM_ROOT and NODE_JS are correct.

This command will now exit. When you are done editing those paths, re-run it.
==============================================================================

and for the second run:

Code: [Select]
(Emscripten: Config file changed, clearing cache)
warning: Could not verify LLVM version: [Error 2] The system cannot find the file specified
(Emscripten: Running sanity checks)
Checking JS engine node failed. Check ~/.emscripten. Details: [Error 2] The system cannot find the file specified
FATAL: The JavaScript shell used for compiling (node) does not seem to work, check the paths in ~/.emscripten

11
Gernot: I think our games cannot be run on x64 linux, what is a shame as more and more linux user buy 64 bit computers.
It seems to me that only the GLBasic####.so and .a files need to be recompile to x64 and we good to go. There will be 64bit support for Linux in GLBasic?

12
I'm trying to compile on linux a console app
my compile.sh:
Code: [Select]
gcc -pipe -O3 -w -Wl,--allow-shlib-undefined,-rpath-link,./Linux/Lib -L./Linux/Lib -I./Include -DLINUX -DUNIX -DNDEBUG -DGLB_CONSOLE *.cpp -lGLBasicLinux-console -ldl -lc -lpthread

Output is:
Code: [Select]
> ./compile.sh
/usr/bin/ld: skipping incompatible ./Linux/Lib/libGLBasicLinux-console.a when searching for -lGLBasicLinux-console
/usr/bin/ld: cannot find -lGLBasicLinux-console
collect2: ld returned 1 exit status
>
Maybe the problem is that this is an 64 bit linux?

13
Code Snippets / Re: Immediate Mode GUI
« on: 2012-Aug-06 »
I can't decide if you want to use it or not, but I can tell my story with IMGUI.
I read Sol's tutorial about it and then ported to GLBasic and I'm truly impressed what effective IMGUI is.
You work with a very small codebase and only the basic Widgets (scrollbar, button, textfield) and then you can easily expand the basic Widgets to complex ones (Combo box, drop down menu, tree-list, tabs, radio buttons, windows, complet forms).
You don't need to inicialize the widgets (no need to create a button) only use it. You don't store any data in the widgets so not need to update them if a value changed externally.
There are some fundamental difference beetween IMGUI and RMGUI (like DDGUI).
With RMGUI you need:
1. Create widgets
2. Update widgets to reflect internal state of application
3. Update internal state of application to reflect state of widgets
4. Destroy widgets.

With IMGUI you only need:
1. Use widget with internal state of application

You calculate, render and check an IMGUI widget in every frame, so it uses more CPU than RMGUI, but IMGUI mostly used in games, where FPS targetted 40-60 FPS and only with a few widgets at once, so this is not a problem overall.

An excellent writing about IMGUI with code examples: http://www.johno.se/book/imgui.html

I found some really nice BlitzBasic and C++ IMGUI sources, there are a lot of good idea in these I want to port to GLBasic (automatic layout for example).

I found out that NVidia implemented its own IMGUI which it using in it's demos: http://code.google.com/p/nvidia-widgets/
Also Unity using IMGUI since Unity 2.5 (2009), and they said that working with IMGUI was a very pleaseful job:

14
Interesting thread.
Maybe we can add some sort of inheritence too?

15
GLBasic - en / Re: simple puzzle game WIP
« on: 2012-Jul-23 »
Nice effect, I especcially like the big blurred circle with only 4 points looks like a star

Pages: [1] 2 3 ... 17