|
|||||||
![]() |
|
|
Thread Tools |
|
||||
|
After studying python network libs, I made this template (still work in progress !!).
This demo is already a fully functional example of a networked multiplayer game (using server X thin client architecture). A brief explanation of the architecture is here This demo is a 3D Pong, where two players can be at diferent computers in the internet How to test in one machine:
To python prgrammers: Discover how one client can "cheat" the server in this example (I think you really need python installed to this work) Server blend: http://uploaded.to/?id=we92g8 Client blend: http://uploaded.to/?id=m0gmfg I'll try a tutorial on this when completed. UPDATED: Server now tracks score and clients are textured and has shadows. Now I'll try to make multi-threading connection works
............................................
* Don't laugh ! English is not my first language ...
Last edited by morgade; 03-Nov-08 at 17:32. Reason: Links updated by request |
||||
|
#1
|
||||
|
|
|
||||
|
Yes for it to work you need Python 2.5 (as you do for mine). I also noticed that blender freezes if the server is a .exe, you should make the server just a Python module, that way you can just run it as it's own console no need for blender.
Hmm, maybe you could help me with sycing zombie/door/bullet (from a gun ) movement?Thread: http://blenderartists.org/forum/showthread.php?t=100617 Please upload elsewhere! I hate rapidshare you need to wait an hour between downloads!
............................................
Training to become a Police Officer. Hobbyist programmer. |
||||
|
#2
|
|
|||
|
#3
|
|
||||
|
UPDATED: Server now tracks score and clients are textured. Now I'll try to make multi-threading connection works
[Oups... Textures where not packed] Server blend: http://uploaded.to/?id=i4jwnm Client blend: http://uploaded.to/?id=ra9u5f Quote:
............................................
* Don't laugh ! English is not my first language ...
Last edited by morgade; 15-Jul-07 at 18:36. Reason: Textures where not packed |
||||
|
#4
|
|
||||
|
It works great on my PC. I don't have a setup to be able to test it on a network right now, but I'm curious to hear what kind of results it give.
A couple of things: You forgot to pack the textures (looks nice in the screens, though). The game currently doesn't recognize when one client quits or the connection is lost, so the remaining player might continue for a little while wondering if the other person is still there.
............................................
Game Engine tutorials: blendenzo.com - 3DKernel - TutorialsForBlender3D - blending-online My Projects: Solomon's Treasure - Sokoban - Marble Labyrinth |
||||
|
#5
|
|
||||
|
Quote:
Quote:
I will pack this simple version to people study and will try to implement the synchronization code.
............................................
* Don't laugh ! English is not my first language ...
|
||||
|
#6
|
|
||||
|
It works fine for me with blender 2.43 and python 2.4. Its really cool, and if you made a tutorial, you would be awsome in my book.
............................................
Whats a Signature......? |
||||
|
#7
|
|
|||
|
God this might be exactly what we are looking for!
could this be expanded to like 4 players? p00f and I are planning on a chess game, where the pieces settle the the disputes in a 3rd person death-match in various arenas, (based ancient commodore 64 game by the first Electronic arts, Archon, and Archon 2) Man, I got to see if we can try this at work on the LAN! thanks for making this
|
|||
|
#8
|
|
||||
|
............................................
Training to become a Police Officer. Hobbyist programmer. |
||||
|
#9
|
|
||||
|
Hey, very cool.
Sadly i was not able to play. I click inside the blender clients and "wasd" doesn't work... But Blender tell that "conections" are ok (server was able to "catch" clients). :S Using python 2.5 and Blender 2.44 Later i will try Blender 2.43 and python 2.4 like Ragshan did. Congratulations for the excelent work! |
||||
|
#10
|
|
||||
|
Quote:
One important first step is define the comunication protocol between client and server (put it on paper to not get lost). I'll put this in the tutorial I tried it in a LAN (actually two PCs connected by a cross-cable), and worked fine Quote:
............................................
* Don't laugh ! English is not my first language ...
|
||||
|
#11
|
|
||||
|
Quote:
I really hope you can help.Blender also froze for me and never worked, i'm using blender 2.44 & Python 2.5.
............................................
Training to become a Police Officer. Hobbyist programmer. |
||||
|
#12
|
|
|||
|
I followd your directions but i still cant get it to work, all that happens is the server runs but then its says invalid syntax socket?
|
|||
|
#13
|
|
||||
|
Can you post the complete error message ?
............................................
* Don't laugh ! English is not my first language ...
|
||||
|
#14
|
|
||||
|
OMG this is just waht i need make raelly cool mmorpg... i am making team will people pls sign up help make my game? Thanks!!!111!!!!111 lolz
Just kidding... This is really great morgade (although I don't think I can test it), thanks a lot for this excellent contribution to the BGE community. This makes a great addition to Social's FPS and Walkthrough templates. Maybe in the future we'll have more templates and therefore fewer stupid questions? All we need now is the "raelly cool game" template...
............................................
"Boy meets girl, girl meets boy.......boy asks 'what to do next' on 3d artists forum." - M@dcow "I'm so tired of all my actions having consequences!" - T-rex, Dinosaur Comics Into The Titan | Sunrise: A Webcomic | Art ~ ENOUGH WITH THE ZOMBIES |
||||
|
#15
|
|
||||
|
Quote:
![]() ![]() PHEw ![]() This multiplayer template is a great idea! as far as i know this is the first time it was made( I know it was thought of more than once). Also, nice choice of pong for a template, its simple and anyone who wants to learn networking in blender can easily do so with this.
............................................
ChuZzy09 |
||||
|
#16
|
|
||||
|
hmmmm ... I think that you mised the BZoo (alias BlenderZoo) template, which is working pretty well allready !
the only thing is that I never been able to have the server noticing the disconnection of players when running on Linux, so I left it where I was with it last year .... But I think it could be corrected by some python guru out-there ... |
||||
|
#17
|
|
||||
|
This worked Perfectly on my computer. Great work. This is REALLY GOOD. Super fast framerate too.
It seems to work on blender 2.42a and blender 2.43. (with python 2.4). |
||||
|
#18
|
|
||||
|
When I try to run it from my computor ro my bros with the server runing on mine it gives him a massage in the console saying "no attebte 'myid'" what do I do?
|
||||
|
#19
|
|
||||
|
Cool! I always wanted to figure that out.
............................................
Where to start in Python |
||||
|
#20
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|