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.

Work in Progress / Hunt restarted!

Author
Message
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 7th May 2005 07:11 Edited at: 14th May 2005 21:18
Update: now you have more info on the weapon, better sniper zoom, different sounds, and better effects.... time to work on the level and enemies... (go here: http://forum.thegamecreators.com/?m=forum_view&t=53640&b=6&p=0 for the demo)

Update: Here are some new screenies




Your signature has been erased by a mod because it's larger than 600x120...
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 7th May 2005 07:43 Edited at: 7th May 2005 07:44
here are some screenies (excuse their bad quality, i had to save them as gifs)




"Well, if he dies, it'll teach him not to do it again." - Me
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 7th May 2005 10:15
Why?

-This...is my boomstick!
LordoFire
20
Years of Service
User Offline
Joined: 14th Feb 2004
Location: United States
Posted: 7th May 2005 12:21
Hmmm...couldnt you have saved them as jpegs? Oh well, looking nice, waiting for demo

When it comes to programing, I'm on fire!
Formerly known as flame master...Changed name because I do not flame
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 7th May 2005 19:11
yeah, im working on a demo just now, im having some problems though, so unless i get some help from someone i may be a little while..

"Well, if he dies, it'll teach him not to do it again." - Me
Psycho Gary
20
Years of Service
User Offline
Joined: 17th Sep 2004
Location: The United Kingdom....is boring
Posted: 7th May 2005 20:14
ill help, depending on what you need help with

:p
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 7th May 2005 20:27
well, i need to find out which enemy your pointing at, heheh, coz then if i can get the distance between you and that enemy, ill make the bullet move that fast....then the enemy should be hit instantly....any ideas?

"Well, if he dies, it'll teach him not to do it again." - Me
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 7th May 2005 20:44
arrrgh! trying to post a demo and it wont work!!!! ill post it in the code snippets....

"Well, if he dies, it'll teach him not to do it again." - Me
PowerSoft
20
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 7th May 2005 22:46
i actually like the view with dotted gfx. Implement it into your game

[b]PowerScript: Currently Working on Expression Evaluating, thanks alot DavidT for the help
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 7th May 2005 22:59
well, it would look good when you're dieing....



"Well, if he dies, it'll teach him not to do it again." - Me
PowerSoft
20
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 7th May 2005 23:02
no in the game.

[b]PowerScript: Currently Working on Expression Evaluating, thanks alot DavidT for the help
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 8th May 2005 03:10 Edited at: 8th May 2005 03:12
I ask again.... Why?

The help you need, if I can understand you correctly, is you want to know:

Quote: "well, i need to find out which enemy your pointing at, heheh, coz then if i can get the distance between you and that enemy, ill make the bullet move that fast....then the enemy should be hit instantly....any ideas?"


Why do you need to know which enemy you are pointing at? When you fire your projectile, you just check every point on the vector to see if it collides with anything (in this case your monster or whatever you are shooting at) and if it collides, destroy the object.

Take a look at the "INTERSECT OBJECT" command in the help.

Also, check out the "Tutorials" section of your DarkBasic which it walks you thru a "FPS shooter"

-This...is my boomstick!
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 8th May 2005 04:01
1) I wanted to get the distance between the camera and the object that i'm shooting at so that when i shoot at it the bullet gets there instantly, because otherwise, sometimes it doesnt seem to detect collision( that could just be my crappy pc though).

2) I checked the intersect object command and found nothing....

3) Heheh, i've tryed the tutorial, but it wasn't called "FPS Shooter", it was called "Monster hunt", you may be talking about DarkBasic Pro, ive not got that YET, but I'm saving up...



"Well, if he dies, it'll teach him not to do it again." - Me
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 8th May 2005 04:16
Ah.

Ok, I can understand you a bit more clearly now that I realize that you don't have DarkBasic Pro.

Are you telling me that whatever version your using does NOT have a "INTERSECT OBJECT" command?

Otherwise, without vectors (3DMath) I am at a little bit of a loss to help you without REALLY thinking.

-This...is my boomstick!
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 8th May 2005 04:34
ah well, at least you tryed



"Well, if he dies, it'll teach him not to do it again." - Me
Psycho Gary
20
Years of Service
User Offline
Joined: 17th Sep 2004
Location: The United Kingdom....is boring
Posted: 8th May 2005 04:41 Edited at: 8th May 2005 04:47
use an equation to work out the distance between you and the enemy, you should be able to find that somewhere

after, make an object, invisible to the player, and resize it to the distance between the 2 objects...

then, check if the object collides with any background, if yes, destroy the object, if no: damage the enemy THEN destroy the object.... check pic attached if you dont understand cause i suck at explaining... though the pic sucks more...


