BGE FPS Template 12/28/06

Look everyone…this is Social trying to get back on Santas nice list…

lol. Nice work man. I will check it out when I get home.

One more question…Where is the Mmorpg template??? lol

I’m trying to implement an ammo system, in case anyone was wondering. Once I figure out python, I’ll upload it. Thank you again, Social. You gave me incentive to look into python :).

Ammo system? One of my games in progress does have an ammo system where you can’t shoot when the counter goes to 0 and you get 50 more bullets after running into a pink’ish box.

This is a simple ammo system utilizing properties and it doesn’t really use python at all.

Judging from the screens it does look promising. Maybe Erwin can use it as one of the 2.43 demos.

Well… I finished my ammo system. When your ammo reaches “0”, press R to reload, and you magazine count decreases. There is a full magazine just to your left, and can be picked up when you have 4 or less magazines (just walk over it). I hope it’s useful…

It is certainly open to Modding, and I hope to see it evolve into something greater.

http://www.box.net/public/9lix010f27

P.S. The only reason it uses python is that the whole template is python oriented, and I decided that python would be the simplest means to build my ammo system.

Me too.

As for your ammo system:

There seem to be some problems:

  • After unclicking and clicking again, the ammo counter skips a few numbers when counting. (Try turning off true level trigger pulsing)
  • When mags reach 0, the gun won’t fire even though the last clip is supposed to give you more ammo. Actually, the ammo counter shows a full 50 load, but if mags are 0 it just ignores the ammo.
  • It’s all a little too sloppy. Since you are already going with python, there is no need to use logic bricks to modify properties. That just needlesly clutters things.

# To modify properties through python:

# Get access to the relevant object:
ownAmmo = GameLogic.getCurrentScene().getObjectList()["OBAmmo"]

if fire:
    ownAmmo.Text -= 1
if reload:
    ownAmmo.Text = 50

# Don't waste time activating (cluttering) actuators just to modify a prop.

That said I really appreciate your work here. I love the whole “clip dropping” action. Just fix a few things and it should be great.

Also, if you could just get the counters to follow with the camera as it zooms in, that would be great.

// NOTE //

For everyone planing to contribute, please test your .blends as much as you can before uploading. There is no need to rush things. If you are not all that familiar with BGE python, don’t go after larger modifications that require python.

Please, clean up after your additions. Don’t leave unused bricks lying around. If there is something that is not being used by anything in the template, it shouldn’t be there, so just get rid of any leftovers you may have made and forgot about.

Do what you can do (no need to do something elaborate if you can’t), any modification (no matter how small) will be accepted as long as it works properly.

Also, please set the blender windows as they were initially set up in the original template before uploading. (logic buttons on bottom, 3d view on top right, text editor on top left). I’m too lazy to press CTRL + UP, and even after that I have to fine tune the windows, so for future reference please try to avoid the whole “make single window full screen” deal.

Nah, I don’t really need to, since I can just scare santa into giving me anything I want.

Either that or Social can just program his own santa = )

#Social’s Santa
gift = 0
Do
socialsgifts = gift+1
Loop

http://www.maj.com/gallery/Foshizzle/Shblender/screenshot.jpgI’ll try to improve upon the ammo system once I get back from vacation. Thank you very much for the support, and I hope I can repay the favor once I upload the improved version (that is, unless someone already improves it before I get back.) :slight_smile:

Edit: I decided to update it before my vacation. C&C highly welcome. I put some a lot of my time into this, so even if you don’t appreciate it, enjoy!. http://www.box.net/public/60bf4fgffg

(I updated the clutter, ammo problem, bullet hole graphics, and HUD. I’m sorry if you liked the old bullet holes better, I just thought that my new ones were an improvement :slight_smile: )

Lol, could that screenshot be any bigger (nice smily)

Ok, you still left some work for me (your still using property sensors, instead of the property itself, and you left the property actuators hanging around), but that’s ok.

