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

#1
Hi,

here we go again:


Definition

Create a Console Demo program in GLBasic. Like they were in the good old days.

Rules


  • Write the whole program only in GLBasic
  • use whatever you want (third party libraries)
  • the program must be a console!!!
  • Make the result look impressive

Goal

Impress everybody with your awesome console result.

Submission

Post your code or add an zip - fil, so we can check your result.

Closing Date

21.09.2019

Poll Date

The poll will open after the first submission and will be open until 31.07.2019.

Example

In this Youtube - Playlist you can see a list of old demos.

https://www.youtube.com/watch?v=KTjnt_WSJu8&list=PLK7_Bh0oHAPE3WcT6o8miSDNnu4zkp3hp


Winner

This is a fun contest and there is nothing to win... Nevertheless, together we can choose a winner...


Good luck and have fun.
#2
Hi,

here we go, it's time for an other contest:


Definition

Write a 2D art program in GLBasic. It should be a little piece of art, not an art creation program.

Rules


  • Write the whole program only in GLBasic
  • no third party libraries
  • Keep the code short and simple
  • Make the result look impressive

Goal

Show us your best little art project, with or without movement and impress us.

Submission

Just post your code here in a codeblock, so everybody can study your awesome work.

Closing Date

19.05.2019

Example

Here is my little example. It's an optical illusion.

If you press the space bar, you can start and stop the movement.

Code (glbasic) Select


TYPE tRect
x
y
direction
speed
ENDTYPE

GLOBAL rect[] AS tRect, space

main()

FUNCTION main:

generateRects()

WHILE TRUE

drawLines()
drawBoxes()

IF INKEY$() = " "
INC space, 1
IF space > 1 THEN space = 0
ENDIF

SHOWSCREEN
WEND

ENDFUNCTION

FUNCTION generateRects:
LOCAL r AS tRect
LOCAL offset


FOR tmpY = 0 TO 15

offset = RND(25)

r.direction =  MOD(tmpY, 2)
r.speed = 100 + RND(200)

FOR tmpX = 0 TO 10
r.x = 0 + (tmpX * 60) + offset
r.y = 5 + (tmpY * 30)

DIMPUSH rect[], r

NEXT
NEXT

ENDFUNCTION

FUNCTION addRect: x, y, direction

ENDFUNCTION

FUNCTION drawLines:
LOCAL tmpY

FOR tmpY = 0 TO 15
DRAWRECT 0, 0 + (tmpY * 30), 640, 5, RGB(128, 128, 128)
NEXT

ENDFUNCTION

FUNCTION drawBoxes:

FOREACH r IN rect[]

IF space = TRUE
IF r.direction = 0
INC r.x, r.speed / 500
ENDIF
IF r.direction = 1
DEC r.x, r.speed / 500
ENDIF
ENDIF

DRAWRECT r.x, r.y, 5, 25, RGB(128, 128, 128)
DRAWRECT r.x + 5, r.y, 25, 25, RGB(255, 255, 255)
DRAWRECT r.x + 30, r.y, 5, 25, RGB(128, 128, 128)

IF r.x < -30
r.x = 640
ENDIF
IF r.x > 640
r.x = -30
ENDIF
NEXT

ENDFUNCTION


Winner

This is a fun contest and there is nothing to win... Nevertheless, together we can choose a winner...



Good luck and have fun.

=====

Winner of the contest:

:enc:Qedo (50%) & Snoopy (50%) :enc:

#3
Hi,

it's time for a new contest and it's time for a little action in the forum.

Here we go:



Definition

Write a hello world program in GLBasic as complicated as possible!!!

Rules


  • Write the whole program only in GLBasic
  • no third party libraries
  • Don't use unnecessary code lines (like 1000 loops)
  • Don't copy from an already published code

Goal

The output on the screen is black and it says "Hello World" and that's it. No Action, no fancy backgrounds, only a black screen with a few nice letters.  =D

Submission

Just post your code here in a codeblock, so everybody can study your awesome work.

