Hey everybody. I have some news. I am going to take composing classes soon. Whooppie!
My work is moving forward in speed of a snail, however, something is being done. Just updating.
Printable View
Hey everybody. I have some news. I am going to take composing classes soon. Whooppie!
My work is moving forward in speed of a snail, however, something is being done. Just updating.
Sounding good, Psy and Igor. I am still recovering from my illness, but I will soon be back in action =).
Z.
I think that I have figured out the theory for interpolating across a triangle. This will be used for the terrain stuff =).
Z.
Excellent. Zaei, will ToW be able to support bumpmapped textures?
Probably. =).
Z.
LOL
The networking wasnt sending / receiving packets properly today when i tried it for the first time using the converted dll. I realised that when using code from HawkNL i changed the packet prefix from NL to DS for sending but NOT receiving.
Anyho i got it fixed and taking a step closer to getting this done :D
Zaei, do you wish for the networking module to use classes or to be done as more of an API ?
I suggest classes coz this means i in effect make a wrapper for L1 and create a modular part for you to use.
Classes =). Its the best way =).
Z.
Im kinda glad that i decided to use HawkNL as a basis for the net module, i have converted it and removed some extra code that we dont need at the moment (cross platform and extra protocols).
I have also noticed that the system doesnt shutdown sockets very friendly so im just about to add it.
Does create a nice solid base to build the module upon :D
I got connections working, in supprisingly little code :D
now to work on da protocol and data sending.
Are we going to use TCP for the chat before game and then UDP for actual game data ? If so im gonna have to work a way of sorting that out because u have to init the DivSock (HawkNL conversion) then select socket types, then shutdown, then u cans elect another. This means u loose all of the connections :(
Im gonna have to store them and get ppl to rejoin. Or maybe some how have to instances of DivSock, and do it that way (in effect have to servers, chat and game). If i wrap it into a class, coz atm its just like a normal API.
Wrap in into a class. We HAVE to use UDP for game data, because we are going to have a lot of data. Perhaps you can figure out a way to issue each user a unique session ID, so that when they reconnect, they have to specify the issued ID before they can get in (CoCreateGUID() would be a great way to do this...)
Z.
I tried wrapping it into a class and it still doesnt allow two instances in the same app, i tried creating sub threads but same problem.
Im gonna do it so they join and chat etc then when they want to play it chucks them all, re-starts in UDP mode and they rejoin.
A little update from me. I go the system made up so the server listens on a Reliable Packets stream for all the actual setting up and chekcing. Then, it keeps that open for lobby and in game chat to be sent. and opens a UDP socket to the client for game data.
Thus each thing has a connection to the server via TCP/IP and UDP/IP
:D:D
Perfect for us.
Nice, Psy =).
Tomorrow I want to start on the UI again, and get that running. After that, I want to get the terrain working fully (still working it out =). Then skinned meshes.
Z.
How much level of detail will we need for the textures? I may be able to do some of them. I'm thinking: 256x256 for characters, 512x512 for the buildings, and 1024x1024 for the ground (letting us have some nicely detailed stuff!
Make sure to put in some S3TC and DXTC code there ;)
The Server / Client is coming on well, its farily secure atm, when a user connects, it checks if the server is full, if so it boots them, if not it opens a UDP connection back to their computer. (Thus verifying their ip address), if this connects then all is ok, if not then they get kicked.
If all is ok at this stage theyre sent a +OK message accompanied by the server/game name. the client then replies with a HELO statement, replied with the index number, then the player id.
these can be used to check the user is true at any time because the playerID is taken from the index and a serverID, thus u cannot hack it coz u dont know the serverID. it can be freely changed via changing an algorithm.
The client then sends the username and they enter chat mode which is when all data is setup and the user can talk via the lobby with the others).
Im gonna add a client version checking thing which has the latest version stored and the clients send it when connecting which means older versions cannot be used.
This all takes place in a very quick time :D:D
Those levels sound fine, Sas. We can change them at any time, to make sure that the textures for units match the level of detail on the ground (i dont want there to be a distinct loss of quality between anything).
Psy, you might want to use a DLL to do the serverID thing. Simply create a DLL that exports a single class. The class just creates the serverID, and returns it. Usage would be like this:
The DLL would the derive from ServerIDBase, and implement the serverID algorithm in the GetSID member. In network initialization, you just specify the DLL to load:Code:class Network // fake =)
{
...
ServerIDBase* sID;
...
};
class ServerIDBase
{
ServerIDBase()
virtual DWORD GetSID()=0;
};
To get a server ID, you just use sID->GetSID().Code:...
typedef ServerIDBase* func();
HANDLE mod = LoadLibrary(x);
func* f = GetProcAddress("GetServerIDBase");
Net->sID = f();
...
Z.
So, they can load up modules for serverID and playerID generation ??
I can probably implement somehting like that.
Would that perhaps be a bit too complicated for standard users because if you think about this, were gonna have a web page with a list of servers or summat which ppl goto, they click a game and enter run or whatever and it logs onto the server.
Will we need different ppl to be getting modules n stuff, shud i implement a standard one (default) but allow advanced server users to use an external module ?? (like a game mod)
It would be a server side thing. The server generates the ServerID, and sends it off. So, a server could implement it, but it would be transparent ont he client side.
Z.
LOL
I'm completely lost now.
When a server starts, it can specify a server ID generation module to load. The module would have the serverID generation class. The loader would load the module, and get the serverID generation object from the DLL, and use it transparently to generate IDs to send to clients. Only the server would need it.
Z.
OK, thats what i thought.
Well, Sas, I must say, good job with the site! I am exploring my web browsing capabilities with a Linux browser, and the site works pretty much perfectly. The only thing that doesnt work is the VBScript, but that doesnt seem to be a whole ton of the site (the site is still browsable =). So, good Job!
Z.
hey, im gonna be around for the next 3 hours, (till 10pm GMT) was wondering if NE one can do a test of the networking for me, just to see if all is working fine.
post if ya do.
Thanks, I'm just off to change that to Javascript now then. I'm not as comforatble with that I must admit!
:D
I've made the member page database driven now and am working on upgrading the forums' appearance. I will release it all eventually ;)
Um, it is javascript... :confused:
Well, maybe my browser just sucks =).
Z.
The servers can now be passworded. I have switched it so there is now two threads started for each connection (UDP and TCP).
The networking now has a callback funcion that allows the network/server/client to tell the application calling it when something happens.
hey,
i stuck together a little site for my mates and i who go skating with each other.
http://www.sk8-haven.tk
A few movies and pictures of us lot. Kinda not wonderful stuff though these are the only videos we have ever taken. Hopefully getting some newer better ones on soon.
Well, I just finished wrapping every function in debugging blocks. It looks like this:
If any unexpected error occurs, there is a try{}catch() block around the entire WinMain function. If an error occurs, I get a nice MessageBox that looks something like this:Code:RESULT StaticMesh::LoadMesh(char* filename)
{
Core::Function_Enter("StaticMesh::LoadMesh()");
// code goes here
Core::Function_Exit();
}
Nice easy stack tracing =). If you want, Psy, I can email you the DivCore module (just about everything uses it, though it is stand alone), so you can add similar tags around the Networking functions.Code:WinMain->TimesOfWar::Run()->Graphics::LoadStaticMesh()->StaticMesh::LoadMesh()
Z.
Cheers, u might as well.
Okay, I just remembered we had set a date for an Easter release which, at this rate, I don't think will happen. So, we may be able to do it by next weekend. Agreed?
We should have a building you can garrison in and a unit that can move around, etc, etc. I think that would be the best bet.
Everyone agree with this?
If you dont mind that the terrain is again a flat plane, I can get that done. If you want, I can even try to make the terrain wrap =).
Z.
Nah, lets not bother. I'd rather wait a while and release a really nice one than a worse one earlier.
Sorry, wud have replied earlier but was out at a sleep over party then skating.
I think we shud w8 until the terrain is better.
On my side of things. Zaei, how is the networking going to fit into the game ?? i can create a class to go into the engine that derrives another class form the network dll. Then i have a virtual function that passes back when things happen.
I kinda need to know how this is gonna work, shall i include a function in the class that goes into the engine like OnConnect() which u can add to change the display and let the user know its connected ?? (this OnConnect is then called when the client connects etc).
When is this game going to be done?
Not for a while. Were still working on the engine.
I was thinking that I would add a Networking object into the CEngine class, and then expose the functionality through the engine, and make descisions based on what the mod is doing (basically, making the mod keep track of its own state (ST_IN_CHAT, ST_LOADING, ST_PLAYING, etc.)). THis is what I amdoing with the other engine components. Let me know what your ideas are (specifically), and I will try to do it for you =).
Z.
ok, i have a class setup like this:
dn_network, dn_server and dn_client are in the networking module's dll file.Code:
dn_networking -> dn_network -> dn_server
-> dn_client
dn_networking will go into the engine. when the server gets a connection an OnConnect function is called and DN_SERVER is passed to it (so it knows form where the call is coming), the same also happens to the client but it has DN_CLIENT.
so when this call comes thru in the client u could have "Connected to server, logging in" then once a OnLobby is called u can say "Connected" then show the lobby. also there is OnPassword().
Here are all the calls (carried out via virtual functions):
Each client has its own state (as does each individual connection on the server):Code:
OnError() - An error in the system happened (anything from incorrect password to a problem in the actual network system (socket couldnt listen).
OnInitialize() - When a module is initialized (server/client) this is called and a session is passed.
OnTerminate() - When a module is terminated.
OnConnect() - When a connection is received or made by the client.
OnDisconnect() - When a client disconnects or the server receives a disconnection.
OnStart() // Server Only - When the server is listening
OnStop() // Server Only - When the server is stopped
OnPassword() // Client Only - When checking password.
OnUsername() //Client Only - When checking username.
OnLobby() // Client Only If Dedicated Server - When moving into lobby (allows ppl to chat).
OnGame() // Client Only If Dedicated Server - When moving into game state (actual game can be played).
Im not sure if any other states will be needed. The states can be accessed via a GetState function (client only).Code:
DN_STATE_NONE
DN_STATE_CONNECT
DN_STATE_VERSION
DN_STATE_USERNAME
DN_STATE_PASSWORD
DN_STATE_LOBBY
DN_STATE_GAME
DN_STATE_DISCONNECT
You may also have noticed the states and callback functions are fairly similar :D thats coz im thinking they will be called when state changes occur which could allow for the current state of the client to be stored in dn_networking / the engine (for easier access).
At the moment it is dedicated server only. I havent figured how im going to do non-dedicated.