Sabge game engine

can we stop with the fanboyism, its just stupid.

im glad someone has the balls to stand up and say “the bge is yesterday”. id love to see a new bge thats similar (python) but better and well thought from the get go.

3 Likes

heck, im writing an engine and people keep bugging me about doing ragdoll code for bge. like, lemme do what i want people. lets not even talk about it.

im curious here. which parts are written in c? can it be used to write logic as well or itd be all python on the users end?

I’m sorry if you understood this, try to reread well because I’m not saying that without UE / Unity you are not able to build high quality games, my speech was simply about the “true story” about if a game is built with an engine in which python is used as a scripting language, it will have lower performance than a game built with an engine that works with scripts written in different languages ​​faster than python, that is a fact you cannot object on, unfortunately it is so.
This was simply to say, to those who asked me if sabge is better than game engines such as UE / Unity, that from a performance point of view we will always be a little behind.
By “AAA game” here I mean those games that fully and efficiently exploit hardware potentials so if you use python you are not optimizing hardware resources at best (as a matter of fact). I did not refer in any way to the quality of a game in terms of graphics, playability, fun, etc., I was only talking about performance in managing so much logic!
Finally, I doubt that Rockstar, EA or other software houses will script their games using python even if they use engines other than UE / Unity. Then note that in conclusion I am saying that for us, who work alone or as small groups, is better to not use Unity or Unreal because for our objectives it is better to quickly write in python!

1 Like
  • In sabge I had written a library for the management of mathematics and camera/lights matrices in c, then I moved on to replace it with mathutils (except for camera/light matrices atm) .
  • I would like to re-write part of the animation system (actually python+mathutils) in c: I think I can improve the performance a bit using only c (it is basically matrix mathematical calculations in python’s for cycles).
  • Also there is a library for the curves/paths i wrote in c and it includes many utilities about interpolation.
  • Some functions in the KX_GameObject class are improved with c.
  • There are probably still many small things currently written in python that can be optimized with c … but I would devote myself to these small improvements later.

(I don’t know if I understand the question correctly) When a user uses sabge to build a game, he must provide sabge with python scripts, when these scripts use functions that are part of the sabge’s API and these functions are optimized in c, then these scripts gains an advantage in terms of performances (just as it is for bge/upbge)
There are improvements in c that concern functions only for the engine (that are not exposed to the end-user) as well as improvements on functions that can instead be called by the user (as, just for example, the useful “alignAxisToVec” function).

1 Like

Wwhat do you have to say about the Game Called “The SIMS”

Because Judging from the event and management system there’s alot of python obviously they’ve built that game on a different Engine but they use python to manage the in game event systems and AI and … but there’s alot of python but definitely not for physics or logic but for just in game systems…
I know this because of Sims 2 and 3 idk abt 4 now i’ll have to check…

BATTLEFIELD 2 was coded in C# and Python

Physics are in C# / C++ but the rest is python !!
and it was and still is an AAA Game!

Fred/K.S

Will SaBge be available for MAC/ Linux ?

will you be able to port your game to iOS/ Android?

Fred/K.S

Ok dudes lets me re express myself. I do admire whatever you do in this domain, animation coding modeling etc. and i respect whatever tool you use. All i’m saying is that i really want is to be proud about the game engine I work with and use! I really like the idea of free programs, in this domain, because the work is hard already, and being able to change features in real time that suits your needs is another advantage of the free software’s. I like Blender, i like it features and the game engine, i do no understand it as it’s fullest, cause it’s all in one program and there are a lot to know, but Blender already gets improved fast and efficient. I would really like the new game engine integrated into Blender to be as competitive and efficient. Sorry if i expressed myself in a way that could offend someone! Once again, all i want is to finish my work in an peaceful/pro/advanced environment on an integrated Blender game engine !

1 Like

alright, so python scripting and no compile time. thats nice.
not what im looking for, but still a good way to do things.

mathutils is already written in c so unless you really want to save on overhead i wouldnt worry too much about moving to pure c. it might run faster but probably not by a whole lot. this is just my estimation of course.

most serious problem id watch out for is how many agents, lights and props you can fit in a scene before the cpu starts choking. python will always be python. but boundaries can be pushed.

1 Like

true, it’s just to save on overhead and you are right about the fact that the speed gain will not be so big, in fact it is not something I am in a hurry to do …it was just to tell some use case about c…

Obviously there will be a need for tests. If we need a lot of lights (and we don’t care about shadows) we can use the deferred rendering system; for agents and props we will use useful techniques to save resources such as spawn system, frustum culling, LoD etc… Obviously when many objects are on screen and their python scripts are running, as you said, python is python and here it is responsibility of the game developer to try to optimize as much as possible (…if necessary…)
@anon14599097 @Fred_K.S Probably if you think this could be a critical situation for the game you have in mind maybe a game engine that works with python scripts may not be the better choice.

1 Like

yeah im still reading :sweat_smile:will reply shortly…

Fred/K.S

I think sabge will work on MAC/Linux also but i should test. iOS/Android no.

1 Like

i think im okay with the Game Engine thus far i work better in it i achieve alot in it i experiment before i do final stuffs and at this point ive achieved quite alot and results have proven otherwise successful.

Fred/K.S

Thats great man it would be a great Engine if it could cater to those platforms and the PC
Iam seriously looking forward to this it it enables me to branch out my games to multiple platforms id be more then Glad to be using Sabge

Fred/K.S