I’ll do that myself tommorow, and have this whole thing cleaned up a little over all.

That said…wow, this is the best addition yet. Those bullet holes are awsome (mine were pretty much a fast google search).

I thank you blender_rox, this is great work. I hope others follow your example.

I edited the post with the screenshot and uploaded a new(er) version. It doesn’t change much, just window format, adds some sparks on the magazines, and adds reloading to the control list.

So before you update the properties, make sure to download the new(ish) version:
http://www.box.net/public/60bf4fgffg

Anyway, thank you very much for the support. I hope I can improve the Template again in the future.

Little Update:

Hey, brilliant template social! and great improvement Blender_Rox, your ammo system is really cool!

Well i improved the zoom feature ever so slightly, now when you zoom your gun will follow as if in real life when you want to look at long range, i was gonna add in a scope but i haven’t got around to it yet, i will try to add it in though :wink:

Pic:
http://img405.imageshack.us/img405/5705/zoomtn1.jpg

File: FPS_Template3

Brave.

just FYI, I think it should say rounds and magazines, rounds being a single bullet in a casing with gunpowder, and a magazine being multiple rounds in a clip (yay for Wikipedia!)

I liked your FPS template Social!! very good starting point for people interested in the BGE… impresive! thanks for putting it out there.

Social, I must say I’m impressed, but I found a problem. When you crouch your colision doesnt actually change so the feature I useless. Otherwise the template is great and will help tuns of bge users with their projects.

Got it. It was a little difficult to track down all the loose ends, but I went over everything you did (I hope), and I cleared out quite a few things. If you are interested, you can see the new changes by downloading the template from the main link.

I think you would find it usefull, for reference if nothing else.

Thanks again. I and the community appreciate what you are doing here. Heh, it’s like a christmas miracle or something, never thought the template would improve like this so fast.

braveheart>

Nice work, it’s in the main link along with blender_roxs’ addition.

I had to change a few things around. Nothing major, just extended the animation to 10 frames instead of 5, so that it goes in step with the zoom feature.

Also the end frame for the gun was changed, so that you can see more rifle. It feels great

Try it out.

gomer>

Yea, good eye, that is a problem. As you can see I didn’t really plan much on that.

I think shrinking the “viewer” cylinder by half, and then parenting a similar mesh to the “knees” empty would do the trick here.

If anyone has time, it’s something you can definitelly, play around with.

Everyone>

First post has been updated, as has the main link with the .blend that includes all these changes.

Thank you all for your great support. This is power of the community at it’s best here.

found another glitch… try rapidly clicking the right mouse button. the ammo counters will get off sync with the zoom…

Got it.

It’s an easy issue to fix, since it’s just a matter of ipo frames for the ammoanim empty being 5 instead of 10. Just select the ammoanim empty and set the actuator frame 1-10.

When I put up a fresh build tommorow, that will no longer be an issue.

O and just to make it clear :). The fact that the viewer object does not implement a “head” collision body is not a glitch, that feature simply isn’t implemented yet.

Thank’s for your work.

Sorry to dig this up. It looks neat. But is their anyway to make the mouse look work on OSX ??
I can provide testing help if needed

Scope Update:

Well, i have implemented my scope and i have also tweaked the zoom again, now you must hold RMB to zoom and the crosshair will disapear then reapear when you zoom out, so you need to aim with the scope,

Pic:
http://img201.imageshack.us/img201/5654/scopear1.jpg

File:
FPS_Template

I will try to improve the scope, make it more accurate, nicer looking, and maybe a sniper type scope where it covers the whole screen, well i will play about with it and see what i can do,

Enjoy,

Brave.

Good work, but the latest FPS template doesn’t work nice with latest Blender 2.43. The initial one does.

Can we please make sure this works with Blender 2.43 preview11, or the upcoming Blender 2.43 RC1?

Thanks,
Erwin

Mouselook works in OS X, if you use Blender 2.43 preview11, or the upcoming official RC1.

Cheers,
Erwin