123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|676|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Types, Functions and what not....again....

Wed, 16 Apr 2008, 21:30
Orion Pax
Ok so now....I need to find a way to send my info one line at a time instead of all 50 instances of my type 50 times before it starts to handle the netcode for the players....

What I have now is for each loops that goes through each type and STR(TYPE) each instance so it sends all fields of my type in one go. So if I have 50 planets it will send all the info for 1 planet in one go (1 message) then it will send planet 2's info (message 2) and it keeps this up until all 50 planets are taken care of until it does anything else....Now this aint a problem with 50 its just eventually it will be 200 and ports will be 200 so I need to shove 1 instance of my type (eg.. send planet 1, run netcode, send planet 2, run netcode)

Now remember...this is a function that handles the messages...and all my info is in types.

I am using blitzplay pro to send a message its structure is like this BP_Message(TO,FROM,MSGTYPE,DATA,RELIABE). Set Reliable to true so it simulates TCP. We always set FROM as HOST_ID because this message is from the server. TO will be set as msg\msgFrom as that is the individual that we are replying to. So with msgtype and data how could I iterate through a type in a function to send 1 instance of a type at a time.....

If I do



with that code in a function will it still iterate through and not lose its place? What if I also have a planet.planetinfo = each planetinfo somewhere else in my code will that change the sendplanet pointer? Or are they seperate pointers?
Thu, 17 Apr 2008, 05:37
Orion Pax
Is there a way that I could setup a function and type so that each player has its own pointer to my types? So they wont lose their spot or should I just make everyone else wait in line?
Thu, 17 Apr 2008, 06:37
Paul
using the str function will only use more bandwidth, do something like this:






Thu, 17 Apr 2008, 10:51
Orion Pax
I would but I am using blitzplay pro for network instead of writing my own network code.