Winner

This is a fun contest and there is nothing to win... Nevertheless, together we can choose a winner...



Good luck and have fun.


=====

Winner of the contest:

:enc:Hemlos :enc:
#4
Hi,

ja, mir war langweilig, also hab ich ein kleines Projekt gebastelt. Also heute Vormittag...

Ist ein kleiner Idler für den Valentinstag, incl. Siegesbedingung und Upgrademöglichkeit.

Der Code liegt dabei, falls jemand daran weiter basteln möchte.

Viel Spaß und einen schönen Valentinstag euch allen.  :booze:

LG

W.
#5
Hi,

I'm working on a little program for my girlfriend, so I built up a Raspberry PI with a 3.5" TFT.

Now I tried to start the software but I only get a yellow display (the background should be white) on the Raspberry.

Pictures are not working, text is working.

Do you have any experience with something like this?

W.
#6
Hi,

hat jemand ähnliche Probleme mit Input  - Verzögerungen wie ich?

Teilweise dauert die Reaktion auf einen Tastendruck bis zu einer Sekunde.

Gilt allgemein, auch für ESC oder normale KEY() - Abfragen.

LG

W.

PS.: bevor jemand fragt --> ich hab das selbe Phänomen auf 3 Rechnern  =D
#7
Hi,

eine kleines Problem quält mich momentan beim Einlesen von Textkomponenten mit Sonderzeichen:

Versuche ich ein Wort mit Sonderzeichen (z.B. Gebäude) mit INIGET$ einzulesen

Code (glbasic) Select

entry$ = INIGET$("language", entryTmp$)


dann bekomme ich als Ergebnis folgendes:

MEMainMenu3|Gebäude

So sehen die Buchstaben

Ä  Ö   Ü    ä   ö   ü
Ä Ö Ü ä ö ü

nicht sehr "ansprechend" bei der Ausgabe aus.

Ich verwende ein normales ini - File zum Einlesen.

Gibt es hier irgendwie Probleme mit Sonderzeichen? Ich habe da irgendwas im Hinterkopf, bin mir aber nicht mehr sicher...

GLG

W.
#8
Guten Morgen,

nach dem letzten Update bekomme ich die Fehlermeldung:

Das Programm kann nicht gestartet werden, da mfc140.dll auf dem Computer fehlt. Installieren Sie das Programm erneut, um das Problem zu beheben.

Ist das ein lokales Problem bei mir oder kennt jemand den Fehler?

LG

W.
#9
Hi,

ich versuche gerade einen kurzen Code zu schreiben, in dem ich versuche Anführungszeichen aus einem Code zu entfernen.

Wie lese ich diese aus bzw. wie kann ich gezielt danach suchen?

Ich habe es mit CHR$ versucht, aber irgendwie finde ich das korrekte Zeichen nicht.

LG

W.
#10
Hi,

nach langem ist es wieder mal Zeit Gernot zu ärgern. =D

Ich hab mal gemütlich v14.003 angetestet und scheinbar gibt es ein Problemchen mit dem Debug - Modus.

Hier ist der Originalcode:

Code (glbasic) Select

// --------------------------------- //
// Project: gal
// Start: Tuesday, August 18, 2015
// IDE Version: 14.003


// SETCURRENTDIR("Media") // go to media files

TYPE gui_TYPE
FUNCTION drawMouse: x, y
STARTPOLY
POLYVECTOR x, y, 0, 0, RGB(255, 255, 255)
POLYVECTOR x + 5, y + 10, 0, 0, RGB(64, 128, 255)
POLYVECTOR x + 10, y + 5, 0, 0, RGB(64, 128, 255)
ENDPOLY
ENDFUNCTION
ENDTYPE

TYPE galaxyz_TYPE
gui AS gui_TYPE
mouse AS wpx_mouse_TYPE

startupInit

FUNCTION init:

ENDFUNCTION

FUNCTION drawWindows:
IF self.startupInit = FALSE
self.init()
self.startupInit = TRUE
ENDIF



