wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > Samples
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 02-13-2009, 04:56 AM   #16
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

Quote:
Originally Posted by Blackroot
Stop caring what the values are thrown at it; let bots worry about it. The reason being this requires wc3 to take precious processing time and the least of it you can use the most likely to be standardized.

Don't use strings; use integers. If someone needs alot of information passed this will eat memory and bandwith. Also; how are you bots reading this information? It's possible you could use an array as a stack of pending things to be parsed and have it emptied every packet <not sure how you'd dump it every packet though; some sort of sync trick?>

Anyways; I can see why this would be useful. Right now though I think it still needs work.

I am not removing the input validation. Not validating your input is the classic dangerous mistake. You may have also heard "Be strict in what you emit, and liberal in what you accept" before. There's a reason good programmers do these things.

Checking the input isn't even expensive. Look at how much work needs to be done to pack a string. Consider that you'll hit bandwidth problems for dial-up users before you even get close to taxing the cpu. The solution is not to remove input validation, but to avoid emitting data ten times a second.

Queuing the output is a reasonable idea, but I want to leave that up to the map makers. It would be disastrous if someone decided to emit a bunch of end-game data, and players left before the queue emptied.

How do you propose I use integers instead of strings? Values have names so people understand what the heck they mean, and the arguments to SyncStoredInteger are all strings to begin with.

The outputs are a bit verbose, but with reason. The 'def' and 'flag' lines are only used once per value or player, so who cares. The 'set' line is going to be dominated by the player and variable names. The reason I'm using player names instead of player IDs is to make it easier on the parsers. The player IDs included in replay and network data are not the same as the in-game player indexes. They depend on the join order. Maybe I should change it so the system only outputs enough characters to uniquely identify a player. Even better, I will change it to output the player IDs at the start.
__________________
Don't pay attention to this signature, it's self-contradictory.

Last edited by Strilanc : 02-13-2009 at 04:56 AM.
Strilanc is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 02-13-2009, 06:14 AM   #17
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

I've updated the library. There is now initialization data containing player names and PIDs, which allows later messages to only include the PID instead of potentially long names.

I've also added the 'event' and 'custom' messages.
__________________
Don't pay attention to this signature, it's self-contradictory.
Strilanc is offline   Reply With Quote
Old 04-24-2009, 11:52 PM   #18
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

The system is moving out of beta, and I've posted version 1.
__________________
Don't pay attention to this signature, it's self-contradictory.
Strilanc is offline   Reply With Quote
Old 04-25-2009, 12:53 AM   #19
Toadcop
BuranX
 
Toadcop's Avatar
 
Join Date: Jul 2006
Posts: 1,886

Submissions (4)

Toadcop is just really nice (299)Toadcop is just really nice (299)

Approved Map: TcXSpell Making Session 10 Winner

Send a message via ICQ to Toadcop
Default

Quote:
so its important to push on both fronts.
why it's important ? =)
__________________
Toadcop is offline   Reply With Quote
Old 04-27-2009, 01:07 PM   #20
Karawasa
Element Tower Defense
 
Karawasa's Avatar
 
Join Date: Feb 2006
Posts: 1,094

Submissions (2)

Karawasa has a spectacular aura about (78)Karawasa has a spectacular aura about (78)Karawasa has a spectacular aura about (78)

Approved Map: Tropical TagApproved Map: Element TD

Send a message via AIM to Karawasa Send a message via MSN to Karawasa
Default

This is some good stuff; one of the more useful scripts in my opinion.
__________________

Element Tower Defense - Premier WC3 Custom Game

Last edited by Karawasa : 04-27-2009 at 01:08 PM.
Karawasa is offline   Reply With Quote
Old 05-07-2009, 04:27 PM   #21
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

uh C#, I'll need someone else to take a look at this, not sure though.

Could you have a documentation that specifies the standard and how to parse it and then make the C# thing a separate submission so that it can go to tools?
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 05-07-2009, 06:03 PM   #22
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

The 'documentation' is inside the hidden tag in the main post. I'll follow the suggestion and move the parser stuff to tools. Maybe the system code will fit inside the maximum post size limit after that.
__________________
Don't pay attention to this signature, it's self-contradictory.
Strilanc is offline   Reply With Quote
Old 05-07-2009, 06:32 PM   #23
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

Alright, I've split the posts and I managed to partially fit the system by culling a lot of comments.

I've also changed the post tag to [system], since it's definitely more than just a script now. but it doesn't seem to have changed the thread title.
__________________
Don't pay attention to this signature, it's self-contradictory.
Strilanc is offline   Reply With Quote
Old 05-22-2009, 01:31 AM   #24
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

all right then . Approved.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 07-05-2009, 02:26 AM   #25
Kueken
User
 
Join Date: Mar 2009
Posts: 149

Kueken will become famous soon enough (41)Kueken will become famous soon enough (41)

Default

Guess this could be improved speed-wise with the new hashtables? Or will it make the output data too confusing, because of no more strings? (well should be no problem for a replay parser or a bot)
Kueken is offline   Reply With Quote
Old 07-05-2009, 03:37 AM   #26
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

Parts of it will be improved, but game cache will still be required. I don't think hash tables don't have a sync command to send network data.
__________________
Don't pay attention to this signature, it's self-contradictory.
Strilanc is offline   Reply With Quote
Old 03-24-2011, 05:58 AM   #27
PsycoMarauder
User
 
PsycoMarauder's Avatar
 
Join Date: Jun 2006
Posts: 94

PsycoMarauder has little to show at this moment (3)

Send a message via AIM to PsycoMarauder
Default

I made a map called risk next gen and use this to transmit data for our league. Something I've noticed though is that occasionally the data isn't sent, and it doesnt appear to be the map code. Someone on the ghost++ forums made a post about how the MMD system won't work if there's only 1 player left in the game at the time of saving the data. Is this true?
PsycoMarauder is offline   Reply With Quote
Old 08-16-2011, 08:13 PM   #28
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

Quote:
Originally Posted by PsycoMarauder
I made a map called risk next gen and use this to transmit data for our league. Something I've noticed though is that occasionally the data isn't sent, and it doesnt appear to be the map code. Someone on the ghost++ forums made a post about how the MMD system won't work if there's only 1 player left in the game at the time of saving the data. Is this true?

No, the information still goes into the replay. I tested it solo all the time.
__________________
Don't pay attention to this signature, it's self-contradictory.
Strilanc is offline   Reply With Quote
Old 08-17-2011, 10:59 AM   #29
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

Don't the new ghost bots leave the game after ~10 seconds when there's only 1 player left (and make him/her the new host)? It wouldn't get the full replay then so some data would be missed.
Fledermaus is offline   Reply With Quote
Old 08-19-2011, 05:32 PM   #30
Strilanc
User
 
Strilanc's Avatar
 
Join Date: Jun 2007
Posts: 917

Submissions (4)

Strilanc has a spectacular aura about (131)

2008 Spell olympics - Fire - Gold

Default

Quote:
Originally Posted by Fledermaus
Don't the new ghost bots leave the game after ~10 seconds when there's only 1 player left (and make him/her the new host)? It wouldn't get the full replay then so some data would be missed.

I can't do much about that on the script end of things. The information will still be in the player's replay, though.
__________________
Don't pay attention to this signature, it's self-contradictory.
Strilanc is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 04:22 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services