My first FPS try on blender

Sorry if you got me wrong, I new what it meant, but not whythey did this.
I have never seen this on any Blend file bevore.

Hmm, phyton…
I wanted to learn it anyway, but I have never thought it would be as important.
Ok I will give it a try!

Python adds a whole new level of handling logic. You wont regret it once you get it. Goran Milovano’s video tutorials are a fantastic place to learn how to properly program python in the game engine. I dont know if you have any programming experience, but this guys makes great tutorials that are packed with python goodness. :slight_smile:

klauser is right, Python opens up so many possibilities within Blender. Its hard going to start with (I’m only really a beginner) but things that are difficult or impossible with logic are easy to script.

However, Python is only part of everything: the mistake I made/ make is to think logic blocks are redundant once Python is involved- there is no need to re-invent the wheel!

Ohh man, phython is much more complicate than i thought…
But I tried some texturing and found out, this is not as difficult and even makes fun :smiley:


So textue for the g36 is finished!!!


Tetxures for arms are finished too and the first animations for the g36 are finished!

Here are a few suggestions to help improve the already good texture of the G36c. Lighten the color of the magazine and maybe add some text on the side of it. Look at pictures of them on Google. They all have some areas of text on them. Just suggestions though. :smiley:

Yes but this is a bit tricky to find the right font for it.
But if you mean so I will try!

Muzzleflash :smiley:


Gues what this will be :stuck_out_tongue:


Hey guys question again :wink:
I wantet to know how many vertices I can use for my game in order not to drop the fps down.
I have read a thread about this, where they sayd that an enemy shouldnt have more than 2000 vertices.
So I tried it, took my old game and subdividet the enemy as long as it had 30000 vertices.
I started the game with 30 enemys appering at once (all in all over 900000 vertices!) and tehre was absolutely no lag.

What do you mean?

It depends on the power of the PC running the game. My wifes netbook will struggle with its Atom processor, yet my computer (Quad core etc) will fare better.

You must decide your target spec and then test on it until everything runs smoothly. This could mean less detail, it may mean more- its a very open question.

I wantet it to be quite good graphics, wich shouldnt be a problem with my 6x3,6Ghz cpu :smiley:
But of course I also want other persons, who maybe dont have a “high end gaming pc” to play my game.
Ok I will test it out.

PS: Changed the enemy vertices to 120000 and added 30 of them in game, and the fps didnt fall below 59 XD

120000 for one enemy? If its a humanoid based character, then you should be able to get all the details you need for waaaaaay under that. A fraction of that and some good quality normal maps will allow the game to be run on something other than NASA’s mainframe. Plus it will give you some freedom for the levels, which I always find manage to eat up polygons like crazy.

Personally I have found that I dont need anything more than 5000 - 8000 for an enemy, depending on there size. If I can I will really push something more along the lines of 3000/4000 polys for each. Any more than 8000 and I feel like I’m just wasting polygons and can squeeze the extra detail in with normal maps.

Sorry I think you got me wrong, of course my enemys wont have 120000 vertices, I just subdividet the surfaces to get this number an check wether it runs and I does!
The final enemy for the game will hopefully have something about 2000-3000 vertices, if this is possible for a human body.

It only starts to really slow down when the meshes are animated with multiple bones. Mesh deformation is very expensive.

Ok I think I will get this to go!
So, one more question…
i made a ray sensor to check wether if there is an enemy, if it is true it will send a message to the enemy and the enemy will subtract something from his life property. So far it works, but the problem is, if i add more than one enemy, shoot at one everyone will die because the ray sends a massage to the object called enemy and every enemy is called enemy.
I know i could give every enemy his own name and property name, but this would be too much logic and i think this has to be much more easy.
So can anyone please help me?

Fluppi393, the bge can handle a lot of vertices. With the old 2.49, I had 1 million vertices scenes running at acceptable frame rates. Mind you, all models were static and scattered across the scene.
You may have more problems with a few thousands vertices if they are dynamic or have bone animation as agoose mentioned. The bge is not good with many objects, but is good with dense ones! I guess it comes from the short film production orientation…

Your ray could directly subtract damage from the enemy’s life property if you use rayHitObjectList[0] I think.

Thanks for the replies!
I dont think I wont have too many dynamic objects, most of the vertices will be in the environment.

Thanks for the link DarkFire this really helped me!
And I learned a bit python :eyebrowlift:
But I am still stuck with the enemy ray, I tried it with your code, trakunsama, but i didnt get it to work because I am a completely noob to python :no:

Could you have a look at it?
(Deletet parts like the bulletholes to make it more easy!)

from bge import render, logic
from mathutils import Vector

def main(cont):
    
    scene = logic.getCurrentScene()
    own = cont.owner
    
    message = cont.sensors["fire"]
    rayOj = cont.sensors["rayObject"]
  
        if message.positive:
            target = rayOj.rayHitObject()
            target.health -= 10

First, you name cont to own, then you use cont again! Replace cont with own for starters!

No I dont think that is the problem, because my bullethole script works like this.
When I start the game the system console says something like this “object has no attribute ‘rayHitObject’”