anyways, i prefer slow moving bullets recently, as when enemies shot you, you need to be able to strafe and dodge them and vise versa

:p

Attachments

Login to view attachments
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 8th May 2005 05:01
nah, its not like that (im not saying this to ruin all that time you put into the fantastic pic *cough* ) but there are lots of enemies, and i wanna know which one im pointing to, but i might use that for something else later..thanks



"Well, if he dies, it'll teach him not to do it again." - Me
fasdfsdaf
19
Years of Service
User Offline
Joined: 17th Jan 2005
Location:
Posted: 8th May 2005 06:36
Do you have pickobject? that would be the easiest way, just search through the enemy objects and it works. If not, then I could make you the DBPro version of it (the one that's coded in DBPro, not C/++)

[me]"My throat froze!"
[other person]"Force quit it next time..."
A.K.A Death Stalker
Psycho Gary
20
Years of Service
User Offline
Joined: 17th Sep 2004
Location: The United Kingdom....is boring
Posted: 8th May 2005 21:48
use object screen x() and object screen y() commands to find out which object is within an area on the centre of the screen, thatll find who your pointing at...

:p
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 9th May 2005 00:29
thats a good idea! thanks Psycho gary..



"Well, if he dies, it'll teach him not to do it again." - Me
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 9th May 2005 02:18
hmmm, wont work



"Well, if he dies, it'll teach him not to do it again." - Me
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 10th May 2005 06:20
any other ideas? perhaps i could use a big object sticking out and if it coliides with an enemy them it can determine who im pointing at...



"Well, if he dies, it'll teach him not to do it again." - Me
Hoopkid ups
19
Years of Service
User Offline
Joined: 24th Nov 2004
Location:
Posted: 10th May 2005 06:54 Edited at: 10th May 2005 06:59
You could use Sparky's Collision DLL, which is available for DBC.
http://forum.thegamecreators.com/?m=forum_view&t=31051&b=5

It basically uses mathematics to project a line and check whether it intersects any objects. It's also very fast.

To use it, you first need to setup all the objects that can be detected using setup object (objectnum),(collisiontype).

Then, cast a line using something like this:

object=intersectobject(0,0,camera position x(),camera position y(),camera position z(),newxvalue(camera position x(),camera angle y(),1000),newyvalue(camera position y(),camera angle x(),1000),newzvalue(camera position z(),camera angle y(),1000),0)

This will project a line from the camera's position forward 1000 units, returning the first object it intersects with.

There are various flags you can set, and all of this is from memory so it will probably take some tweaking to get it to work in your game.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 11th May 2005 01:48
i just thought of how i could do it!!!!

make 5 enemies, them make a cube for each one and posiiton these cubes at the camera (and hide the cubes) and make each cube point towards each enemy, then if the camera is roughly the same angle as one of the cubes then you'll know who your pointing at!!!!

but i think that sparky's collision DLL might be better



"Well, if he dies, it'll teach him not to do it again." - Me
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 14th May 2005 21:19
more screenies added, ill upload the new demo in a second....

Your signature has been erased by a mod because it's larger than 600x120...
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 15th May 2005 03:37
you could have a for next loop so if bulletlife=1 inc bulletposition
if bullet collides with something then stop it.

The happenings of tommorow are behind us now
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 15th May 2005 03:52
its ok, ive got it to work now, i just find out who im looking at and if i shoot it shoots directly at him

Your signature has been erased by a mod because it's larger than 600x120...
Scaleru
19
Years of Service
User Offline
Joined: 11th May 2005
Location:
Posted: 15th May 2005 09:13
I don't mean to sound like I'm knocking back your idea, but won't you have the same problem if you're using invisilbe cubes facing the enemies? They would have to find the angle towards the enemy anyway. Plus, if you have 2 enemies at the same angle, will it kill only one? If so, the one in front or behind? Or will it kill both?

If you don't end up using the DLL (or if you're not yet, I'm still being moderated), then you could use something along the lines of trigenometry to move the bullet by 1 in the direction the character is facing. To make it instantly move to somewhere, you just need to have a loop inside the main loop that prevents the screen from refreshing. Have a look at the code below:



Note that this code only covers the 4th quadrant (or first as DBP sees it, well, it did for me anyway) and you would need to code for each quadrant and each straight line.

The only problem you'll have with this code is that it can be long (you have to organise each quadrant individually unless you create a global sub to handle it all) though it is acurate. Using this method, the only factor is the depth of each object that you're shooting at. This code moves the bullet by 1 each time the loop runs, and thus if your object is thinner than 1, the bullet may pass right through without causing a scratch.

I don't expect anyone to use this code, but its here if you need something new to try.

Login to post a reply

Server time is: 2024-11-23 04:31:31
Your offset time is: 2024-11-23 04:31:31