Search found 1739 matches

by Kjell
Sat Apr 10, 2021 10:17 am
Forum: Extensions
Topic: SunVox for ZGE
Replies: 67
Views: 57210

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: 702

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: 57210

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: 481

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: 786

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: 3008

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: 905

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: 2936

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: 2936

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: 2936

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: 1831

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: 2311

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: 8640

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: 11653

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...
by Kjell
Fri Jun 05, 2020 9:21 pm
Forum: General discussion
Topic: are ZGameEditor and the ZGameEditor Visualizer the same thing
Replies: 3
Views: 2022

Re: are ZGameEditor and the ZGameEditor Visualizer the same thing

Hi dytract, im trying to make effects for the zGameEditor Vistualizer, and I wanna know if I can use this SDK to do that. Yup, effects for ZGameEditor Visualizer ( the plugin included with FL Studio ) are created using ZGameEditor. You can start by using one of the "New project" templates that targe...