IrrNet - Irrlicht Network Framework 0.36 (Now Windows/Linux)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Code: Select all

.objs\Engines\irrNet\enet\win32.o:win32.c:(.text+0x603): undefined reference to `__WSAFDIsSet@8'
.objs\Engines\irrNet\enet\win32.o:win32.c:(.text+0x55): undefined reference to `WSACleanup@0'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 17 seconds)
0 errors, 21 warnings
well that worked I guess but now I'm getting something really strange.

this is obviously the last bit of it but they all deal with enet .o the object files for enet obviously.

whats really strange about this is it has NO ERRORS yet it still didn't produce an exe.. WTF?!

lol coding is crazy maybe I should go back to toolkit 2003.. but I left for a reason I don't want to find out what that was again.

I tried removing all the &'s but that starts throwing errors about those functions it seems to be all the & functions. methods whatever the gently caress ya call em.

I could be going in circles for days... any clues?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

You missed the flaming "undefined reference"

Did you remember to link to ws2_32.lib ? :roll:

(If all else fails try to get the source from monkey's version and see if that would work...)
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

any idea where to link it?
I did it right under irrlicht in the linker of code blocks I even defined WIN32 and got a warning of redefinition on that.

it can't find ws2_32.lib where I tried.
just a little more help please.

msvc did all this for me and its not working how it normally would.
I tried in the same place kernel32.lib and all the rest normally go.

how come I always get the stuff doesn't make a lick of sense lol.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

The lib is located in the platform SDK I think, so make sure thats in your linker directories.
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

I would add it in myself but I really don't understand eNet at all.

basically it'd be like this

if(client)
netmgr->getID();

So you'd get your computer's ID to the server.
I need this for my login system :P
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Actually, it turns out that "getPlayerNumber()" does indeed get your player ID, and it is only valid for CLIENTS not servers. This will be updated in the next releases' documentation. Coincidentally, an undocumented function exists for servers to retrieve the amount of players connected, and this is "getPeerCount()".

Remember when processing an inpacket you can use "getPlayerId()" so you know which player sent it.

Those two functions should be enough to provide you with a functional login system. :)

Cheers
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

if(!getPlayerId())
{
//then player must be server
}
else
{
//set chat target to this peer or something.
//maybe for target chat or something else even.
sendoutpacket(targetchat);

}

just a quick idea i had.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

That wont work. And its also pointless because your defining whether your a server or client at the start. What your saying is like "If I have nipples I am a woman." :lol:
lostclimategames
Posts: 331
Joined: Sat Sep 02, 2006 4:11 am
Location: Michigan
Contact:

Post by lostclimategames »

men have nipples too, admittedly my nipples arent as nice as a womans.... *smiles a bit, while daydreaming* but I still have them :D
___________________________
For all of your 3D/2D resource needs:
Image
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

its just psuedo code really.

I haven't tested it yet I did make a dedicated server though just waiting on yer file transfer update. 8)
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

after testing the dedicated server I noticed that the animation frames were being sent over the network and it causes the opposing player models to do a sort of strobe effect in their motion.

That doesn't seem correct considering the visual bug I think it would be better to define a set of frames into a animation mode like running or walking.. then just send the current mode which optimizes bandwidth and allows for proper animation motion.

I'm not sure of the correct way but I know in most games the animations are perfectly sync'ed on either side.. they might lag a tad or be out of sync compared to other clients but they would sync all models alike and create an illusion you probably wouldn't notice even with two client monitors side by side.

any rate the current system just won't do because its chopping out high speed animations with many frames and making it look slow and stupid.

edit: on second thought I can think of a few reasons you might want this such as accurate simulation or whatever. maybe turn sendFrameAuto into a alternate method and have the main default way of setting frame sets.

animation verbs if you will.
netmgr->SendAutoAnimVerb(); ? what do you think?

I know this would work for m2d models easily but what about others?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Im already implementing this into the next release.

The player must set the frame ranges for both the client and the server eg

setFrameRange1(524,3454);

and then you just mynode->sendPlayFrameRange1();

or something very similar.

EDIT: Or even better using enums:

enum{walk,attack,crouch};

mynode->setFrameRange(walk,234,944);
mynode->sendAnimationState(walk);

// Yeah I think that looks much cleaner...
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

mynode->sendAnimationVerb();

well it sounds better then it looks I like how it's logical and proper.
but I probably wouldn't use that myself.. state isn't much better though.

too many states already like gamestate or statemachine.

ignore my ranting this is great news for me and irrnet. 8)

BlindSide for teh win!
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

how do I get the server ID?

player 1 = 0... so uh.

more specifically how to I get the id of a packet sent by the server.

in my dedicated server I have an admin chat tag that I want to implement client side to save on bandwidth but I need the server id for that which doesn't seem to exist.

first I thought getHost would work but thats something internal i guess then I read a bit more and I see getPeer returns server when you are a client but that work either cause its not packet related.

for now I'm going to just change the packet id of the server I suppose that would work in most cases.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Your not thinking about this right, the server has no ID! You can just do:

if(!server)
{

then this packet must be from the server because there is only 1 and only 1 server!

}

But i am changing the starting ID to 1 in the next release so you can use 0 for your server packets I guess (Though it will be unneccessary because ALL packets the clients recieve are from the server so its very obvious who its from)

Note: packet->getPlayerID only works on the server-side, you are responsible for processing this and passing it on to other clients and including the playerID.
Post Reply