123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|118|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> FPS examples?

Page : 1 2 Next
Prev
Mon, 06 Aug 2007, 15:21
Erebel55
Anyone have any good FPS examples that were made in B3D that I could check out? The main problem that I am having right now is placing the gun in front of the camera and having it look the way I want. DiabloDevil already gave me a few examples...I'm just looking for some more. Thanks in advance.

-=-=-
Lava Monkey
https://play.google.com/store/apps/details?id=com.lvm.lavamonkey
Mon, 06 Aug 2007, 18:34
magicman
any chance we can see your code and try to fix it?

also heres something i wrote up real quick, it may help.



-=-=-
Stuff... Yeah...
Mon, 06 Aug 2007, 23:32
JL235
Here is a FPS example I didn't send you, my FPS. The way I set up the player worked, but I made me feel like I was short and fat.

On my PC it refuses to run, but I think that is a compatibility problem. I did have it running a few months ago on another machine so I'm pretty certain it does work.

link!
Tue, 07 Aug 2007, 08:18
Erebel55
Thanks for the code magicman even though it won't be much help But, I finally got my gun placed the way I like it so that is good. Now I am just having trouble with a jump/collision problem. When I make the player look up high into the air and I run towards a bunker and jump the player can jump over a lot of bunkers he is not supposed to be able to, ( this isn't because his jump is set to high). I think the problem is that my level is all one .b3d model, it consists of the ground and then the bunkers placed on top of it, therefore when I do collisions between the player and the bunker it is still set to slide. Hmm that was a mouthful and I probably confused most of you guys. Well thanks for another example DiablosDevil, I will check it out

-=-=-
Lava Monkey
https://play.google.com/store/apps/details?id=com.lvm.lavamonkey
Tue, 07 Aug 2007, 08:35
power mousey

thank you for asking, Erebel55.
True!

and thank you magicman for showing him, others
and I some code in Blitz 3d.
Seriously, this will come in handy.

And I have to admit and confess...I'm ever learning
and re-learning from people. All the time. True.

cheers to you both
power mousey
Tue, 07 Aug 2007, 09:59
JL235
Here is another FPS example. It's a part of a tutorial on a site (somewhere) where he goes through making this with you.


Enjoy!
Tue, 07 Aug 2007, 11:06
Erebel55
Thanks for the example and if anyone wants to see the game so far here is the link.

www.bestsharing.com/files/JmBMb315856/BackYard%20Paintball.rar.html

-=-=-
Lava Monkey
https://play.google.com/store/apps/details?id=com.lvm.lavamonkey
Tue, 07 Aug 2007, 17:51
magicman
hey Erebel, thats coming along nice, and i think i found your problem with the jumping over bunkers when you look up. your moving the camera and not the player. the camera is a child of the player so you shouldn't be moving the child but the player itsself. if you go through and change the parts were you move the camera from "playercamera" to "player" it should work.

|edit| Oh, also, your going to need to change the part were you turn the camera from



to



otherwise it gets all messed up.

|edit|


-=-=-
Stuff... Yeah...
Thu, 09 Aug 2007, 16:56
Erebel55
Alright, thanks for the help magicman. Here is another update. I am having another problem, seems like there is going to be a problem with every update Alright, so I need my player to be able to shoot his paintballs. To do this the player can use both mouse buttons. With my code right now I made a cube that is positioned inside of the gun barrel, you can see the cube if you comment out the line that says this "EntityOrder tippman98c,-1"
When the player clicks one of the mouse buttons I call the Shoot() function and it creates the paintball at the cubes coordinates and rotates the paintball to the cameras current rotation, I then update the paintball. Now here are some of the problems...1) By the time we can see the paintball it is too far in front of the camera and it doesn't look like it is coming out of the gun very well. 2) When I am running sideways the paintball seems to look funny as it is shot (hard to explain). 3) The paintball doesn't seem to go exactly where I am aiming when I'm close to a bunker, I tried to fix this by moving the crosshair to the right but it's not very good right now. That is about all I can to complain about right now, so..any help is greatly appreciated. Thanks everyone

www.bestsharing.com/files/f0kXVAF317264/BackYard%20Paintball%20Update.rar.html

-=-=-
Lava Monkey
https://play.google.com/store/apps/details?id=com.lvm.lavamonkey
Fri, 10 Aug 2007, 06:42
Blitz3Dman
Awesome game! I can't wait for it to finish!
Fri, 10 Aug 2007, 15:42
Erebel55
Thanks for the words of encouragment man
Fri, 10 Aug 2007, 18:10
Erebel55
Here is a new update to the .bb. Doesn't really fix anything though, could really use some help, thanks everyone

www.bestsharing.com/files/du1GSH8317881/new9.bb.html

-=-=-
Lava Monkey
https://play.google.com/store/apps/details?id=com.lvm.lavamonkey
Fri, 10 Aug 2007, 21:05
magicman
ok, 1)I dont really see that problem happening. 2)put the "if mousehitblahblahbalh shoot()" before the player movement in the check keys function. 3)that happens because the bullet is moving towards the center but since it dosnt start out in the center it cant get there in the short amount of time before it hits a wall. i think the only way to combat that would be to use some sort of picking function, not really sure though. I dont think any of that was really helpful but at least i tried!

-=-=-
Stuff... Yeah...
Fri, 10 Aug 2007, 21:25
power mousey

hey Erebel55,

