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

Pages: [1] 2 3 ... 33
GLBasic - en / Re: Save a TYPE array object
« on: 2022-May-13 »
I propose a solution based in Java class saving/loading, adapted to GLBasic TYPEs. Each type knows how to manage their data and a parent type (like an array or list), calls the loading or saving functions of the elements. Add functions to your TYPEs to save/load a single element to the file, and do the saving/loading loop in the parent list TYPE. Open the file from the container TYPE or array and pass the file channel to each element of the list.

Code: (glbasic) [Select]

  // assign properties
  function Init: _a%, _b%, _name$
      self.a = _a
      self.b = _b$ = _name$

  // write element to file
  // file must be opened for write
  function SaveToFile: file%
      writeword file, self.a
      writeword file, self.b
      writeline file,$

  // load the element from file
  // file must be opened for read
  function LoadFromFile: file%
      readword file, self.a
      readword file, self.b
      readline file,$


// declare list of TYPEs
local mylist[] as MyType
dim mylist[3]

// fill mylist with elements
mylist(0).Init(1, 22, "Fist")
mylist(1).Init(2, 33, "Second")
mylist(2).Init(3, 44, "Third")

// save the list to a file
Openfile(1, "mylist.dat", FALSE)

For elem in list[]

Closefile 1

Off Topic / Re: Covid
« on: 2022-Apr-08 »
Best wishes to you Bigsofty, take care and I hope you are better now.
In my hometown there was a clear zone used for emergency helicopters but they build a big supermarket there.
(the money, you know)

Code Snippets / Re: Load data from memory
« on: 2021-Oct-20 »
Wow, this is very cool for creating data at runtime using the "mem://" protocol.

WOW, you simulator is amazing!! Your work is enormous and very useful to study the gravity in the Universe.
Thanks for the good work and long life to GLBasic.  :booze:

I think you can use Win32 functions declaring with the IMPORT command and calling.

Code: (glbasic) [Select]
// If the hCursor is NULL, the cursor is removed from the screen.
IMPORT "C" void* __stdcall SetCursor(void* hCursor)

// hide windows cursor

Off Topic / Re: Happy New Year Guys!
« on: 2021-Jan-20 »
Happy new Year!! We hope this year will be better than 2020.

GLBasic - es / Re: Multi istances
« on: 2020-Jan-27 »
¿Do you need multi instances for opening many GLB projects at once? I never opened two projects at once.
I think must be a Steam requirement, because the launcher is an application manager.

Announcements / Re: [GBJam 5] MRU:LV-426
« on: 2020-Jan-14 »
Very cool game and funny Erico, I like the palette you selected and the GB style.

GLBasic - en / Re: Using old compilers
« on: 2020-Jan-14 »
@Ian Price
Thanks a lot! :nw:
I will soon be getting a WIZ and seeing if I can get this all to work, I am wondering however, is there anything I need to keep in mind
when compiling to the WIZ? Or is it just like creating a desktop application? O_O

This is the help for compiling for other platforms:

When compiling for Wiz or Caanoo, you must to know that the screen is 320x200 only and you must to use small amount of memory (48 MB). This includes images (sprites) and preloaded sounds effects. The buttons are managed like special keys. The touch screen is managed like the mouse.

You can use the button key codes here:

For compiling for Wiz, you must to use the red bucket button (build multiplatform) and select the platform. Then your GLB code will be compiled and a distribution folder will be created with the executable (.gpe) and the resources you must to copy to the console SD card. Then with the Wiz explorer you can to execute your own games and programs.

Happy coding

GLBasic - en / Re: Using old compilers
« on: 2020-Jan-14 »
I have tried almost all v15 compilers and up until now, none of them worked.

I have also tried compiling to Raspberry Pi, however this too did not work, i got a couple of error running the .bin file, but after installing GLES, SDL, SDL2 and OpenGL i was still stuck on the same error.

You must to use V16 platforms with the Steam version:

With GLB v16 can compile for HTML5, Mac, Raspberry and Android. You must to unzip the modules in GLB Platform folder.
Read the instructions for each platform in the GLB help, for example for Android you need install software (JDK, etc).

GLBasic - en / Re: Using old compilers
« on: 2020-Jan-14 »
Hello Bluepixel,

The Steam version han no support for "old" platforms like GP2X, Wiz, WinCE, etc. The website info is a bit outdated, only "classic" no Steam versions compile for this platforms. I think the reason is because GLB V16 generate 64 bits optmized code for current platforms and this code can't compile for 32 bit machines (Wiz, WinCE, etc).

I have a PDA, Wiz, Cannoo and GCW, and I can compile for this with GLB v14 and older, because I have a license for this versions. Maybe you can write to Gernot asking for a solution, but currently the only way is purchase an old version. You can download a demo for v15, and you can test in your platforms before you buy. A timed watermark in generated in every app in demo version.

You can download the Demo for GLB v12 here:

If I remember, the GLB 12 has all platforms in the installer.

Good work. I'm happy because GLBasic is still alive. I'ts fair that you receive some money for supporting this awesome development tool. It's very easy to create a lot of game and multimedia stuff with GLBasic. I will support the Steam version, and I hope many people around the world discover and buy the product. Long live to GLB!!!  :booze:

GETTIMERALL() te da la hora en microsegundos desde el inicio del programa. Para saber el tiempo en un intervalo, solo tienes que restar los dos valores y convertirlo a la unidad que quieras (segundos, minutos, horas, ...).

Code: (glbasic) [Select]

 timstart = GETTIMERALL()

 // codigo de tu juego aquí...
 timend = GETTIMERALL()
 interval = (timend - timstart)*1000

 PRINT "Tiempo transcurrido: "+ interval + " segs", 0,0

Off Topic / Re: New Mac....ish story
« on: 2019-Apr-02 »
All the macOS systems are free since Mavericks. The problem is that Apple deletes from the appstore, but I have backup of the last installers.

I have a macmini 2013 (the last that was upgradeable memory) bought in amazon from a german shop and was new. The price was 700 euro, but was the best computer buy in many years. I put a ssd disk and works fast and very quiet.

Enviado mediante Tapatalk

I think a 64 bit GLB version needs more memory to compile. My projects don't have many files, but I think it should be a maximum of 20 files at once for example. Then the compilation can be performed by sets of files in a large project.

Pages: [1] 2 3 ... 33