Forum Replies Created
- 
		AuthorPosts
 - 
		
			
				
I had a look at SocketStreams and found it has a SendString method I don’t know how I could have missed that. It all compiles now so it’s onto testing to see what I get from the streams the other end
This could also be related to video memory or drivers so I wouldn’t read to much into it.
Thanks guys I think I will go with the sockstream method as it’s for networking
will try casting like that I always thought it was Void Ptr (string) sort of like how C does it.
Still going strong just done the conversion methods to take Integers and give me a four byte string (used for networking stuff) and converting things the old functions worked but failed sometimes these new ones work flawlessly. Now they are complete I can get the networking ‘send’ system done that will enable me to send messages to and fro across the network environment.
One thing that has come to light is that the old system never allowed for ‘Hosted’ games they were always dedicated this was a oversight on my part and the new system will allow you to do just that :). Yes I have also added in code to make it so if you do not have the correct username or password the network disconnects the client
Will do
Well after some bug hunting which Mark helped me sort out I now have the basics down, the output for the networking library is:
SDL_WINDOWEVENT_FOCUS_GAINED
Server @this-pc:44444 listening
Client @this-pc:53358 connected to server @this-pc:44444
Client @this-pc:53359 connected to server @this-pc:44444
New Client :this-pc:53358
New Client :this-pc:53359Finished debugging app.
As you can see I have put two clients in to test the system, next up will be sending packet data between the clients and server. Thanks to Mark the conversion system is now done so I can start sorting the packets out and go from there, packets themselves form one of the major sections of the whole system and once they are in there I will be able to authenticate clients and transmit and receive data.
On the Star Rogue front the networking will form a solid foundation to build the game from as its going to allow for multiplayer I can get it right first time rather than tacking it on later and its not perfect. Once I have more done I will release a networking demo for everyone to play around with
Ok firstly thanks Mark for your help on this one, it turns out when importing external files with namespaces etc having Globals initialized outside of a class Method/Function causes the MAV. I moved the declaration inside the class that uses it and added the initializer (New) to the New method for that class and now it works perfectly :).
Its one of the things that MX1 used to do which I will have to unlearn as I was always initializing variables as I created them which was bad practice in some cases
will try that and see what happens
Things are going quite nicely on the networking front I’m putting together a whole new networking library and making an example to go with it as well. Some would say it’s jumping in the deep end with weights tied to me feet but I want this version of Ultim to be the final one and one which I can improve on instead of recoding again later.
looking nice might have to fire up Quake 1 it’s been a while
Well after converting code over from BlitxMax to MX2 I have decided to rewrite the entire networking library using MX2 friendly code. As it was the old system was brilliant at what it did but converting it over was much more than I had anticipated there is loads of old code in there that converting over would have been a pain to do. Recoding the entire thing will allow me to bring it upto date and add in the new connections switch so the system doesnt have to allow new connections if its not required.
Sometimes recoding sections is a good idea and one which I’m enjoying as I go.
@cocon: also running mx2 from a USB key is impossible using paths as the drive letter changes.
it’s modular so most of the Ultim modules only call themselves it’s more complicated for the game though but I’m enjoying the challenge :).
Coding feels like coding once again instead of bolting bits together.
Basically you have a module folder that when compiling MX2 looks at for imports and includes etc. This makes it so you can have one copy of your source code and edit that instead of copying it for each project.
In MX1 I had a edzup folder with Ultim in the list so a simple import and it was there from any source code anywhere.
 - 
		AuthorPosts