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.

Author
Message
Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 1st Jul 2009 23:27 Edited at: 19th Jul 2009 18:17
Could people give some feedback and suggestions for the start of my FPS?

Its just boxes at the moment, but Im trying to get the game mechanics right first. There are 3 enemies (red boxes) that will shoot at you if you are in sight.

Please post what you think, any criticism, ideas, or bugs/ problems that you find.

Controls:
WASD : Movement
QE : Lean
Mouse : look
LClick : shooting
RClick : Zoom
Shift : Sprint
C : Raise stance
V : Lower Stance
F : Throw grenade

I think thats it.... Requires Sparkys plugin and IanM Matrix Utility Plugin.

Code below. (update on 17/7/09 18:05 GMT - by my pc)

Cheers
Monk



I like work. It fascinates me. I sit and look at it for hours

The Start of my FPS
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 2nd Jul 2009 03:25 Edited at: 2nd Jul 2009 03:25
Does it require a dll/plugin? It has some commands DBPro doesn't recognize: "sc_whatever"


Open MMORPG: It's your game!
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 2nd Jul 2009 04:21 Edited at: 2nd Jul 2009 04:22
SC = Sparky's Collision

"I have faith, that I shall win the race, even though I have no legs, and am tied to a tree." ~Mark75
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 2nd Jul 2009 04:30 Edited at: 2nd Jul 2009 04:30
The line concatenations don't work in Codesurge. I had to delete all of them. Other than that, good start there! Try some jumping, crouching, and of course health next.



Diggsey: I have a spine and memory, but one memorable guy says he hates me. What am I?
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 2nd Jul 2009 07:45
Screenies. Even screenies with boxes are good.

I'm not a real programmer but I play one with DBPro!
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 2nd Jul 2009 09:29
looks nice, its a good start for an fps. same as bmaczero, but i couldn't kill any of the enemies, maybe thats handy also

Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 2nd Jul 2009 09:41
Thanks guys.

Sorry Riidii, I should have said that it required sparkys collision.

Quote: "The line concatenations don't work in Codesurge. I had to delete all of them. "

Sorry about that as well as there are quite a few of them, but certain lines would be too long without them, possibly, two to three screen widths... =S

And you do have health, you just dont die.

Ill post some screenies when I get back to my pc tonight. =)

Thanks again
Monk

Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 2nd Jul 2009 12:34
Look at the code and from what I can tell, it's a pretty good start, test it later tonight. One thing, which seems to be common these days is the lack of constants and cases which lets face it, save a ton of time and clean up your code. Even at this stage, they should be applied I think.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Softwizz
14
Years of Service
User Offline
Joined: 14th May 2009
Location: U.K.
Posted: 2nd Jul 2009 13:57 Edited at: 2nd Jul 2009 14:00
Hmmmmm
I like it, should speed up the process for my own levels now.
Screen shot for those that want it
The controls are:
wasd to move, mouse to look, LMB shoot, RMB zoom weapon site, shift to run (did i miss any?)
It does need jump and crouch coding into it, otherwise its great


Nothing to see here, move along please.

Attachments

Login to view attachments
Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 2nd Jul 2009 16:17
Thanks very much softwizz for posting that info... stuff that I should have put in the first post. The only thing you missed is that e and q lean right and left.

Sasuke, what sorta things should I be putting in cases and constants? Most of the things in my code are variable so constants sound unsuitable...

Cheers
Monk

Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 2nd Jul 2009 17:00
Well a constant is any variable that never changes through the game so, heres and example of a few:

#constant C_Enemy_InitialHealth 100
#constant C_Err 0.017453292519943295769236907684886 `You'd have to come up with name for this.

