Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Particles, and errors.

Author
Message
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 2nd Jan 2006 08:19
Working on particles, taking them for a test spin in DBP trying to get them working the way I want them to. Trying to reposition an emitter realtime, and its not going to well. Keep getting a "DBP Encounted a Physics Error" message when I try to respawn the particles. The only way to delete all the particles from an emitter (that I have found) is to DELETE the emitter, otherwise the already emitter particles will have to die according to their timer (not useful for a particle cursor)

Now, it may be late and I may be missing something obvious (or doing something stupid, probably that), thats where everyone else comes in. What am I doing wrong here? Im no expert in particles, but I know physics errors tend to be bad...Anyone know a workaround? Heres full source code (no images included, they come with SmartParticles though.)



Any help would be appreciated here. Thanks guys, Happy Holidays and New Year

RPGamer


Join Our Forums and get game updates faster!
x1b
20
Years of Service
User Offline
Joined: 19th Sep 2004
Location:
Posted: 2nd Jan 2006 08:32
I gave up on struggling with the Cloth & Particles for that same reason. Everything spat out a Physics Error

- Do it, Do it Right, Do it right now..
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 2nd Jan 2006 22:57
Only other way I can think of doing this is a emitter at each monster, then just hiding the non-used emitters, but that would still present the problem of the "lingering particles"

Any ideas?


Join Our Forums and get game updates faster!
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 3rd Jan 2006 03:16
Anyone...anyone have an idea? Getting realllly furstrated


Join Our Forums and get game updates faster!
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Jan 2006 13:30
Hi RPGamer,

firstly...apologies! I have seen your messages on my screen, I just haven't been there when you left them

I don't know what's causing the problem, but you have an issue with the logic somewhere. I didn't look in too much detail, but I fixed it in your positionEmitter() function. All I did was check if the object already existed (standard DB Pro command), and deleted the associated Emitter, Effector/Collider if it did...



Hope that helps!

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 3rd Jan 2006 21:06
I had the process in two different functions because I was trying to isolate the problem. I knew that the deleting of the emitter wasnt a problem, so it was isolated to the creation of an emitter in a LOOP, which must be a DBP Problem. Any ideas on way around this?


Join Our Forums and get game updates faster!
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Jan 2006 22:49 Edited at: 3rd Jan 2006 22:52
It hasn't been a problem for me in SmartParticles, and that is constantly deleting and recreating emitters. Every time you change the parameters, other than rate, it deletes and recreates the emitter.

I would suggest doing exactly what I did...always check that the object doesn't exist before creating it. make your own version of each CREATE command as a function and add the extra checking code.

[EDIT] By the way, I recompiled SmartParticles in 5.9 to see if that was a problem, but it works fine.

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 3rd Jan 2006 22:52
Alright will do. Thanks BV


Join Our Forums and get game updates faster!
Darkbasic MADPSP
19
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 3rd Jan 2006 23:36
Shame i don't have the cloth and particles pack

Experienced DB http://www.greatgames3d.com (work in progress site)
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd Jan 2006 23:37 Edited at: 3rd Jan 2006 23:37
I've made a habit of making my own LOAD and CREATE routines for everything. The best example is loading images. If a user deletes a file, or a file gets corrupted it completely screws your whole game. But if you make a loadImage(file$,num,mipmap) function, you can display a message instead, and replace the image with a white square until the user fixes it.

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 4th Jan 2006 00:01 Edited at: 4th Jan 2006 00:08
Well its working now, the deleting + respawning, but it doesnt seem to be creating the emitter at the new coordinates, rather just at 0,0,0 or whatever the defaults are. Even if I plug in some insane coordinates, it still appears at the origin...odd. I'll keep playin with it.


Join Our Forums and get game updates faster!
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 4th Jan 2006 08:50 Edited at: 4th Jan 2006 08:55
Aah...that old chestnut! Now this is a definite bug that never got fixed. The thread is a little confusing, as people didn't quite understand the problem at first...

http://forum.thegamecreators.com/?m=forum_view&t=52261&b=15

The solution is to position the emitters every cycle.

The bug report could do with a bump if you want to confirm you have the same issue

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 4th Jan 2006 21:10
Done, bumped. Oh well, Ill try updating every cycle but ugh I wish that wasnt the only way


Join Our Forums and get game updates faster!

Login to post a reply

Server time is: 2025-06-10 05:29:53
Your offset time is: 2025-06-10 05:29:53