The Daily Click ::. Forums ::. Klik Coding Help ::. Object association and Lacewing
 

Post Reply  Post Oekaki 
 

Posted By Message

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
20th November, 2009 at 04:10:26 -

Having worked hard to try and make this work, I just simply cannot, it seems. I am working on a movement engine for an online game in Lacewing, and each peer will consist of six objects: a shadow (active), a player (active), a banner (active that backs avatar and name), an avatar (ActiveX), a name (String), and a speech bubble (Text Blitter). When a player joins the channel, they do a peer loop. On any peer loop or any peer connection, the game creates the six objects mentioned above and sets alterable values and alterable strings to the Peer Name and Peer ID (except for the String object which sets the alterable string and the ActiveX which uses Value Add to set the ID). Based on the IDs and/or names, matching objects are then set in a position relative to either the player object or the banner.

http://sites.google.com/site/jlambsoft/Home/games/problem.mfa

The file above contains the events currently in use to make the objects position themselves as well as older events that did the same thing (marked with Never so that they don't occur). The problem with the code is that it works as long as there are only two people in the room. If a third person connects, that third person will not see the first person's objects align properly, as well as subsequent users that come in later. The first and second people tend to see everyone properly.

Can anyone help me? If you can I'll give you 1000 DC points!

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
20th November, 2009 at 04:16:01 -

I could help you if I could figure out what was going on?

When I run the app it just says login please.
I've done this already with 3 objects per peer.

If you'll explain where the code is that I'm trying to modify I'll fix it for ya!

 
n/a

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
20th November, 2009 at 04:34:41 -

Thank you for attempting to help so quickly!

I set it to use a local server, which I forgot to mention, so you'll have to change it first. It connects on Start of Frame, so just look for that.

The code in question is the entirety of the Peer group. Also, I used Lacewing Beta #4 for blasting.

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
20th November, 2009 at 04:36:44 -

Alright, I see the code, but man that's messy!

Would you mind if I just created a new example for you to look at? I can do it very quickly.

 
n/a

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
20th November, 2009 at 04:47:00 -

Please go ahead! I made no effort whatsoever to organize the code.

Please make sure to include all six objects or at least some comments so I can apply it to mine. Thanks!

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
20th November, 2009 at 05:05:47 -

Here is the example so far. It has everything you want in it, but it isn't done. I didn't add the peer names or the chat messages yet.

Take a look, and I'll go finish it up.

OK here's the final version. It has user names under each peer. Chat messages pop above their heads, and they all have shadows.

It worked with 10 clients at once, so it should be fine!

http://www.jsoftgames.com/LacewindGUIChat.zip

Edited by UrbanMonk

 
n/a

Jon Lambert

Administrator
Vaporware Master

Registered
  19/12/2004
Points
  8235

VIP MemberWii OwnerTDC Chat Super UserI am an April FoolSSBB 3265-4741-0937ACCF 3051-1173-8012360 Owner
21st November, 2009 at 03:06:33 -

Thank you UrbanMonk! Your points are on the way!

I didn't use your code, but it gave me the idea of moving all the objects separately as opposed to relative to the one object, and it works perfectly now!

 
Sandwich Time!Whoo!

JoyCheck & KeyCheck Widgets
For easy implementation of customizable joystick and keyboard controls.
http://www.create-games.com/download.asp?id=8364
   

Post Reply



 



Advertisement

Worth A Click