I have some questions about the bge

I’m trying to make a map for my game and i was wondering if there’s a way to make like it the gta sa was made rockstar used an img file that contain all the models and textures and in the maps folder the is files that put the models in specefic areas thos files contain the 3d model id and it’s Coordinates try to open one of those file in the notepad if you don’t get the idea
Anyway my question is : is it possibke to do something like this in the bge ?

Moving you to the right post

1 Like

sure, but why on earth would you do that vs using the blender gui?

currently i use a combo of both. i have setup empties which an init code loops through to spawn all objects based name or property. the save system writes the object and position data to a text file, to be read and respawned on load.

bear in mind that bge is quite inefficient when handling large numbers of objects.


Just make a minimap, once you know how to bake the world onto it you can then make a map for every game and change that by the level or zone you get into, click the resources next to my name and you will find a minimap.

1 Like

Please explain more i really need help

What do you mean ?

i assume you want some kind of modding support?

1 Like

in the new uppbge bpy can be invoked to absorb meshes into 1 object

this is great for things you want to draw - that don’t have a complex physics bound

for that you may want 2 sets of objects (objects that are GFX mesh and objects that are physics triangle mesh/ planes) - and absorb both of them into 2 different meshes.
(one visible + 1 invisible)


I mean that you have post in finished project topic. And , as a silent executor,I move your question to the right place. So you can have a chance to reach someone competent for answering you. Did you notice that there is topics here?

1 Like

I still don’t know how to use this website

What i want is something like the gta files that puts the models using coordinates is it possible in the bge ?

but do you mean for permanent world objects(trees, buildings) or dynamic objects (cars, npc, saving)?

i know nothing about gta, so pretend im dumb. explain in details please :grin: .

1 Like

Yes. You will want to learn Python to do this.

1 Like

It is possible using Python.

But you will need to:

  1. Define a file format to write your coordinates.
  2. Write a Python function to read that format and extract/link all the information to your assets.
  3. Use this Python function in a script to then use the information to spawn the assets in game.

In the gta sa maps folder there is some files when you open them using notepad you will find the 3d objects such as buildings and some coordinates next to them it puts every object i a specific location what i want to do is something like this

have the stuff adressed as
[ “objectName”, [x,y,z ] ]

import ast
own = bge.logic.getCurrentController().owner

if 'kdtree' not in own:
    all = []
    for line in text:
        data = ast.literal_eval(line)
    size = len(all)
    kd = mathutils.kdtree.KDTree(size)
    index = 0 
    for entry in all:
        kd.insert( entry[1], index)

    #now we can use own['kdtree'] to load in the data when the object is inside a radius 
    kd.find_range(point_inSpace, Radius)

this will give you a kdtree you can use in game to load objects in / out

still need to set it up to load using JSON or pickle or whatever to import the text

Thank you so much !!!

One more thing
I don’t have a big idea how python works so could please explain more how to use the script