Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 1,395 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
EVENT_RECEIVE help #229333
09/26/08 14:53
09/26/08 14:53
Joined: May 2008
Posts: 91
Eugene, OR. USA
ATOMIX Offline OP
Junior Member
ATOMIX  Offline OP
Junior Member

Joined: May 2008
Posts: 91
Eugene, OR. USA
I have been able to trap the EVENT_RECEIVE event_type on the dedicated server (connection = 1). My question is:
Code:
if (event_type == EVENT_RECEIVE)
{
   // What does it receive????
}

Anybody know how to read what it receives?
Appreciate any help.


ATOMIX Productions
ATOMIX Group LLC
http://theatomizer.com
A7 Pro 7.50
Re: EVENT_RECEIVE help [Re: ATOMIX] #229465
09/27/08 19:07
09/27/08 19:07
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline
Expert
Locoweed  Offline
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
This event is triggered when the entity receives a skill sent by send_skill.

Code:
...
// on server/host
pEnt.HideMe = 1;
// send skill to client that created this ent and make invisible there only
send_skill(pEnt.HideMe,0); 
pEnt.HideMe = 0;
...

function receive_event()
{
  if (event_type == EVENT_RECEIVE)
 	{
            // hide me ?
            if(my.HideMe == 1)
            {
                my.HideMe = 0;
                set(my,INVISIBLE);
            }
            if(my.MakeMeGlow == 1)
            {
                my.MakeMeGlow = 0;
                Glow(my);
            }
 	}
} 

function LocalAction()
{
  // set local events
  my.ENABLE_RECEIVE = ON; // sensible for this event
  my.emask |= ENABLE_RECEIVE;
  my.event = receive_event;
}

action actPlayer()
{
  proc_client(my,LocalAction);  // set events to happen on client

  ...
  // Host action
  my.ENABLE_RECEIVE = ON; // sensible for this event
  my.emask |= ENABLE_RECEIVE;
  my.event = receive_event;
  ...
} 	


It doesn't really receive anything, it just lets you know that this entity just received a skill update by the send_skill() command. You will have to figure out which skill was sent like above. I am sure it might have it's uses, but I can't think of many. Maybe useful for sending a skill to only one client and starting a local effect on that client only through EVENT instead of a while(1)-wait(1) loop on the client, something like that, but not very useful really that I can see.

Loco


Professional A8.30
Spoils of War - East Coast Games
Re: EVENT_RECEIVE help [Re: Locoweed] #229691
09/29/08 16:44
09/29/08 16:44
Joined: May 2008
Posts: 91
Eugene, OR. USA
ATOMIX Offline OP
Junior Member
ATOMIX  Offline OP
Junior Member

Joined: May 2008
Posts: 91
Eugene, OR. USA
@Locoweed: you are awesome! Love your logo! Great to hear from you. I have been using your multi-player code as the base for my online world. I will admit I have had some problems. Not with your code, but with trying to get some speed out of it. I am running on a fiber optic network in Eugene, Oregon at 21,941K down and 2,375K up with a static ip. Your Multi-Player code should be screaming, but it just creeps along. The latency is low at about 25, BPS is reasonable at around 250 - 300. So I have been trying to trap the variables/skills sent to the dedicated server and this event seemed to be the only way to trap them. Then I can use diag_var() to log what's happening. I tried doing that in your code at the function player_events() but when I tried to log the skills that were received I crashed. Arrrrgggg..... Probably because I don't really know what I am doing yet. I am just muddling along. This is a strange networking system, not what I am used to working with. This networking system doesn't seem to have been planned very well. Logging what a dedicated server is sending and receiving should be very simple. Adding a Master server to manage multiple dedicated servers (each running a different level) should also be very simple.
Another problem I have had is when the client disconnects everything seems to work fine but when you reconnect it really slows done to almost nothing. It's like the server never gets rid of the clients info.
Do you think the networking system in 3DGS needs to be replaced with another system like RakNet ($100.00 per title) or ENet (which is free)? I ask this because I will do it now rather than wait and have to recode later.
I have been meaning to communicate with you and ask how your project is going and is it multi-player? What kind of problems have you been having, if any?
By the way I have Pro 7.50 in case you wondered.
I greatly appreciate any input you have.


ATOMIX Productions
ATOMIX Group LLC
http://theatomizer.com
A7 Pro 7.50
Re: EVENT_RECEIVE help [Re: ATOMIX] #229937
10/01/08 18:57
10/01/08 18:57
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline
Expert
Locoweed  Offline
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
I would probably use RakNet.

Loco


Professional A8.30
Spoils of War - East Coast Games

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1