`Some you might add in the furture
#constant C_MaxEnemies
#constant C_MaxBullets
#constant C_Player_Weapon_OffsetX

Anything that doesn't change. It may not be an issue that much now but in the future when you've got a ton of code, it saves you having to surf through it just to edit a single variable.

An example of a case (something for the future maybe):



Just an idea, you could even have sub cases for Active state like, walking, running, jumping, falling.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 2nd Jul 2009 18:47
Cheers sasuke

Ill have a look at my code and see if there are any spots which cases or constants can be applied... they sound like they could be useful.

When I get time, im gonna add some more movement stuff and then hopefully some interactivity with the environment, but ill post newer code as it gets done.

Monk

Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 5th Jul 2009 01:03
On the topic of cases, is there anyway to do a less than case?

Instead of having:



have:



Is that possible? Heres the part of my code Im thinking of doing it for....




Cheers

Monk

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 5th Jul 2009 01:26 Edited at: 5th Jul 2009 01:26
I believe this works:





Diggsey: I have a spine and memory, but one memorable guy says he hates me. What am I?
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Jul 2009 01:49
Quote: "I believe this works:"


It certainly does - I never knew that. I've always used "case default" to cover all the non-specific cases - as in the following snippet which uses your suggestion as well:

Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 5th Jul 2009 12:32
Thanks guys, that makes it a bit simpler now =)

Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 6th Jul 2009 23:35 Edited at: 19th Jul 2009 18:18
Right, Ive got an updated version, has both jump and crouching and crawling code. Its taken me a while so that the jumping allows you to land on boxes =)

Please post what you think, any criticism, ideas, or bugs/ problems that you find.

Controls:
WASD : Movement
QE : Lean
Mouse : look
LClick : shooting
RClick : Zoom
Shift : Sprint
C : Raise stance
V : Lower Stance

I think thats it.... Requires Sparkys plugin and IanM Matrix Utility Plugin.

Version with line concantenations (Easier to read)



Version with out ... symbol



Cheers
Monk

I like work. It fascinates me. I sit and look at it for hours

The Start of my FPS
Softwizz
14
Years of Service
User Offline
Joined: 14th May 2009
Location: U.K.
Posted: 9th Jul 2009 14:38
This is better, however the weapon collision needs improvement as it passes through objects, see screen shot.

Nothing to see here, move along please.

Attachments

Login to view attachments
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 9th Jul 2009 21:29
No collision altering needed, just disable object zdepth.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 9th Jul 2009 22:20 Edited at: 9th Jul 2009 22:32
What will that do?

Edit: Just tried it, cool trick, One that I shall remember. However Im just struggling with a bug at the mo, one where if you run at two blocks next to each other, you somehow end up inside one, or on top of them, even though you only pressed W or A or S
In places like here(see screenie - co-ords 250,550) if you sprint at it, you just go straight over....

Monk

I like work. It fascinates me. I sit and look at it for hours

The Start of my FPS

Attachments

Login to view attachments
Sasuke
18
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 9th Jul 2009 22:45 Edited at: 9th Jul 2009 22:46
Can't test it now, but does this have anything to do with the collision forcing itself through objects. An example, if you collide with something you get pushed back out from the object, but if there was an object in the place of where you would get pushed to you would be constantly colliding along all axies forcing you to get stuck or flung out of the objects your in.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 9th Jul 2009 23:27
That sounds similar to what I reckon is happening... I just need to find out why its doing it.

Cheers Sasuke

Monk

I like work. It fascinates me. I sit and look at it for hours

The Start of my FPS
Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 14th Jul 2009 18:44
Fixed that now =)
There were occasions where you could run into a block and then the sliding collision would position you inside of another block which collision would not be detected. This was solved by putting a loop in to check if the collision was causing any more collisions.

New code:



I like work. It fascinates me. I sit and look at it for hours

The Start of my FPS
Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 17th Jul 2009 20:05
Grenades!! =)

Ive added grenades that can be thrown by holding down the f key, will explode and can kill you or the enemy (sets health to 0 but I havent made a player death screen yet).

Please post what you think, any criticism, ideas, or bugs/ problems that you find.

Controls:
WASD : Movement
QE : Lean
Mouse : look
LClick : shooting
RClick : Zoom
Shift : Sprint
C : Raise stance
V : Lower Stance
F : Throw Grenade



I like work. It fascinates me. I sit and look at it for hours

The Start of my FPS
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 19th Jul 2009 15:34
Quote: "sets health to 0"

It should just minus a number from health depending on how far away from the grenade you are.

For example, if your right on top of it, then minus say 80 from health. If you're far away then minus say 20.

Your signature has been erased by a mod because it is way too awesome!
Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 19th Jul 2009 16:14
Yeah I am gonna add a little bit where it judges how much health you lose based on how far away you are from the grenade, but I just wanted an easy way to test whether it was working.

I like work. It fascinates me. I sit and look at it for hours

The Start of my FPS
Jammy
21
Years of Service
User Offline
Joined: 15th Jan 2003
Location: Scotland
Posted: 19th Jul 2009 17:45 Edited at: 19th Jul 2009 17:47
Hi, looks very good so far.

But, I get a

Quote: "Could not determine parameter type of 'vector exist(8)' at line 670."
error,and the same for vector exist(9), if i comment them out it seems to run fine, plugin ?, I need an update ? I am using DBP 1.074 and DBP editor.

I Like how you can lean, perhaps a slight camera tilt would add to the effect ?

Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 19th Jul 2009 18:17
Thanks for looking at it Jammy.

Im only using v6.9. I just had a look in the help file for vector exist command and it came from IanM utility plugins.

I tried adding a camera tilt to the lean, but I couldnt figure out how to add a local z axis rotation to the camera. I can do it with objetc using limbs, but cameras dont have limbs, and their z rotation seems to be global which messes it up.

Thanks for the feedback.

Monk

I like work. It fascinates me. I sit and look at it for hours

The Start of my FPS

Login to post a reply

Server time is: 2024-04-24 12:15:28
Your offset time is: 2024-04-24 12:15:28