An idea that may, in my opinion, help Game Engine a lot.

Game Engine, Players & Web Plug-in, Virtual Reality, support for other engines

Moderators: jesterKing, stiv

Post Reply
FuzzMaster
Posts: 0
Joined: Thu Jun 02, 2005 6:00 am

An idea that may, in my opinion, help Game Engine a lot.

Post by FuzzMaster »

I've been in and out of the Game Engine, using it here and there, and I was randomly thinking today about it. Seeing as how it's getting a lot of improvements lately (Ogre, Bullet, etc), I thought, what hasn't been improved? I immediately thought of the Logic Bricks. Blender's received a lot of updates lately, but the Game Engine's logic bricks still remain an ancient artifact of what Blender used to be. Seriously, they need updating. At least some way to group them. So, my suggestion is this: can we integrate the logic bricks into their own form of nodes? Think about it, they all connect, work well, can be grouped, are much more aesthetically pleasing and generally seem to be easier to work with when they are greater in numbers. Not to mention it would allow much more complicated things to be done easier (have you ever looked at some intense logic bricks? Yuck). I submitted this to the Summer of Code project list but it was refused on account of it being something that wouldn't take very long. So, if that's the case, is anybody out there interested in fixing this up?

Edit: I am not positive if this is in the correct forum, feel free to move it if need be.

ICS
Posts: 0
Joined: Sun Apr 08, 2007 9:54 am

You're right!

Post by ICS »

I use the blender GE a lot, but I'm a non-programmer user so I wonder if it can be possible to create a button in the logic bricks pannel that translate the logic bricks to a true python script?

It sould be a great help for non-programmer like me because when my logic bricks works almost fine, it takes a very long time to change values...

So is it possible and if it is, what you guys are thinking about this idea?

Seeya DJ_ICS

(Scuse my poor english, my language is french!)

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri »

I think this would be great, but hard to implement.
The computer needs to find out which of the triggers need to stay and which to remove.
I think for simple things as keeping track of values you better learn a little python. It's not so hard and you don't need to use one big python script, you can also (re)use lots of little ones.

ICS
Posts: 0
Joined: Sun Apr 08, 2007 9:54 am

Post by ICS »

I agree that the simplest solution is learning python, but as I say, it's really complex for a non programmer...
For example, I use the FPS template created by Social for the last release log (2.42) and decide to replace the "level mesh" with one of mine wich contain stairs. OH, SURPRISE, the player can't go upstair because it seams to move using the "force" motion actuator.
Then I take a look in the Walk.py script to find out some value to change but no way, I can change the "speed" value but I don't know where I can change "Force" to "DLoc"motion actuator...

So no, for me it's not "simple things" to do LOL!

Seeya DJ_ICS

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri »

Well I think the "trouble" with python is that it does not work stand-alone.
You always need to connect triggers and actuators to it. So if you want to change the force to dloc you need to change the actuator, not the script.

That's my whole point why it would be hard to implement your idea.

ICS
Posts: 0
Joined: Sun Apr 08, 2007 9:54 am

Post by ICS »

I know that I'm a noob but there's no value at all in the fields of the motion actuator... Maybe I'm wrong but it looks like the script define what kind of motion is applied!

I think that's the part of the code that define the player moves:

act = cont.getActuator("floormove")
...
act.setLinearVelocity(sspeed, fspeed, jspeed, 1)
if [sspeed, fspeed, jspeed] == [0, 0, 0]:
GameLogic.addActiveActuator(idle, 1)
GameLogic.addActiveActuator(run, 0)
GameLogic.addActiveActuator(act, 0)

I tried to change "GameLogic.addActiveActuator(act, 0)" to
"GameLogic.addActiveActuator(act, 1)" but it didn't work...

If you have any idea to solve this problem, please tell me!

Seeya DJ_ICS

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri »

You are correct.
The Values of the actuator are set by the python script.
But the Kind of actuator is selected in the blender gui.

You can change the kind in the gui and then change the
act.setLinearVelocity(sspeed, fspeed, jspeed, 1) into
act.setDLoc(dx, dy, dz, local) where dx, dy and dz are distances :)

http://www.blender.org/documentation/py ... ml#setDLoc

addActiveActuator(actuator, activate) just turns an activator on or off.
actuator should be a variable that was defined with getActuator(name)

ICS
Posts: 0
Joined: Sun Apr 08, 2007 9:54 am

Post by ICS »

Thx! :D

The operation is now clear in my mind but I'm not sure that I can't turn it to a python script without syntax errors!

One day soon, I'll open the bible "Programming with python" and I'm pretty sure that syntax will not be the main problem! :lol:

jakeBie
Posts: 0
Joined: Fri Sep 22, 2006 3:34 am
Location: Provo, Utah

Re: An idea that may, in my opinion, help Game Engine a lot.

Post by jakeBie »

FuzzMaster wrote: At least some way to group them. So, my suggestion is this: can we integrate the logic bricks into their own form of nodes? Think about it, they all connect, work well, can be grouped, are much more aesthetically pleasing and generally seem to be easier to work with when they are greater in numbers.
No kidding- I'm developing a fairly complex game and boy do they get ugly fast. Especially when there is a limit on the number of logic bricks that are displayed at one time (if you select all in my game, you will see about 1/5 of the total logic bricks used in that scene).

With grouping, you could also link a controller to a *group* of actuators, so when it fires, it fires all the logic bricks in that group. Same thing with Sensors. It'd be nice not to have these massive python script lines that check 5 sensors to make sure you are in the right mode, then check in addition to that whatever conditions will fire the py script in that particular mode. It'd almost be like having a controller's output (normally to an actuator) going to another controller. That would be amazing and really helpful.

Finally, as far as aesthetics go, there is already a good base that the logic bricks would look good in- the nodes window organizes well, is clear, the pieces can be adjusted to make more sanity in seeing the connections (not like the black mass of connections and view collapse/show style of the logic bricks).

Yeah, this really would be a noble project!
-Jake

Ammusionist
Posts: 0
Joined: Thu Oct 30, 2003 7:34 am

Post by Ammusionist »

100% agree - I thing one of the things that's really holding the Game Engine back is the non-programmer interface.

If you're particularly pythonesque then you can make the GE do just about anything, but if you want to throw together a quick demo or don't have time to learn another scripting language, the logic brick system is just about reaching its limit.

Also, with new logic brick types being developed fairly regularly, there's becoming a need for a re-factor.

Go nodes!

My C++ is pretty rusty, but if you want, I'd be happy to see if I can document some node types to mirror the existing logic brick system, then see if someone would be interesting in picking up the coding?

FuzzMaster
Posts: 0
Joined: Thu Jun 02, 2005 6:00 am

Post by FuzzMaster »

I don't know if anybody would be willing to pick up after you, but I think that would be a great start. How would we exactly add this 'officially' to a list of suggestions for the devs to look at and consider?

Post Reply