Author Topic: Sorting an array numerically - silly me  (Read 4283 times)

True, but can you create GUI objects on a dedicated server?

Yes. Just remember to delete them when you're done.

If you really wanted to you could also create a canvas and make an actual gui for the server :D

So... You mean that while the server is running you can manually create the canvas window and use it as it was a normal client? That sounds insane!

There's actually no difference between a dedicated server and the "server" part of a listen server. It's just running a server and a client that is locally connected to it in the same process.

You can also convert a listen server to a dedicated one by deleting the local client and closing the canvas window.

The GUI stuff is engine based so it'll be on both server and client. Most/All engine methods will be on both server and client.

Mind if I ask how that's more efficient than the method I posted since it has noticeably more lines?
https://www.toptal.com/developers/sorting-algorithms

google sorting algorithims comparisons or something like that and you can see comparisons of the algorithims in action. despite there being objectively faster algorithims, even the slow ones are used often enough due to no need for the extra speed, or wanting to have partially sorted lists while the sorting is in progress, or some other quality like stability (relative ordering of same value objects kept). note that the speed of sorting also can depend on how the original set is unsorted, which also plays a factor in deciding what sorting alg is good to use

also when measuring speed of sorting, typically the measure used is comparison operations required. there are alternative sorts though that make no comparisons whatsoever - msd/lsd sort comes to mind. those are really cool.
« Last Edit: February 25, 2017, 08:44:44 PM by Conan »

here's a good video of seeing sorts in action
https://www.youtube.com/watch?v=kPRA0W1kECg
note that you're using something similar to a bubblesort, at about 4 minutes in

edit: another good one based on types of data it's sorting on
https://www.youtube.com/watch?v=ZZuD6iUe3Pc
« Last Edit: February 26, 2017, 01:09:47 AM by phflack »

There's actually no difference between a dedicated server and the "server" part of a listen server. It's just running a server and a client that is locally connected to it in the same process.

You can also convert a listen server to a dedicated one by deleting the local client and closing the canvas window.
The GUI stuff is engine based so it'll be on both server and client. Most/All engine methods will be on both server and client.

This is indeed interesting information. However, there's one thing that bugs me: I found one crucial difference between client and dedicated server, and that is that when you start as a client a function named ClientVerifyAddOnScripts will exist, but when starting a dedicated an another function named VerifyAddOnScripts exists instead. Of course, if being a host with a client both functions will be available, but these functions directly tell you the difference between a client and a server.

That's because those are not engine based functions. They are only in the dsos for client/server

When you create a function it's always there until you close the game. Dedicated servers will only init the server-side functions while non-dedicated servers start as a client and then turn into a server, therefore it has both client and server functions.
« Last Edit: February 26, 2017, 02:46:10 PM by Kyuande »

The GUI objects are built into the engine, and the engine is obviously always loaded up.
Furthermore, the sort built into the GUITextListCTRL is made in C++, so it's oodles and oodles faster than any sort you could possibly make in torque.

The GUI objects are built into the engine, and the engine is obviously always loaded up.
Furthermore, the sort built into the GUITextListCTRL is made in C++, so it's oodles and oodles faster than any sort you could possibly make in torque.

Of course. I just made it, because, why not?

Fun fact: you can actually hijack the dedicated server initialization and create a dedicated server management GUI. (source: did it, have files if somebody wants them)

Fun fact: you can actually hijack the dedicated server initialization and create a dedicated server management GUI. (source: did it, have files if somebody wants them)

If you really wanted to you could also create a canvas and make an actual gui for the server :D

A sorting implementation in torque script will be slower.