Hey, Quick and simple question.. How would I get the player to download an Array from a peer (Array object), or download the file.
Printable View
Hey, Quick and simple question.. How would I get the player to download an Array from a peer (Array object), or download the file.
Create a fastloop in mmf, and send all the data in the array to the other peer ;)
I did that but it doesn't load them all, It loads a few blocks every time I reload the frame of 2 clients. I was thinking that was becauase it's 2 fast. it's tryna send like 1200 messages in like 5 seconds, I could do without fastloops but then it would take alot longer to load.
I'm in the process of making an example, but it seems Jamie made a mistake with some of the names of some of the expressions... I'm working around it atm.
EDIT: Here is the example. It does not actually work, I just wrote code that *should* work; it is meant to show you the concept of it.
@LB
Thanks but, I had to change it from sending to peer to sending to channel otherwise nothing happened. But then now it just constantly loads for the peer, it's been trying to load the app for like 10 minutes now and idk if it will eventually load or it will just do nothing.
As you can see in this here picture, It constantly is loading. I don't know if it's the level array it's loading or there's something wrong with my code.
http://c0066373.cdn2.cloudfiles.rack...com/JRF22w.png
How would I know? I just made example code of your request:The implementation is all up to you. And in your picture I do not see it 'constantly loading', rather, I see that it either did not send the new array, or did not load the new array after it was done sending. Like I said, my code is JUST sending the array, it does not handle anything else like setting up the transfer or saying when it is done. You have to do all that yourself because you understand how your game works and I don't ;)Quote:
Originally Posted by dcrew
I did exactly that, it is loading for the peer. If you look closely into the picture you will see that the peer client has "not responding" because it's trying to load too much.
Hm, I will look over my code then...sorry for not seeing that before, the forums shrink images but when they do that they don't have a click to enlarge feature.
EDIT: I'm not sure what it could be. More specifically, are you using a string or number array?
number array, and if this is not a possible way, would there be a way for a person to download from another person to do it that way.
extra information, using lacewing build 13 or 14 (I think 13) and I'm using only X+Y not Z in which I triggered with your code to change.
I actually tested it and changed something and it loaded but all the loaded blocks we're in the top-left corner and not the correct locations. I looked into it and I see that the X never adds 1 to the current X dimension index only the Y. I tried adding the +X 1 but still the same.
It appears it is working, I made the peer save the array to a temp arr file after it sends it all and it appears it works and the map does get transferred, so there must be something wrong with my loading map for peers. I'll take a look and let you know if I get this.
Ok I did it and it's working! hooray! But it only loads part of the level, It's like as-if sometimes messages don't get through (stacks).
Here is much simpler code for sending a 2D array, rather than having to send as a file...
Yours is awesome, speedy and much better than mine. Though still a problem, The block are not in correct positions but I think I know why, My maps use a *32 grid layout (on place block>set block pos;mousex/32*32+16) and I changed the loading to fit that, Could you possible change your nice project to fit a grid align 32x32. Thanks LB!
Are you saying your array sizes are the sizes in pixels, but the blocks are only at 32 pixel intervals? That's a huge waste of space... What you should do is save the position in the array at (XPos / 32, YPos / 32) and then load it back and position it at (XPos * 32, YPos * 32). Arrays are much smaller, and this is how it is normally done anyway ;)
Nice idea!! will try it now and give feed back!
You really must update to 17! I don't support old builds (and nobody should try to help people using old builds, either).Quote:
Originally Posted by dcrew
@Jamie the last time I got that it crashed my games.
@LB I've had no luck, It still just constantly loads, It does save map /32 and I remade the maps in my editor so.. And when it loadsv backup it *32 so I really don't know what I'm doing wrong here.
The only thing I can think of is to update lacewing.
When you say it crashed your games, it is because some actions need to be replaced with new ones (they say "Please replace this!"). Just replace them and it will work.
I don't use MMF2 : 249. Don't ask me why.
I don't think that will be the cause though because I did have it working at one point the only problem is sometimes the odd few block didn't load.
You should update MMF2 and Lacewing. It's most probably a problem with an old version. Here, I'll give you the links:
MMF2 Standard latest stable build: http://www.clickteam.com/webftp/files/mmf2/update/mmf2b249.exe
Lacewing #17: http://lacewing.aquadasoft.com/Lacewing.zip
@Ravenius Ok thankyou I'll give it an attempt.
Sorry - I guess from your signature that you have MMF 2 Developer - so if the MMF2 update above won't work, try this link instead: http://www.clickteam.com/webftp/files/mmf2/update/mmf2devb249.exe
Yea thanks I just tried them both now since I have time now and I get this:
http://c0066373.cdn2.cloudfiles.rack...com/eTjoCg.png
Hmm, try filling out this form with all your information (including your serial number) so Clickteam can reproduce the problem: http://www.clickteam.co.uk/contact.php
Ok will do thanks Jamie.