Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: a multiply players game developed by WME.  (Read 8591 times)

0 Members and 1 Guest are viewing this topic.

yaobifeng

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • View Profile
a multiply players game developed by WME.
« on: August 13, 2008, 01:33:03 PM »

I use WME developed a  multiply players game.The server use JAVA +Tomcat+ SQL SERVER2000.player can login the server,chating each other,also can upon the game data to  server and query reports from server.player can see others moving,speaking in himself's client.here is the screenshot:

user login:

regist user:

scene1:

scene2:

scene3:
« Last Edit: August 14, 2008, 04:49:57 AM by yaobifeng »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: a multiply players game developed by WME.
« Reply #1 on: August 13, 2008, 08:42:45 PM »

That looks incredible. I'm sure many people (myself included) would like to hear more about the technical background of this achievement ;)
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

mylesblasonato

  • Developer
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 265
  • "Give up is to fail as sacrifice is to succeed"
    • View Profile
    • Royal Wins
Re: a multiply players game developed by WME.
« Reply #2 on: August 14, 2008, 03:41:48 AM »

WTH!!!! That looks awesome. I didn't know external coding could allow for a multiplayer game in WME. This must be a breakthrough. More info would be great.

Cheers ::beer
Myles Blasonato
PS: I wish i could play the game but i can't read that  language :(
Logged
Lead Game Designer, Royal Wins.
@mylesblasonato
@royalwins
http://au.linkedin.com/pub/myles-blasonato/26/600/a38

yaobifeng

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • View Profile
Re: a multiply players game developed by WME.
« Reply #3 on: August 14, 2008, 05:32:40 AM »

haha :D,first,thanks for Mnemonic's perfect working.WME is powerful!!I will write some technical details so any others can  use for reference.

  • game background:    
        This is a business  simulation RPG game,players(3-6 players) set up some  companies,each play acts a duty such as CEO,CFO,CTO and so on.
    Each company will receive a sum of money at the first,then every need to do lots of things:hire office,buy productlines,invite employees,buy materials,design and develop new products,sell products........., all of the companies will compete each other.
  • game frame
        I decided to use WME to finish the game client.of course the game need a server program(i use java write some struts actions and use tomcat to run it,game data was stored into the sql server2000).
  • network
        The WME client program can connect to the JAVA web server?yeah,it seems impossible if we only use itself's ability.so we use delphi writen a DLL file.There is some functions in the DLL,one of them called http_get(url,result),ok,now we can call it in the game script by follow  steps:
    1.declare the dll function in the base.script:
    external "gui.dll" int http_get(string,string);//arg1:http url address;arg2:return value
    2.we can call it like this:
    var rt=new String(100);
    http_get("http://www.dead-code.ogr/test.jsp?arg=1&arg=2&arg=3...",rt);

    we send our client program's data by arg=1&arg=2&arg=3...,and the server will return the result in variable  rt,our server sometime return a XML string and sometime return a split string(ex:"123#456#abc#def").
    we call DLL  function to  parse XML string and call WEM's String.Split(..) to parse split string.String.By the way,String.Split(..) has  more high performace than DLL XML function.
  • GUI
        The WME itself's GUI is not strong,we use jsp web page(html,css,javascript....) to  implemented  most of the windows,the WME client open this page by call the DLL function http_webbrowser(url).This solution cause our game can only run in the window mode.........,but i think it's worthwhile.
  • multiply player
         client  side
        Our WME Client  store the players in a global array:
        actors["tom"]=Game.LoadActor3D("actors\....\p.act3d");
        We can get every actor by their name:
        var act=actors["tom"];
        server side
        We have a table to store all player's location,scene....,each WME Client  need to report it's latest status and  get the players list from server  at a certain time rate(such as every 100ms),

    var rt=new String(2000);
    http_get("http://...../LoginAction.do?p0=9&p1="+courseid+"&p2="+companyid+"&p3="+studentid+"&scene="+Scene.Name+"&actor="+actor.Name+"&x="+actor.X+"&y="+actor.Y,rt);   

    by parasing the string rt. our client program can know how many actors are online,each one's location,scene,who are speaking,speaking what.....
  • others
    how to display a custom text on the head of the actor?
    do it in the actor's script like this:

    var WinSubtitles;
    var tiptitle;
    while(1)
    {
    if(WinSubtitles==null)
    {
    WinSubtitles = Game.CreateWindow("subtitles_window");
    //WinSubtitles.SetImage("interface\bst\actor_card.tga");
    }
    if(tiptitle==null)
    {
    tiptitle= WinSubtitles.CreateStatic("speaker_name");
    tiptitle.SizeToFit();
    tiptitle.SetFont("fonts\arial_头
« Last Edit: August 14, 2008, 06:59:53 AM by yaobifeng »
Logged

yaobifeng

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • View Profile
Re: a multiply players game developed by WME.
« Reply #4 on: August 14, 2008, 07:05:41 AM »

WTH!!!! That looks awesome. I didn't know external coding could allow for a multiplayer game in WME. This must be a breakthrough. More info would be great.

Cheers ::beer
Myles Blasonato
PS: I wish i could play the game but i can't read that  language :(
::beer
the language is chinese,welcome to BeiJing,the Olympic Games is in progress.
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: a multiply players game developed by WME.
« Reply #5 on: August 14, 2008, 10:26:01 AM »

WOW!!! Just WOW!  you've showed us again how wme is powerful tool. This really gives a lot of thought to all of us in here.  :o

Thanks for sharing!  ::beer
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: a multiply players game developed by WME.
« Reply #6 on: August 18, 2008, 05:21:42 AM »

amazing stuff.
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

beiduo

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: a multiply players game developed by WME.
« Reply #7 on: August 23, 2008, 02:37:13 PM »

姚兄
Logged

yaobifeng

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • View Profile
Logged
 

Page created in 0.02 seconds with 20 queries.