keep it coming, keep it going,
and keep it coding. True!

can't wait for the finished game.

cheers
power mousey
Sat, 11 Aug 2007, 06:10
Erebel55
Hmm it still seems to mess up even when i move the "if mousehit then shoot line around". But thanks for the reply magicman and power mousey. This is bloody hard though

-=-=-
Lava Monkey
https://play.google.com/store/apps/details?id=com.lvm.lavamonkey
Sat, 11 Aug 2007, 11:49
Erebel55
Well, since I am not making any progress at the moment, I was wondering if anyone has any kind of linepick example.

-=-=-
Lava Monkey
https://play.google.com/store/apps/details?id=com.lvm.lavamonkey
Sat, 11 Aug 2007, 12:14
magicman
i never said it was going to look much better, but if you noticed, the bullet is now created at the barrel of the gun instead of off to the side when you strafe. or at least it is for me, mabey i did something else that i just dont remember.

-=-=-
Stuff... Yeah...
Sat, 11 Aug 2007, 15:18
power mousey

you'd expect it to be easy??
Sometimes It Don't Come Easy.....like that song
by Ringo Starr.
Yet, whats the point if it does come easy--
no learning, no trial and error, no straining the brain.
Might as well just use that FPS gamemaker from the game creators over at the Dark Basic site.

I admit I'm out of your league and nowhere
have the knowledge,wisdom nor skills for these First
Person shooter games. Not yet.
But hey, when I'm ready watch out!!
I'll leave your Quakes and Halos in the dust.
Besides, right now I like doing these animation scenes
in Blitz3d. When I'm ready I'll take it to the next level.

True!

cheers,
power mousey

Sat, 11 Aug 2007, 15:49
Blitz3Dman
I find that 3.5 is a better bullet speed.

Right now they are a bit slow for bullets

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Sun, 12 Aug 2007, 10:57
Erebel55
Well it isn't a real bullet, it is a paintball, and they fly at 300 fps in real life.

-=-=-
Lava Monkey
https://play.google.com/store/apps/details?id=com.lvm.lavamonkey
Sun, 12 Aug 2007, 14:28
Blitz3Dman
err... paintballs.... I suppose you might know better then. Never measured the speed of a paintball.

-=-=-
There are 10 kinds of people in this world -

( Insert 16 remarks about to what extent people know hex here )
Mon, 13 Aug 2007, 10:08
Teasy
Trying this thingy out in practice is even more funny than I originally imagined
Here's some of the things I came up with.

By changing the speed from 0.5 to 0.85,
and adding a little gravity,
and increasing the size of the paint ball
(i used 0.015 rather than 0.0015),
it already looks a lot more like real paintball
(to me, that is )

When you change the MouseHit(2) to MouseDown(2)
you can see how the point of fire is maligned (when firing),
e.g. simply changed by altering the initial ball offset
depending on the player's movement.

The last thing that I find missing is
adding the player's velocity to the ball's velocity
during the ball's trajectory,
for example by precalculating the effective XYZ velocities,
like when you're strafing right,
the ball is supposed to have this same strafe velocity added to it
(e.g. moving right too).

You can ofcourse add air resistance but I think that's perhaps at a later stage
If you want my modified version of your code,
let me know how you want to receive it
Tue, 14 Aug 2007, 16:57
Erebel55
Wow, a very useful reply Teasy And yes I would very much like to see your modified code, you can either upload it somewhere and post the link or you can just post the code here, whichever you prefer. Thanks for the help mate

-=-=-
Lava Monkey
https://play.google.com/store/apps/details?id=com.lvm.lavamonkey
Wed, 15 Aug 2007, 07:15
Teasy
No problem, Erebel55
I'll inline it here..



The code for adding the player motion vector to the ball vector is not in there though,
but there are like 1000+1 ways to do it.
I'm not familiar with all the handy Blitz3D trigonometry functions,
but these can possibly make it even easier
E.g. ball\xyz = xyz( ball_initial_speed , ball_direction ) + player\xyz

Sun, 19 Aug 2007, 11:38
Erebel55
Well I have been messing around with the code, and your paintballs were set too big and too slow, but I fixed them to how I like them. But I have been trying out things on how to add the players velocity to the balls. So this is what I tried, I just added a line in the directional keydown section for the player. For example If keydown(movedn)...move player and MoveEntity b\mesh,0,0,-.15

But then I found out that if I do it this way the paintball will continue to move with the player even after it has been shot. So I added a "flag" so that the ball is only moved when the player first clicks the mouse. I have included my code, but I don't think I'm doing it right, because it still looks weird when you are strafing left. Hmm I'm starting to think that I approached this wrong. Any help is appreciated, thanks



-=-=-
Lava Monkey
https://play.google.com/store/apps/details?id=com.lvm.lavamonkey
Mon, 20 Aug 2007, 07:39
Teasy
Yeah I used the big and slow balls to see the speed,
gravity, impact, trajectory etc more clearly.

What I usually do when you fire a ball,
is determine the initial XYZ velocities.
Now, I'm not sure how you want to do this in 3D,
but it's something along the lines of this:


So you can keep the XYZ velocities inside the ball's object:


Then, when updating each ball,
just add the velocities to the current position,
in whichever way feels most comfortable to you:


I think you can also easily translate the XYZ velocities to/from various scales using Blitz3D's commands like EntityPitch etc you're already using.
Page : 1 2 Next
Prev