Dont get me wrong @lopas my intentions are not to create a AAA Title in BGE offcourse that’d be ridiculous since the tool is not designed for such, my goal is to push beyond the boundaries of the limitations and see what we can achieve with what we have, and see if we could add on to improve things. (What i mean by that is improve the way we make games i want noobs to hop in to SaBGE or UPBGE make a nice awesome fun game that will be in a list of archives for BGE games)

say for example we’ve maxed out SaBGE with a particular project and we’ve utilized the maximum potential of the Engine to create Read Dead 3 but in SaBGE why not build upon the game by using C something that can extend your game and actually get it to what your creative vision entails!

in the process of making a fully fledged out game that works with all its features a point will be made for the industry its a message to say that as 1 individual and an all in one engine you can make a full complete game.

Personally at this point im not worried abt the GRAPHICS or Whether the game will be as good as a AAA Titled Game; my END GAME is to get something that works, over the years ive seen projects and most of them never reach the light of day which is release, so in making a game we’re proving that we can complete a game that will be fun and play well even if its got 1991 Graphics its okay as long as it works im okay with that.

(What i mean is THE ENGINE shouldnt DEFINE WHY THE GAME SHOULDNT SEE THE LIGHT OF DAY !!!) Its all up to the developers to make sure the game is complete and works well and it reaches the light of day after development, many over the years have lacked the necessary skills when it comes to implementation!

Fred/K.S

perhaps look into octrees. or rather space partitioning in general. its basically breaking down scene objects into subgroups according to world position. so you only check for nearby physics bodies when checking for collision, only take nearby point/spot lamps into account when doing lighting calculations, things like that.

forward rendering isnt so bad in my case because i do lighting per vertex and dont even bother with lamps that dont influence a given surface. but deferred rendering would still work best if theres not a lot of differnet materials but many lights.

but ultimately it all comes down to the developer knowing what theyre doing, that is true.

1 Like

Certainly when when I spoke about AAA games I was wrong to use the term “AAA” because everyone can give it a different meaning. For me old games like zelda OOT, super mario 64, Banjo & Kazooie etc are still wonderful games, but do today’s market consider them AAA? I don’t know … I used the term AAA to mean a game that pushes today’s hardaware to the max. I think a game like the ones mentioned above can be replicated with sabge and with modern graphics as well. Perhaps this more specific statement explains my goals better. Then maybe if I want to put 80 enemies on the screen at the same time maybe with sabge I will have some problems and I am honest in saying this (as i will have the same problems with bge / upbge)

2 Likes

Of course it is a pleasure if the engine offers various ready-to-use strategies to optimize things. For an open world, for example, a spawn system based on space partitioning techniques is needed, luckily I have a bit of experience about this and I plan to implement it also in sabge but maybe later as an extra KX_Scene’s component …however, these are things a game developer can also do on his own … I think the most important thing is that the game engine gives you the flexibility to move as you think best

1 Like

i use lots and lots of lights (easy 50+). to get around the depressingly low number of lights we can have (before gpu melts), light lod solutions have been used.
a bunch of points are saved to a list and the X nearest points get a light object set to the position. its very effective and the code cost is low.

my biggest light concerns with current bge:

  • light objects cant be added (only the most recent illuminates)
  • lights on inactive layers are still computed (not visible, but eat gpu)
  • lights dont work with libload (only libs added after light lib is affected)
  • no sun lamp shadow cascades (literally unplayable)

as for code, unless you are doing massive loops (1000+x) then ive never had a logic limit issue. raycasting is one of those very inefficient features that will cause massive slowdowns in some cases. raycasting needs to be as fast as possible, leveraging the physics engine as much as possible. if it means a less powerful raycast function, then go for it.

im working on an object container system, which allows entire sections of objects to be managed, saved, removed, and restored. this would aid in massive scale maps. if there was a way to build this into sabge, thatd be great.

God level features:

  • precision is another hinderance to large scale maps. ive managed to devise an origin shifting method, but it requires some suspending physics for the shift. perhaps a builtin function could automate this?
  • terrain lods (tesselation) and physics computation distance limit for terrain. think streaming planets.
1 Like

its either sneaky teleports or increasing the size of worldcoordinate floats. or represent fractionary numbers as fixed point, but thats a whole another can of worms. i go for sneaky teleportation.

my engine automates it. if player crosses threshold at end of frame -> get vector for shift direction -> apply movement vector to whole scene next update. this is why its cool to have the main loop be designed specifically for the needs of a game.

2 Likes

We can develop strategies in a different way. Without analyzing your specific case, I answer you by saying that in Sabge the max number of lamp for the forward renderer is 8 as bge/upbge. I have set max 8 lamps simply because glsl wants a value indicating the maximum number of elements for the array containing the structs containing the specific data for each lamp, but I can change this number as I want. Obviously in a forward renderer it is good not to raise it too much and play with these 8 or little more max. However in sabge, a lamp is an object that you can add and remove from the scene whenever you want and when you remove it, it no longer exists. So I find this system more flexible than bge/upbge. In other words, lamps are procedurally defined objects:

myLamp = scene3D.addPointLamp (pos, ori, color, … etc) #add lamp to the 3D scene (2 scenes only 3D and 2D for overlay guis)
myLamp.endObject() #remove the lamp from the scene

You can add more then 8 lamps but only the first 8 in the list (scene3D.lamps = [lamp1,lamp2,lamp3…]) will be passed to the gpu. It is your responsability to delete the lamps you wont’ to use

1 Like