UPBGE's Community Addon

UPBGE comes with the component system, but without any build-in components, wich is what this addon adds.
Check the note on the main post. Components should work without anything extra when running the game from blender. When exporting, it won’t work. I’m working to fix this (and to add some other cool features like icon select on Windows).

If i have the components projects in my documents will that interfere with them working?Can regular blender interfere
with them working?


@Lostscience

Components are stored in the “core/com” folder of your project. For you own you can either modify those files, crate new files on the the “project” folder or create them internally in the main.blend. Any file that you create, if it has the same name than another file will interfiere. For now those are “control.py” and “media.py”. However each project you make is independent, crating or modifing components on one project won’t effect others. You can as well just delete the files in the “core/com” folders, you will lose build-in components on that project but you will still have all other functionality intact.

I finally figured it out.It was in the documentation.

Perhaps this may interest you:

the git hub link: https://github.com/lars-pfeffer/BGE-Master-Template

That’s pretty much unusable, except as a reference maybe. There are like 80 scripts in the main blend file of that template, all without much organization nor documentation, I may as well just start from 0. If there is any real structure there, only the author knows. He would probably have an easy time porting its template to this addon, I however would have to figure out a lot of things.

Could you add a track to nearest property script like this?This does not rely on logic bricks.I found this in the forum.
It works in the new blender game engine i tried it.Although it needs improvement a little.

Attachments

Tracking Arrow with Scripts.zip (39.5 KB)

Done. I’ve also added some other options I though would be convenient: http://coredoc.royalwebhosting.net/ui/components.html#control.TrackToNearest

It says that there is no class named control.TrackToNearest.

Well, since each project is independent you need to create a new game project to use new features, otherwise you are still using older versions of the Core API. Or you can create a new project and copy the “core” folder of the new project to your old one.

Maybe there should be an option to update a project to a newer version, but if you’ve done modifications to the Core API, updating could break those, so I’m not so sure about it.

That worked and these components are great.I do not know what else could be addded.Maybe i will think of something.

For now I’ll be working on shaders, and maybe, if I have time, try to improve the export system and create an asset manager. The objective is to be able to setup somthing like @Masterblop video, from scratch, in 10 minutes or less using this addon.

Here is thatimster rain node shader from resources.

Attachments

rain.zip (390 KB)

To keep thing sclean I would prefer not to use nodes, logic bricks, or anything that may bloat the main.blend file (like this shader). However some things may be nescesary, but for those I’ll try to make them into assets that you can install in one click and that are libloaded at runtime (or some other trick I may come up with). For now, since such a system doesn’t exist, I’ll keep node shaders out.

Whenever you can do this do it.

Finally i was able to do some more testing. In the sun lamp youve added some number as 10240 - wrong number. :slight_smile: Also you have 2 lamps with a shadow on and this last layer too checked, why? You only need a one lamp with a shadow, since in the forward raster all the meshes with shadows will be rendered 2 times. And the layer option in the lamps should be an optimization to hide the shadows that are away from the player. :slight_smile: Vsinc was on and it takes from the fps. So far i like it. :slight_smile:

The two sun lamps was a test I did for the static shadows option that was added in UPBGE. One sun casts dynamic shadows on one layer (that has dynamic objects on it) and the other casts static shadows on the other layer (wich only has static objects). However it is not as practical as it should be, so you may just as well remove it.

If you can improve the default project, go ahead, send me the project.zip when you’re done. Just don’t bloat it with assets, those will be distribuited separately.

With the recent updates, you can now use any uniform type that the BGE API let’s you bind, so that is: Integers, Floats, Vectors, Matrix, and sampler2D. The later is specially useful for to load textures to the shader, hence the API to use it is even more easy, you can either pass the filepath of the texture to load, or the BGE texture object (BL_Texture).

See the new API here: http://coredoc.royalwebhosting.net/api/filter2D.html#installing-or-creating-custom-shaders

Special thanks to HG1 for his example on binding uniforms, I wouldn’t been able to do it without it: https://blenderartists.org/forum/showthread.php?374488-Bind-custom-uniform-values-to-a-2D-filter-(using-bgl-wrapper)

I have a map editor with a built in ui for transform tools I would like made into a addon, maybe build in my terrain generator or your own?

we need quad tree streaming or kd tree streaming to and from files.
(a grid of the world stored when it is too far away and recalled when close)

every change to the world is saved as a symptom of the structure, like fallout.

make terrain - place instances of map kit pieces dependant on game
place little tags and colliders etc for story telling.

basically it’s fallout like game editor capable of editing terrain and splat map in real time in game.

I need this for wrectifed, but it should be handy for most game types.

also, you could use the systems in game with limitations to have in game building like fallout 4 settlments.

@BluePrintRandom

I also want an in-game editor, though the one I’m gonna make will have the same controls than the blender viewport. It will be a component. That component and the View3D component will have a “Track” boolean option that when active will translate the changes in-game to Blender if Blender is opened, or a file if it’s not, so that the modifications you do are persistent.

About the terrain though, in my opinion it should be done on UPBGE source code. The AI is fine as components too.

By the way, I’ve not played Fallout so if you use it as example I don’t know what you’re talking about.

P.S. Are you using the addon?