This is gonna problematic

Let me begin this bread by saying that I have a love hate relationship with the bge.
I love it because it’s the easiest 3d game development GUI for me to comprehend and use.
I despise it for the sheer margin for error and the fact that all common features are genuinely hard coded (despite the abundance of logic bricks)

That being said, I’ve decided to return because my development itch is uh, well its itching.

I’ve elaborated on paper and designed concept after concept, art, music, ui, models, narrative for a top down, 3d exploration, randomly generated, crafting, scavenging, zombie thriller with citizens (ai and autonomous fighting nature and all, with hostile and friendly citizens), dynamic lighting, RPG aspected, and ALL.

Now the simplest things become the challenge seeing as how I’ve covered the larger bases.
Things such as:
•Viewing of equipped items.
•UI for inventory (not even sure if this is a possibility)
•Displaying of sprites over viewport (general ui)
•Character customization(I believe this falls under dynamically equipped item viewing)
•How to display the progress of collecting resources (such as a progress bar of scavenging metal from a car whilst having the mouse button pressed across it, sounds self explanatory, its not)
•How to approach melee or projectile collision with baddies.(ray casting for melee and its type/collision check for projectile types?)
*•How to highlight resources when hovering mouse over them, or how to highlight baddies (is hot swapping textures in bge a thing)

That’s all my queries for now, I don’t want to hurt my self to the extent I stop progress.
I know this isn’t a begging board for devs to pour out source to us simple bge plebians, but I’ve looked up and down every crevice of the internet and no feasible solutions to my problems have been found and I’ve tried everything.

Any help if at all is greatly appreciated, pointers to tuts or similar questions would be great, thank you.

Almost all of your topics involve using overlay scenes. Once you know how to use them, I think you’ll be able to solve a lot of what you are stuck on. This Youtube search query might help. There are a lot of tutorials here that I’ve found very helpful.

https://www.youtube.com/results?search_query=blender+game+engine+overlays

Logic bricks is programming. You are imparting instructions on objects, you are conveying intention at a highly abstract level. If you can program in logic bricks, then you can program in python. The different between python and logic bricks is that in the one, you drag and drop, and in the other, you type. Otherwise they are identical in terms of the abstract skills required. The issue is that logic bricks are quite restrictive in what you can accomplish.

The major issue you seem to be having is:

  • How do you create a user interface in BGE

There are lots of little tricks here, but none of them are particularly simple. BGE does not have a native way of creating user interfaces, so you have to be creative and leverage BGE’s ability to draw texture on objects, detect when a mouse is over an object, and all the other things a game engine normally does. Progress bars can be made from planes that scale on one axis. Buttons can be planes with mouse over sensors (or cast a ray to the mouse in python). I created a system that allows binding between blender objects and python functions with a HTML/javascript-like syntax (ie onclick, onmouseup bindings, mouseEvent objects etc.). It’s not a simple system, though I plan to rework it into something much more usable than it currently is.

Then you have to link this to some internal model. How do we make the UI interact with the internal model? Well that is up to you. I have created a system that allows attaching buttons to variables in a python dictionary. This allows things such as incrementing/decrementing numbers, typing into strings and so on. It also allows changes from the python dictionary to be reflected in the UI. Again, this is not a simple system at all.

(is hot swapping textures in bge a thing)

Yes it is:

def show_picture(obj, path, mat_id=0, tex_id=0):    '''Loads a picture into a texture'''
    raw = bge.texture.ImageFFmpeg(path)
    tex = bge.texture.Texture(obj, mat_id, tex_id)
    tex.source = raw
    tex.refresh(True)
    obj['SHOW_PICTURE{}:{}'.format(mat_id, tex_id)] = tex

Whereby ‘obj’ is a blender object (eg bge.logic.getCurrentController().owner), and path is a full path (eg bge.logic.expandPath(‘//Textures/imagename.png’). mat_id and tex_id default to the first material and texture slot.
However, i prefer to do highlighting by tweaking values in the shader rather than switching textures. Switching textures is quite slow (have to load them from the hard drive into ram into VRAM)

GUI’s are not easy, but if you create a proper framework, they aren’t hard. I’m currently in planning stages for a BGE UI system, but it is likely several weeks off.

About using weapons and switching, I found this while actually searching for on the video site how to create a energy effect for a weapon which is probably the same like creating fire or parks, it would requires the use of images.

Just woke up, time to get on the blender horse and start trying out these suggestions, in the mean time, i don’t use the bge forums often so I hope i don’t get /thread’ed while working on it, much thanks :slight_smile: