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.

Dark Physics & Dark A.I. & Dark Dynamix / (Dark Physics) Creating jedi-like powers. How?

Author
Message
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 3rd May 2007 21:50 Edited at: 7th May 2007 15:02
Hi all.

I'm developing an physics game using Dark Physics. But I'm stuck. How do you create 'force powers', as the one in 'Jedi Knight 2' and 'Jedi Knight 3'? I've done it before, but now it doesn't work. This is my code for the push force:
. The array "objects" have 301 elements, and store the object numbers. The object number is also the position in the array. This makes it easy to check if the object you're aming at are dynamic. Here is the code where I create the objects:
. Can anyone help me with why the code does not work? Why can't I push an dynamic object?
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 7th May 2007 15:11
Ok, I've tried a veriety of things, but I know one thing: The program reaches the code (I just put an 'end' above the 'endfunction', and the progam ended), so it must be something inside. The code has been changed to this now:
, but I've tested this:
and this:
, but none of that did any kind of effect. It's like it reaches the code, then go through it, but just don't care to do anything. Weired. Can anyone help me? Is it something wrong with the code, or might the problem be someplace else? If you need more info, please tell me, and I'll either explain or post more code.
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 8th May 2007 04:01
The gravity function at the end of this snippet should be a good basis to apply your "Jedi Powers"


I hope you find this helpful

Codger

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 8th May 2007 10:19
Thanks. I can't take a look at it right now, but in two days I got the time.
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 10th May 2007 21:44 Edited at: 10th May 2007 22:02
Ok, it works now. But it's not perfect. There is a reason for that: The objects are kind of static. They move but never rotate. Here is my code för pulling and pushing:
. But I don't think the problem is there. Here is the code that contains the Dark Physics commands:
. I wonder if you can see why they don't rotate. Please help me.

EDIT:

Here is the entire source, in case you would need it:
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 11th May 2007 03:58
I am unable to compile the "entire source" it has some commands not available to me the "T" function sets so i am unable to help.

The second snippet has functions missing.


Perhaps you could review the second snippet and repost?

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
White knight
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location:
Posted: 13th May 2007 18:36 Edited at: 13th May 2007 18:42
i think it's gibbles plugin codger but i am not for sure i looked for TPutFloat function in the forums and tha's what i found.Or maybe Tempest.dll http://forum.thegamecreators.com/?m=forum_view&t=73665&b=5 if you need the plugin it's here

new learning center comming soon http://911.bounceme.net/
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 14th May 2007 10:08 Edited at: 16th May 2007 16:58
It's tempest. Sorry for not commenting that I use it. But you can just take away those commands, they do nothing important at the moment (they are just for when I'm implementing multiplayer, which is not right now).

EDIT:

This is what I mean with that the objects do not rotate. It's rare that this happens (they usually just stay in the same angle all the time), but when it happens they get stuck in this angle as well. On the image (attached at the bottom of the screen) you se an object standing in an wiered way. Dark Physics SHOULD make so it turn right and everything, but it doesn't. The object has the same angle all the time. Can anyone tell me why?

Attachments

Login to view attachments
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 16th May 2007 20:44
Sorry for the double post, but I think I found the problem. It's the static and dynamic friction that is 0, and I think it might have something to do with it. However, if I make them any heigher, it will conflict with the force powers. Because suddenly the friction gets in the way of the forces, that I use to push or pull the object (as in Codgers code). The objects are not affected in the right way if they are standing on the ground, if I make the friction heigher then 0. So I need an alternative solution.

I've been working on makeing it work with the 'phy set rigid body linear velocity' command, but that does not work at all... The thing is that I've made it work that way before in my 'Sandbox" program. Here is how I did it then:

And here are the current code for the forces:

Can anyone help me? How do I make so the force powers work, without using forces? Or is there a way to use forces without having the problem I'm having?
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 24th May 2007 11:29 Edited at: 26th May 2007 10:57
No one knows how to create these powers without having to worry for the friction?

EDIT:

Ok, I've done it. It was not very hard, I just didn't do it right the previous times. Anyway, here is the code if you're interested.



Thanks everyone for your help.

Login to post a reply

Server time is: 2024-03-29 12:49:08
Your offset time is: 2024-03-29 12:49:08