Need help to create 3D Isometric Game

Hi, i’m trying to create a 3D isometric game in Blender (v2.76) and i need help for know several useful features for my game.
(sorry if I’m not expressing myself correctly, i’m french and use Google traduction sometimes)

for now, I’m working on the environment and the field conditions.
Here is an image that represents a beginning of my creation ;

  • Light blue object represents the player, with a [Collision Bounds - Capsule] and
    [Physics - Character]
  • Yellow object is a slope at 22.5 degrees
  • Orange object is another slope at 45 degrees

The player can move around and fall, but how to make it slide only on the orange slope?
(if you had an exemple of platform isometric game to download, i’ll take too ^^)

put an upforce to the player on the slopes where you don’t want to slide.

player.applyForce((0,0,own.mass * 9.8))

I tried, but it didn’t work out anything different…
the “print (own.mass)” always gives the same result “0”

but thanks for the reply :slight_smile:
may can I learn a lot in this forum

there is a better representation of a part of a level in my futur game ;
(without gamelogic)

You set the own.mass in the physics panel, no need to set it in the script.
also is the player a dynamic character or static/character type?

It’s a character type. But if i set it in the physics panel, it can’t slide on the both slopes.
I Don’t know if there’s a way to set a degree limit when the player slide or not.

ah, ok character type is not my way of working, if you stick with it you need help from someone else.
character type has a lot stuff build in already that’s why it’s not sliding.

I use dynamic type for all my players/etc… dynamic will slide and the applyforce will top it from sliding.

yes you can calculate a sliding angle and applyforce according to that. You can click on my avatar and click on my resources, take my ‘first person movement script with keybindings’, i have that option in there.

1 Like

Ok, thanks !
I don’t knew what’s the better type between character and dynamic

character was build in to give new users the ability to set up a character fast, but this type you have less control over. dynamic is best, you have full control over it, but downside is you need to program everything for it, dynamic does not come with anti sliding or walking stairs etc.

so if you want full control and can program/use bricks use dynamic else stay at character.
(or simply use scripts that other users, like me, have made available for the public)

1 Like

if you are using character physics keep collision bounds unchecked, it do not work as expected “buggy”

Ok, I did the necessary for this.
Now i have another problem:

The red sphere represents an enemy projectile that can damage the (light blue) player.
His Damage property’s number is supposed to reduce the HP player’s property.

(sorry for the 2nd poor image visibility)
In the Orange rectangle,
Someone knows what to write to recover the property of the detected object ?

projectile = own.sensors["Collision.001"].hitObject
if projectile: #safety check that hitObject != None
    if not projectile.invalid: own["DamageTaken"] = projectile["Damage"]
1 Like

Ok thanks ! Indeed, the sentences “if projectile:” + “if not projectile.invalid:” are useful if we don’t
want an error appears on the console.


(1 month later) This time, i’m trying to throwing a projectile from the character.
This projectile it appears and disappears well after few seconds but he doesn’t want to move…
Here’s my code:

I’ve created the original projectile in another inactive layer to not having an error like “this object need to be in an inactive layer”

in this case use applyMovement instead of velocity

here an example of my bullet script (alter it and you can use it)

from bge import logic

def bullet_action(cont):

    own = cont.owner
    player = own.scene.objects['player']
    if not player['active_weapon']:
    weapon_data = player['weapons'][player['active_weapon']]
    speed = weapon_data['bullet_speed']
    damage = weapon_data['bullet_damage']
    bullet_drop = weapon_data['bullet_drop']
    hole = weapon_data['bullet_hole']

    distance = speed/logic.getLogicTicRate()

    own.applyMovement([0,distance,-bullet_drop], 1)

    y_vec = own.worldOrientation.copy().col[1] 
    y_vec.magnitude = distance

    end_vec = own.worldPosition.copy() + y_vec
    ray = own.rayCast(end_vec, own.worldPosition.copy(), 0)

    if ray[0]:

        if 'health' in ray[0]:
            ray[0]['health'] -= damage
            if ray[0]['health'] <= 0:
def bullet_hole(cont,ray,bullet_hole):
    own = cont.owner
    bullet_hole = own.scene.addObject(bullet_hole, ray[0], 300)
    offset = ray[2]
    offset.magnitude = 0.001
    bullet_hole.alignAxisToVect(ray[2], 2, 1)
    bullet_hole.worldPosition = ray[1] + offset

Great, it works! … Honestly, i just added the method “own.applyMovement” in my code.

Do you know if it’s possible to get the size of the window (into properties) when we’re in “standalone player”?

sure, look at this topic:

then if you have it just put it into a property.
No clue how? then look at my resource here:

It seems that this tutorial isn’t free to use…
Anyways, actually i’m stuck:

I’ve added a second scene with several object and most of them becomes invisible.
These objects have always their collision system.

Maybe there’s a memory limit and i don’t know what to do…
( I just have 175 objects in all)

what tutorial?

they get in collision with each other? or do you need to flip the normals?

(the tutorial you joined in your post "

I just need to keep them visible.
Here are the images of my 2 scènes:

And this is the result :

I really think that is a memory problem, the black-grey form was the
last object i added.