updateMouse()
self.gui.drawMouse(self.mouse.x, self.mouse.y)
ENDFUNCTION




ENDTYPE

TYPE wpx_mouse_TYPE
x
y
b1
b2
b1_press
b2_press
ENDTYPE

GLOBAL gal AS galaxyz_TYPE

main()

FUNCTION main:

WHILE TRUE

gal.drawWindows()

SHOWSCREEN
WEND

ENDFUNCTION

// --------------------------------- //
// Mouse
// --------------------------------- //
FUNCTION updateMouse:
LOCAL x, y, b1, b2, b1_press, b2_press
STATIC b1_tmp, b2_tmp, press_init, press_timer_old

MOUSESTATE x, y, b1_press, b2_press

gal.mouse.x = x
gal.mouse.y = y

IF b1_press = FALSE
b1 = FALSE
press_init = FALSE
ENDIF
IF b1_press = TRUE
b1_tmp = TRUE
IF press_init = FALSE
press_timer_old = GETTIMERALL() + 500
press_init = TRUE
ENDIF
ENDIF
IF b1_press = FALSE AND b1_tmp = TRUE AND GETTIMERALL() <= press_timer_old
b1 = TRUE
b1_tmp = FALSE
ENDIF

IF b2_press = FALSE THEN b2 = FALSE
IF b2_press = TRUE THEN b2_tmp = TRUE
IF b2_press = FALSE AND b2_tmp = TRUE
b2 = TRUE
b2_tmp = FALSE
ENDIF

gal.mouse.b1 = b1
gal.mouse.b2 = b2
gal.mouse.b1_press = b1_press
gal.mouse.b2_press = b2_press

ENDFUNCTION


Starte ich mein kleines Programm, funktioniert es ohne Probleme.

Starte ich es jedoch im Debug - Modus, bekomme ich diese Schneise:

Code (glbasic) Select


_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.037 SN:75706ccf - 3D, NET
Wordcount:50 commands
compiling:
In file included from C:\Users\WPORTS~1\AppData\Local\Temp\glbasic\gpc_tempg.cpp:2:
C:\Users\WPORTS~1\AppData\Local\Temp\glbasic\gpc_temp.h: In member function `virtual void __GLBASIC__::galaxyz_TYPE::dbg() const':
C:\Users\WPORTS~1\AppData\Local\Temp\glbasic\gpc_temp.h:171: error: no match for 'operator+' in 'DGStr(((const char*)"gui:")) + ((const __GLBASIC__::galaxyz_TYPE*)this)->__GLBASIC__::galaxyz_TYPE::gui'
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note: candidates are: __GLBASIC__::DGStr __GLBASIC__::operator+(int, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, int)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, int64)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, float)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, double)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int64)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, float)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, double)
C:\Users\WPORTS~1\AppData\Local\Temp\glbasic\gpc_temp.h:172: error: no match for 'operator+' in 'DGStr(((const char*)"mouse:")) + ((const __GLBASIC__::galaxyz_TYPE*)this)->__GLBASIC__::galaxyz_TYPE::mouse'
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note: candidates are: __GLBASIC__::DGStr __GLBASIC__::operator+(int, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, int)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, int64)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, float)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, double)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int64)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, float)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, double)
In file included from C:\Users\WPORTS~1\AppData\Local\Temp\glbasic\gpc_temp0.cpp:1:
C:\Users\WPORTS~1\AppData\Local\Temp\glbasic\gpc_temp.h: In member function `virtual void __GLBASIC__::galaxyz_TYPE::dbg() const':
C:\Users\WPORTS~1\AppData\Local\Temp\glbasic\gpc_temp.h:171: error: no match for 'operator+' in 'DGStr(((const char*)"gui:")) + ((const __GLBASIC__::galaxyz_TYPE*)this)->__GLBASIC__::galaxyz_TYPE::gui'
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note: candidates are: __GLBASIC__::DGStr __GLBASIC__::operator+(int, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, int)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, int64)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, float)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, double)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int64)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, float)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, double)
C:\Users\WPORTS~1\AppData\Local\Temp\glbasic\gpc_temp.h:172: error: no match for 'operator+' in 'DGStr(((const char*)"mouse:")) + ((const __GLBASIC__::galaxyz_TYPE*)this)->__GLBASIC__::galaxyz_TYPE::mouse'
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note: candidates are: __GLBASIC__::DGStr __GLBASIC__::operator+(int, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, int)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, int64)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, float)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(__GLBASIC__::CGStr, double)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, __GLBASIC__::CGStr)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, const __GLBASIC__::DGStr&)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int64)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, float)
C:/Program Files (x86)/GLBasic_v14/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, double)
*** FATAL ERROR - Bitte die Compiler-Ausgabe ins Forum kopieren
_______________________________________
*** Fertig ***
Dauer: 2.0 sek. Zeit: 10:07
Erstellen: 0 erfolgreich.
*** 1 FEHLGESCHLAGEN ***


