Search found 609 matches

by Ats
Thu Apr 20, 2023 2:02 pm
Forum: Feature requests
Topic: Edit XML with an external editor
Replies: 13
Views: 62357

Re: Edit XML with an external editor

Can you elaborate on what difficulties you're experiencing because your project is so huge? Mostly, having to deploy the component tree in order to select the right thing to display a lot of lines of code into the little ZGE code editor. And if I edit anything in the XML editor, it will entirely cl...
by Ats
Thu Apr 20, 2023 9:08 am
Forum: Feature requests
Topic: Edit XML with an external editor
Replies: 13
Views: 62357

Re: Edit XML with an external editor

Hello. My game is slowly becoming huge for only one file, even if I comment everything in order to find what and where things are... I'm planning to write a simple batch file to append several txt files into one final xml project, and so I was wondering if it would be possible to build a zgeproj wit...
by Ats
Sat Feb 18, 2023 8:25 am
Forum: General discussion
Topic: Recycling models, is it worth it?
Replies: 6
Views: 7536

Re: Recycling models, is it worth it?

hahaha, another simple yet super explicit and colorful example of yours. Thanks. For the benchmark, I'll do that when I'll finish fusing all the FX into one Model, now that I know Category can be changed without breaking everything. I'll just have to switch on/off the spool and run some tests. Regar...
by Ats
Fri Feb 17, 2023 7:21 pm
Forum: General discussion
Topic: Recycling models, is it worth it?
Replies: 6
Views: 7536

Re: Recycling models, is it worth it?

Thanks Kjell. And with the addition of ModelState, the BoxReset in Box Model can then call substates with their own initialization, which is pretty neat. <OnSpawn> <ZExpression Name="BoxReset"> <Expression> switch(CurrentModel.Box_Type) { case 0: @SetModelState(State:State_Box_Cube); break...
by Ats
Fri Feb 17, 2023 10:27 am
Forum: General discussion
Topic: Recycling models, is it worth it?
Replies: 6
Views: 7536

Re: Recycling models, is it worth it?

It freezes for a few frames on some recent phones when I spawn more than 30 enemies at a time... So I made a little working example, but I'm not happy with setting the Thing parameters in the general activateThing function. I would prefer them to be set in the model, so I don't have to search everyw...
by Ats
Thu Feb 16, 2023 7:00 pm
Forum: General discussion
Topic: Recycling models, is it worth it?
Replies: 6
Views: 7536

Recycling models, is it worth it?

Between the enemies, the buildings, the weapons and the debris, I have a lot of models being created and destroyed all the time in my game. So I was wondering if I should keep it that way, or if it would be better to recycle them. I guess it would consist of adding the created models in an array, an...
by Ats
Wed Feb 15, 2023 4:51 pm
Forum: Bug reports
Topic: Why asking for save after building for Android?
Replies: 0
Views: 34343

Why asking for save after building for Android?

It's not really a bug, but rather an improvement, as the current behavior is a bit weird: Here's the repro: Open a project Don't change anything Build for Android Try to close the project Result: it's marked as changed, even if that's not the case, and it wants to be saved. That does not happen when...
by Ats
Tue Feb 14, 2023 9:30 am
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 270662

Re: 3D Physics with ZgeBullet

So in case you need to know which model a body belongs to on collision, make sure you use zbtSetUserModel so Bullet can tell you. But that is my whole problem: Only zbtRayTest returns a collision object, that can be reverted to a Model, using zbtGetUserModel (and obviously zbtSetUserModel when I at...
by Ats
Mon Feb 13, 2023 6:54 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 270662

Re: 3D Physics with ZgeBullet

Oh, you are totally right, now I understand my mistake :lol: But still, I was expecting ZgeBullet to be capable of retrieving what objects are simply colliding, since it can do that with a zbtRayTest followed by zbtGetUserModel. Right now, since there are a lot of lasers, enemies and other objects, ...
by Ats
Mon Feb 13, 2023 4:41 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 270662

Re: 3D Physics with ZgeBullet

Not sure if you're referring to the ZgeBullet docs or the ZGameEditor docs, but this should be common knowledge in ZGE. I'm referring to the ZgeBullet doc. Since it's an external library, I didn't expect the zbtIsCollidedWith function to only work with reference model. For the rest, I'm not sure to...
by Ats
Mon Feb 13, 2023 9:53 am
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 270662

Re: 3D Physics with ZgeBullet

Oh, all right. So with models spawned as reference, the test is running correctly. It's good to know, as it isn't explained in the doc. But that doesn't help me find when a (clone) laser has touched a (clone) enemy. Actually, I test if the laser has touched something (enemy, wall...) and then the la...
by Ats
Sat Feb 11, 2023 10:28 am
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 270662

Re: 3D Physics with ZgeBullet

After a bit of tests, the if ((coA == objA && coB == objB) || (coA == objB && coB == objA)) { never works, and the problem seems to be coming from btPersistentManifold* pm = gCurrentWorld->dispatcher->getManifoldByIndexInternal(i); btCollisionObject* coA = const_cast<btCollisionObjec...
by Ats
Wed Feb 08, 2023 9:14 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 270662

Re: 3D Physics with ZgeBullet

Hello, I'm back to ZgeBullet, and I'm currently trying to simply detect what object my sphere is colliding with. The notice looks pretty straight forward: @fn int zbtIsCollidedWith( xptr objA, xptr objB) @brief Are the specified collision objects collided? @param objA pointer to collision object A @...
by Ats
Sun Jan 08, 2023 6:29 pm
Forum: General discussion
Topic: [Solved] Detecting generic Gamepad D-Pad on Android
Replies: 9
Views: 11237

Re: Detecting generic Gamepad D-Pad on Android

Everything was broken, so I reverted all, but it turns out it was because I removed one android lib by mistake... So, with MAX_AXES = 10; and the addition of NativeSetJoyAxisValue(controllerNb, 8, // MotionEvent.AXIS_HAT_X event.getAxisValue(MotionEvent.AXIS_HAT_X)); NativeSetJoyAxisValue(controller...
by Ats
Sat Jan 07, 2023 9:28 pm
Forum: General discussion
Topic: [Solved] Detecting generic Gamepad D-Pad on Android
Replies: 9
Views: 11237

Re: Detecting generic Gamepad D-Pad on Android

Maybe I need to add the MotionEvent.AXIS_HAT_X and MotionEvent.AXIS_HAT_Y values in Zge.java ? private native void NativeSetJoyAxisValue(int joyId, int axisNr, float value); (...) // joystick if ( (event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK ) != 0) { int controllerNb = getControllerNu...