Socket logic bricks

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

Moderators: jesterKing, stiv

Post Reply
Blender_owl
Posts: 17
Joined: Tue Oct 22, 2002 10:35 pm

Socket logic bricks

Post by Blender_owl » Sat Jun 26, 2004 6:03 pm

Think it would be great to have socket logic bricks.
A sensor can detect state changes in the socket, like if its closed, open, if it has recv data. And and actuator can be used to connect, disconnect and send. There would also have to be a socket property that can be added to objects. It can be set as UDP or TCP. So when you want to connect you would have to specify the socket you want to use. This sound good to anyone? I havent thought this out too much, i will post more on how it will work later on. I cant do any C++ so i cant really impliment it :S. although i could design it on paper and try to do a prototype in python. Just need someone to impiliment it in blender.

z3r0_d
Posts: 289
Joined: Wed Oct 16, 2002 2:38 am
Contact:

Post by z3r0_d » Sun Jun 27, 2004 8:16 am

and how easily could this allow a person not used to how a network works to flood a network?

while it sounds like a nice idea, I don't think an artist could be very useful with it.

particularly as the options varying the pulse speed of a sensor only specifies a number of frame delay, which can be different on everyones system

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Sun Jun 27, 2004 8:26 am

Blender is not only for artists- its also for developers and people who know what there doing.

Hell- sombody might even set up a Gigabit networt just so they can network game-blender with sockets. - Let them flood it.

Metallica
Posts: 6
Joined: Thu Oct 17, 2002 12:46 am

Post by Metallica » Mon Jun 28, 2004 5:43 pm

and even if this person whos not familiar with networks then we could make an official documentation about it... z3r0_d we cannot limit ourselves because blender is supposed to be easy and for beginners.... it should be for begginners and experts. :) b-owl i know you can code... stop being lazy, just kidding :)

jd-multi
Posts: 0
Joined: Thu Mar 13, 2003 11:29 pm

Post by jd-multi » Tue Jun 29, 2004 12:47 pm

Agree with all of them z3r0_d. You must giev artists the oppatunity (however you spell it) to design things, but also to make more complex things in blender's game engine. Most of the people just want to make models, games, movies and so on, but afther a while people will form a team or got atracted by coding. I really like blender to model and so on, but a couple of weeks ago, I wanted to make my own game project but found out that a little python coding would be handy. So I tried Python and guess what, I like it. If blender was only for artists and not be able to use python, people like me would search for another program to get there work out of it.

Even if networks sensors or actuators are just complicated for an artist, we could make documentations or tutorials about it. If someone really want to make a network or online multiplayer game which is really need in these days, he or she will defently take everything with them to find out how.

Btw, It would totally rock to create your own game with friends and play them with the blender community together. It would be awesome, I hope this one won't be ignored.

Dracarys
Posts: 0
Joined: Sun Dec 21, 2003 5:57 am

Post by Dracarys » Tue Jul 13, 2004 4:00 am

I have to agree with JD. It's a really cool idea, and just think how fun it'd be to be able to make networked games in blender, then post it on elYsiun with your IP, and play against/with other community members. Perhaps the network flood problem could be fixed by forcing the sockets to use a clock based send timing instead of frame-based. There could be a check box somewhere that would be "Make networkable", and then it would automatically update the objects on all the other computers. There could be not only a "Save Runtime..." option, but a "Save Server Runtime..." one. Imagine the fun we could have!
[edit] The way you could handle multiplayer controls (multipl ekeyboards, etc) could be something like a property where you select the player #, or a checkbox for "Object belongs to single player" that would have an "Auto assign" option that would automatically assign it to the first joined player that meets a set of requirements, or to a specified player. Maybe, for larger scale ones, ther could be a "Duplicate for each player" checkbox that would hide the original, and add a new one each time someone joins. It could have an option to change to randomly modify the color fo reach player so things don'e get too confusing. I'm getting carried away now. *gets off the soapbox*

alien-xmp
Posts: 0
Joined: Sun Apr 06, 2003 2:22 pm
Location: Wellington, New Zealand
Contact:

Post by alien-xmp » Tue Jul 13, 2004 2:34 pm

I think the message bricks were supposed to eventually work over a network - there is code in there for using something called Terraplay.

However, I think the best way of doing multiplayer is to build it into the core - provide Python methods for finding games on the network, hosting and joining games. Then, the game designer designs the interface, and the game engine synchronises across the network automatically. Of course, this is quite a big project.

an-toni
Posts: 0
Joined: Wed Mar 17, 2004 5:20 pm

Post by an-toni » Wed Jul 14, 2004 4:37 pm

interesting to hear about the possibility to communicate over the network with the messages -- imagine that already would make many things possible (although i haven't really used them anywhere myself, other than perhaps changing in systems made by others .. usually just call python methods and set attributes instead)

regarding sockets, they are perhaps still too low-level to be in the bricks (due to various difficulties in error handling etc.) .. if the messages could use sockets, would some additional actuators be needed for making networked stuff, and what would they be?

about alien-xmp's note about building networking to the core: it may still be a good job for Python, as there are good network game libraries for it (like Twisted) .. didn't even the Verse people consider integrating to Blender via Python? Of course a c(++) library could be used too, and as you are the one mostly working on the engine.. well,

anyhow, exciting stuff (was fun to peek in while being busy with mostly other tools)

~Toni

Post Reply