Irgendeine Idee, wo es da aufschlägt?

LG

W.
#11
GLBasic - de / Bug in LCASE$
2014-Dec-29
Hi,

ich bastle gerade an einem Projekt und mir ist folgendes aufgefallen:

Code (glbasic) Select

FUNCTION returnLetter$:
LOCAL letter$

letter$ = INKEY$()

RETURN LCASE$(letter$)

ENDFUNCTION


Bei dieser Funktion liefert das System zwar normale Buchstaben zurück, aber sobald Sonderzeichen (ä, ö, ü) benutzt werden, werden diese als Großbuchstaben zurück geliefert...  =D

Wollte ich nur mal "melden"

Schöne Feiertage  :booze:

W.
#12
Hi,

ich brauche mal eure Hilfe, ich selbst komme auf keine ordentliche Idee momentan: ich suche nach einer Idee, wie man einen Zufallsgenerator mit Häufungen bauen kann.

Ich versuche eine 2D Karte mit Tiles sinnvoll zu befüllen. Dabei besteht die Karte zu einem großen Teil aus Wasser wird anschließend mit Landmasse befüllt. Dabei versuche ich nicht einfach Punkt für Punkt voll zu setzen, da das absolut keinen Sinn ergibt. Kennt jemand von euch ein Verfahren oder hat jemand eine Idee, wie man den Zufallsgenerator erweitern kann, sodass die befüllten Karten halbwegs Sinn ergeben?

Die belegte Tilegröße liegt zwischen 22 x 16 und 40 x 30.

LG

W.

EDIT: ich habe mal einen Screenshot angehängt. Genau eine solche "Landmassenverteilung" versuche ich zu vermeiden.
#13
Hey,

ist es möglich bei einem GLBasic - Programm eine Startbedingung mitzugeben und diese im Programm auszulesen?

Also "test.exe -banane"?

LG

W.
#14
Hey,

wie funktioniert in GLBasic eigentlich der Garbage Collector?

Nehmen wir an ich habe eine verschachtelte Struktur von 3 Types wie z.B. hier:

Code (glbasic) Select


TYPE a
  bb[] as b
ENDTYPE

TYPE b
  cc[] AS c
ENDTYPE

TYPE c

ENDTYPE

GLOBAL aa[] AS a



Wenn ich aa[] mit einer FOREACh - Schleife lösche, werden dann auch bb[] und cc[] aus dem Speicher geworfen oder muss ich die getrennt entfernen? Also "oldschool C" ...

LG

W.
#15
Beta Tests / GLBASIC IDLE
2014-Apr-18
Hi,

ok, we lost the whole documentation of the project, but  :enc:

Here is the new idle version with:

- new elements
- other elements
- elements
- things
- and stuff

Have Fun!!!

W.
#16
Hi,

ich scheitere mal wieder an Mahte  :rant:

Kann mir irgendwer sagen, wie ich den Schnittpunkt von 2 Linien berechne? Ich grabe mich durch sämtliche Tutorials, aber ich komme nicht drauf.

