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

Methal is the Apple's "DirectX", like Microsoft did some years ago deprecating OpenGL in Windows. In windows you don't have OpenGL, but the graphics card driver installs for you. Apple systems are a closed ecosystem, and they make all the hardware and the all the drivers. I think you can install OpenGL libraries when they remove them, but they are not in the system. Then your game or app must to install another package or request the user to install first.

Apple is not interested in OpenGL or OpenGL-ES, because the main responsible of OpenGL for Mac was assigned for improving Methal some years ago. Apple says that Methal improve the graphics performance and saves battery, because it's a modern and efficient API, but it's a library only for Apple hardware and it isn't available for other systems.

I think they don't remove OpenGL in next year, because many Steam and Appstore games are using, but they are saying "we can remove in any time, you are warned". Is like the "Rossetta" case, there was a transition period for old apps for some years, but they removed the support years later in Yosemite. They will remove from the system sooner or later.

New requirements for iOS and Android apps in 2018

Starting April 2018, all new iOS apps submitted to the App Store must be built with the iOS 11 SDK, included in Xcode 9 or later. All new apps for iPhone, including universal apps, must support the Super Retina display of iPhone X.

Google Play will require that new apps target at least Android 8.0 (API level 26) from August 2018, and that app updates target Android 8.0 from November 2018.

It's a very cool game and I like the pseudo 3d and scanlines retro effects. The graphics are very good too.
Good luck, and finish it!! :good: :good:

If you like C++ and games, you can try Cocos2d-x for creating multiplatform games.
If you want something easier, Corona uses Lua (javascript-like) language.

Thank for you good job porting iOS to 64 bit and improve iOS and Android modules.
I hope you have good luck in Steam and keep contributing to GLB community.
:nw: :good:

GLBasic - en / Re: Detect win
« on: 2017-Nov-20 »
WIN32 and WIN64 defines in C doesn't detect the operative system the user has.
Detects the type of COMPILER you are using.

En la ayuda de GLBasic te pone todos los pasos para Android. Tienes que instalar el último JavaSE SDK, el SDK de Android, configurar el JAVA_HOME y luego compilar con la opción de Android. Te creará un .apk que podrás instalar en el teléfono. Tienes que activar en opciones de desarrollo la opción de orígenes distintos a Google Play, sino no te dejará instalarla.

Thank you Gernot!!! :good:

I have some utility TYPES that doesn't have variables, others are normal types.
Putting a dummy variable works ok, but it's an error in the code generation.

Enviado desde mi SM-A310F mediante Tapatalk

No replies :'(  :'(

Bug Reports / GLBasic 15.004 bug and solution
« on: 2017-Oct-13 »
I have GLBasic v15 and works ok, but I can't update to version 15.005, the update works but the version remains in 15.004. I don't know if the next error is fixed in the 15.005 update. This can be related with this other post:

The bug occurs compiling a TYPE in my code. It's normal code not using inline C++.

Code: GLBasic [Select]
// type with some functions
TYPE Dialogos
        FUNCTION Iniciar:
            // some code...
        // more functions...

Code: GLBasic [Select]
*** Configuration: WIN32 ***
GPC - GLBasic Precompiler V.14.721
Wordcount:877 commands
In file included from C:\Users\FJMONT~1\AppData\Local\Temp\glbasic\gpc_temp0.cpp:1:
C:\Users\FJMONT~1\AppData\Local\Temp\glbasic\gpc_temp.h: In constructor `__GLBASIC__::Dialogos::Dialogos()':
C:\Users\FJMONT~1\AppData\Local\Temp\glbasic\gpc_temp.h:54: error: expected identifier before '{' token
C:\Users\FJMONT~1\AppData\Local\Temp\glbasic\gpc_temp.h:54: error: expected `(' before '{' token

(Many error lines like the last three....)

Looking at the generated code (gpc_temp.h) I can see the compiling error:

Code: GLBasic [Select]
class Dialogos
        // some code here ...
        Dialogos(): // <--- this is bad

        // more code here...

The generated code fails because the ":" should not be there. This happens because my TYPE have not any member variables in it. If I put a dummy variable in the TYPE like this, the code compiles and links Ok. This "patch" must be done in each TYPE that does not have variables.

Code: GLBasic [Select]
TYPE Dialogos
        dummy% // fix glb15 fail

        // class with some functions and no variables
        FUNCTION Iniciar:
            // some code...
        // more functions...

The generated code is good now and compiles without errors:
Code: GLBasic [Select]
class Dialogos
        Dialogos(): // <-- this is ok now


I hope this can be fixed.

GLBasic - es / Re: #ifdef #endif C++
« on: 2017-Sep-05 »
Nuevamente siento responder tarde.

CodeBlocks en Windows usa por defecto el compilador MINGW, que es un port de GCC. Este compilador creo que no define nada en modo debug, con lo cual tendrías que definirlo a mano en las "build properties" de Debug con la pestaña "#defines" poner _DEBUG por ejemplo. También puedes mirar las propiedades del compilador (CBlocks permite usar muchos compiladores), en la parte de build properties > compile options > #defines.

Estos defines te sonarán de Visual C++, pero GCC no define nada y depende de la implementación del sistema. GCC está implementado en muchos sistemas (Windows, Linux y todo tipo de aparatos).

Pages: [1] 2 3 ... 33