Valhalla Legends Forums Archive | Battle.net Bot Development | Massloading?

AuthorMessageTime
PaiD
How would you massload? Like zds and chewy can massload an unlimited amout of times. How did they do that? I am not talking about the copying and pasting the exe to a different stop and load them at the same time.
March 25, 2003, 3:05 AM
Camel
well, you could start out with mdi windows
create a new mdi form, just like you would create a new form, but select mdi form instead. then, make your frmmain or whatever form you want to massload an mdi child. then change your startup form to the mdi form.

to load new windows in the mdi form, run this code from somewhere in the mdi form
[code]Dim NewForm as frmWhatever
Set NewForm = New frmWhatever[/code]



or something like that...entirely from memory
March 25, 2003, 5:25 AM
n00blar
Yes, however chewbacca bot did use multiple forms, it used multiple threads... look up information on CreateThread() in the Windows API. You should also read up on how to _safely_ use multithreading inside of Visual Basic 6.0 or you will run into some _serious_ problems. Alternately, if you know the language well changing to .NET shouldn't be to hard and it supports free threading.
March 25, 2003, 6:19 AM
Skywing
[quote author=n00blar link=board=17;threadid=813;start=0#msg6374 date=1048573194]
Yes, however chewbacca bot did use multiple forms, it used multiple threads... look up information on CreateThread() in the Windows API. You should also read up on how to _safely_ use multithreading inside of Visual Basic 6.0 or you will run into some _serious_ problems. Alternately, if you know the language well changing to .NET shouldn't be to hard and it supports free threading.
[/quote]It's not always necessary or even desirable to create one thread for each bot instance. Each thread takes up a signifigant amount of overhead, and unless you're using a multiprocessor system, that will only translate to lost performance. Even if you're using a multiprocessor system, creating more threads than the number of available processors will generally still be hurting performance.

BinaryChat, for example, allows you to start any number of bot instances from one thread - as long as you use asynchronous operations, this poses no problem.

Additionally, it might be a good idea to make the bot's user interface separable from the bot connection. For instance, you might not want each bot to have it's own window - you might want to share one window for all bots, and switch which bot's information is being displayed based on some user command.
March 25, 2003, 5:47 PM
Camel
[quote author=Skywing link=board=17;threadid=813;start=0#msg6387 date=1048614469]Additionally, it might be a good idea to make the bot's user interface separable from the bot connection. For instance, you might not want each bot to have it's own window - you might want to share one window for all bots, and switch which bot's information is being displayed based on some user command.[/quote]

in vb, the best way to do that is probably to make the winsock control an array
click on the socket at design time, and set it's "index" property to "0", and then load sockets: [code]Load sckWhatever(Index)[/code] then every sckWhatever_event will have index as the first paramater
March 25, 2003, 8:35 PM

Search