Von beiden Linien habe ich Start und Endpunkt...  :S

LG

W.
#17
Hi,

wenn ich Grafiken als *.png erstelle, dann wird der Alpha - Kanal nicht beachtet, wenn ich die png ausgeben will, oder?

Den muss ich in dem Fall manuell (mit ALPHAMODE) setzen, oder?

LG

W.
#18
Hi,

mein Hirn setzt langsam aus, also brauche ich mal eure Hilfe.

Ich versuche verzweifelt eine *ini zu laden. Diese habe ich angehängt (gfx.ini)

Die dazugehörige Funktion ist:

Code (glbasic) Select

FUNCTION sys_loader:
LOCAL ok, tmp, tmp$, lang, file$, file_load$

ok = DOESFILEEXIST("media/gfx/gfx.ini")

IF ok = TRUE

INIOPEN "media/gfx/gfx.ini"

lang = INIGET$("file", "count")


FOR tmp = 1 TO lang
tmp$ = tmp

file$ = "file_" + tmp$

file_load$ = INIGET$("file", file$)

sys_loader_ini(file_load$)

NEXT

INIOPEN ""

ELSE

sys_logging("1 Datei " + file$ + " wurde nicht gefunden.")

ENDIF


ENDFUNCTION


Grundlegend funktioniert das sys_logging korrekt und liefert mir auch zurück, dass die Datei vorhanden ist.

Im Ablauf soll sie nun geöffnet werden, count auslesen (funzt) und in die Schleife springen (funzt).

Sobald ich in der Schleife bin, funktioniert der 1. Aufruf vollkommen korrekt, d.h. die aufgerufenen Daten werden wie folgt aufgerufen:

file_1 media/gfx/stars.ini
file_2 NO_DATA

Aus irgendeinem Grund gibt file_2 keinen Inhalt zurück, egal was ich hier eingebe.

Ansich sollte der Code passen, da ich mehrere Files so einlese. Habt Ihr eine Idee?

LG

W.
#19
Hi,

hat jemand von euch Erfahrung mit vielen 2D Tiles die gleichzeitig am Bildschirm sind?

Ab wann sollte man sich ca. Sorgen machen? Ich arbeite an einem kleinen 2D Spielchen mit Zoomstufe und habe etwas experimentiert und herum gerechnet und auf höchster Zoomstufe kratze ich gut und gerne an ca. 50k Tiles, wenn alle Layer gesetzt sind (was aber nur ein theoretischer Wert ist, da unsichtbare Elemente ja nicht gezeichnet werden).

Ich zeichne übrigens nur den Fensterausschnitt und nicht das vollständige Gebiet, daher kommt die hohe Anzahl also nicht.  =D

Kann das soweit zu Problemen führen oder brauche ich mir da keine Sorgen machen?

LG

W.
#20
GLBasic - de / GLB_ON_QUIT
2013-Nov-15
Hi,

ich hab mal ein kleines Experiment gemacht und wollte beim Beenden des Programmes die Logs rausschreiben.

Code (glbasic) Select

SUB GLB_ON_QUIT:
LOCAL output$[], tmp$

IF sys_settings.debugging = 1

SPLITSTR(PLATFORMINFO$("TIME"), output$[], " ")

OPENFILE(0, "logs/fps_" + output$[0] + "_" + output$[1] + ".txt", -1)

IF LEN(fps_log[]) > 0

FOREACH m IN fps_log[]

tmp$ = m.date$ + " | fps: " + m.log_fps

WRITELINE 0, tmp$

NEXT

ENDIF

CLOSEFILE 0

ENDIF

ENDSUB


Leider bekomme ich nur die Fehlermeldung: error 3 zurück geworfen und die Logs werden nicht geschrieben.

Irgendeine Idee, was error 3 zu bedeuten hat? Ich wäre ganz glücklich, wenn mir hier jemand helfen könnte!  =D

LG

W.