Search found 1740 matches

by Kjell
Thu Apr 15, 2021 11:46 pm
Forum: General discussion
Topic: Compiling ZGE for linux ARM
Replies: 3
Views: 24

Re: Compiling ZGE for linux ARM

Hi Ats, Maybe a missing lib? Or unreachable code in ZExpressions.pas due to $ifndef? You / the-compiler is trying to use a incompatible implementation of TExpExternalFuncCall.Execute. The selected implementation targets x86 CPUs running MacOS, which uses inline assembly instructions that don't exist...
by Kjell
Sat Apr 10, 2021 10:17 am
Forum: Extensions
Topic: SunVox for ZGE
Replies: 67
Views: 57531

Re: SunVox for ZGE

Hi Ats, By the way, is it better to use "Stdcall" or "Cdecl"? They are just different conventions. The biggest difference is that libraries that use STDCALL clean up the memory used to call a function themselves, while CDECL expects the caller to do this instead ( in that case ZGE takes care of this...
by Kjell
Fri Apr 09, 2021 11:30 am
Forum: Feature requests
Topic: Add LINUX as a BuiltinConstants
Replies: 4
Views: 729

Re: Add LINUX as a BuiltinConstants

Hi Ats, Why are you using trace to test this? Trace only works in the editor on Windows or for executables on Android. In all other circumstances it doesn't do anything. Here's the snippet from ZExpression.pas .. fcTrace : begin HasReturnValue := False; Env.StackPopToPointer(P1); {$ifndef minimal} Z...
by Kjell
Thu Apr 08, 2021 4:10 pm
Forum: Extensions
Topic: SunVox for ZGE
Replies: 67
Views: 57531

Re: SunVox for ZGE

Hi Ats,

The ZExternalLibrary component loads a external library at runtime. On Linux this is done using dlopen. Have you tried prefixing your ModuleName with a "/" so it looks for the .so file in the directory of your executable?

K
by Kjell
Sat Apr 03, 2021 10:47 am
Forum: General discussion
Topic: How to use @KeyPress directly in a ZExpression?
Replies: 2
Views: 532

Re: How to use @KeyPress directly in a ZExpression?

Hi Ats, I'm wondering if I can use the component KeyPress directly in a ZExpression with @KeyPress. That's not possible no. However, even if it were possible i'd instead recommend handling all your inputs ( keyboard / mouse / joystick / touch ) at the start of each frame and storing the results in o...
by Kjell
Tue Mar 16, 2021 2:13 pm
Forum: Tips'n'Tricks
Topic: Hex
Replies: 0
Views: 833

Hex

:idea: Couple of ( unrolled ) functions to convert integers to hex-strings. private string getHex(int n) { return n < 10 ? chr(48+n) : chr(55+n); } string hex8(int n) { int n1, n2; n1 = (n>>00)&0xF; n2 = (n>>04)&0xF; return "0x"+getHex(n2)+getHex(n1); } string hex16(int n) { int n1, n2, n3, n4; n1 =...
by Kjell
Thu Dec 24, 2020 3:43 pm
Forum: Bug reports
Topic: KeyPress gets stuck
Replies: 9
Views: 3103

Re: KeyPress gets stuck

Hi guys,

A good number of the example projects also crash immediately ( including CleanseCube, Steering, TripleE, YakYakReader, ZPong ). Here's the error message for ZBlast.zgeproj

Image

K
by Kjell
Wed Nov 25, 2020 11:30 am
Forum: General discussion
Topic: Populating an array with a random sequence
Replies: 2
Views: 952

Re: Populating an array with a random sequence

Hi jinxtengu, I'm interested in learning how to populate an array with a random sequence of numbers, but importantly I don't want it to repeat any of the same numbers twice. There are quite a few ways to do that, but here's one simple approach: <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplicat...
by Kjell
Tue Nov 03, 2020 12:13 am
Forum: Extensions
Topic: XInput
Replies: 5
Views: 3001

Re: XInput

Hi Ats, I tried making an apk out of the example, but it crashes right from the start. XInput is Windows only ( it's part of DirectX ) .. although unofficial drivers exist for Linux and Mac. I have a noob question: are the two rumbles you activate using the trigger buttons supposed to be left and ri...
by Kjell
Mon Aug 03, 2020 11:50 am
Forum: Extensions
Topic: XInput
Replies: 5
Views: 3001

Re: XInput

Hi Ats, Does it detect digital pad and shoulders buttons too? I haven't tested it with every XInput compatible controller in existence .. but no problems ( for me ) so far :wink: https://i.imgur.com/DA7uOoY.gif Those were not working before. You have a controller that works with the built-in joystic...
by Kjell
Sun Aug 02, 2020 5:02 pm
Forum: Extensions
Topic: XInput
Replies: 5
Views: 3001

XInput

8) For people that also want / need to support XInput* gamepads. Attached is a small wrapper & demo .. the left & right rumble motors are tied to the left & right analog triggers ( for demonstration purposes ). *XInput only supports XInput compatible devices, while the build-in joystick functions do...
by Kjell
Fri Jul 31, 2020 11:12 am
Forum: General discussion
Topic: Filtering flickering on screen
Replies: 2
Views: 1882

Re: Filtering flickering on screen

Hi Ats, I just read that article and find the rendering very smooth. Is it possible to achieve something like this in ZGE using shaders? Sure, you can just ( pretty much ) copy-paste the fragment shader. Thing is though, that this is a technique useful with runtime procedural textures. So unless tha...
by Kjell
Mon Jul 27, 2020 9:45 am
Forum: General discussion
Topic: Mapping a Cube from a texture sheet
Replies: 4
Views: 2355

Re: Mapping a Cube from a texture sheet

Hi Luis, There's a couple of ways to do this, but generally you want to calculate ( or look-up ) the appropriate texture coordinates for each cube "type". See attached file for a basic example. The thing is though .. since Minecraft uses so many cubes it isn't really viable ( performance-wise ) to r...
by Kjell
Thu Jul 23, 2020 9:51 am
Forum: Tips'n'Tricks
Topic: Hot-swap Bitmap
Replies: 5
Views: 8672

Re: Hot-swap Bitmap

Hi Lupo,
Lupo wrote:
Wed Jul 22, 2020 4:30 pm
Would it be easy to load the bitmaps from an external file instead of embedded?
The principle is easy .. but since ZGE doesn't have any image decoders built-in ( aside from a JPG subset ) it really depends on the image format(s) that you want to support whether or not it's easy.

K
by Kjell
Mon Jun 08, 2020 1:25 pm
Forum: General discussion
Topic: Odd rendering errors on Android
Replies: 16
Views: 11766

Re: Odd rendering errors on Android

Hej Ville, The problem iirc is that these lines are not supported on GLES: glGetFloatv(GL_PROJECTION_MATRIX, @Matrix); glGetFloatv(GL_MODELVIEW_MATRIX, @TmpM); Those calls are supported in ES 1.1, so that shouldn't be the problem ( since i think Ats is using "Compatible" GLBase ). Regardless, you sh...