-
Well, ASE is just great for static meshes, it becomes useless for bone animations, as the animation fo the bones is not exported. I was at a loss for a while, but then I realized that the DX8 sdk comes with a 3ds->x file converter. Further, I remembered that you can export an ASCII x file. Also, the sample animated mesh that comes with the SDK is an ASCII version. So, I took a look inside, and I should be able to parse these files just as easily as I was the ASE files. Problem solved =). I will start in on these tomorrow.
Z.
-
I added in scene loading and saving. The system allows for an unlimited number of user defined parameters. Example:
Code:
Root
{
Name="Root"
Parent=""
Type="Root"
}
DragonMesh
{
Name="Dragon Mesh"
Parent="Root"
Type="AnimatedMesh"
Pos=0.0000 10.0000 0.0000
Filename="\Media\Meshes\Dragon.model"
}
Would produce a treeview with the nodes Root, and the child Dragon Mesh
I will post a screenshot of the tool soon.
Z.
-
Now that I think about it, the entire game can be defined with this format:
Code:
Game
{
Name="Game"
Parent=""
Type="Game"
}
Areas
{
Name="Areas"
Parent="Game"
Type="Data"
}
SomeArea
{
Name="Some Area"
Parent="Areas"
Type="Data"
Objects=2
Instance="Dragon"
Instance="Swordsman"
}
Gives:
Code:
Game
Areas
Some Area
Dragon
Swordsman
Z.
-
You are working very hard on this Zaei!!
Good ideas and good coding!!
-
I started on the dll for the networking today. In light of the GUI demo naming i have called it network.dll
The whole thing is called 'Divinity Networking Module'
There will be one main class called divServer, the idea is that you do like
class divNetworkServ : divServer {
};
The divServer will have a load of virtual functions to do with error messages and connections, i thought this was best so you can then change the menus / windows etc when it connects / disconnects etc.
Hmm, with looking on it on second thaughts im not sure if i should do like this:
class divNetwork - this comprises of an initialize function which takes 1 for server and 0 for client.
Then it sets an overall variable to whatever, then i can do if its the server do whatever if its the client do whateve.
Whatcha guys think on the structure of it ?
-
I think two seperate classes will be simplar
-
ok, current classes are:
divConnection
divServer
divSocket
divWinsock
im working on getting the server going first.
Zaei, whats your mail address coz i wanna mail you what i have done so u can see what its like (coding style, naming etc) ?
-
well what i have done so far works, im havin a lil class error though atm.
i have a function called initialize() in divServer, divNetworking is then derrived from divServer. when i call divNetworking.initialize() i get an error so i had to add in a function to divNetworking which then calls divServer::initialize(). But it works fine.
In my simple demo i did, if u call winsock.initialize, then server.initialize, it works, but if u dont init winsock then the OnError gets called :D:D
-
The current callbacks are:
Code:
bool OnClose (void);
bool OnConnection (int client);
bool OnDisconnection (int client);
bool OnError (int error);
bool OnInitialize (int port, int clients);
bool OnListen (void);
bool OnRun (void);
bool OnStart (void);
bool OnStop (void);
bool OnTerminate (void);
-
Since you seem to be having some sort of soliloquy here (I didn't spell that right, I'm positive...!), I'll cut in. Good work, it seems that you're really doing well with the networking code. As long as Zaei gives the all okay, it'll be set.
[email protected]
I think that's it...
-
nope, the address was rejected.
-
No 3 at the end, but Im not recieveing mail at that account at the moment, and It will be closed at the end of February. The new one will be [email protected], for future reference. For now, send the files to [email protected] . =).
Your setup seems good, but you need to export a Class called Network, or Multiplayer from the DLL. This class should have methods to create a server, create a client, etc. Basically, a factory class.
Z.
-
hey..:P
im sorry for not being available. The Local area network at home have been sort of.. dead lately. Im at school now, but I'm doing some work and be ready for some new themes in not so long..
-
Ah you're back! I've even missed you on MSN.
If you've gotten up to date, Jorj asked you a question.. why don't you ask it again Jorj?
-
Yeah, i will do that for ya zaei.
-
Sorry about a lack of updates yesterday.
Welcome back Igor. the Vertex Buffer article I wrote for you is back a few pages =).
I did more work last night on the editor, and things are progressing very well. Unfortunatly, I wont be here for the rest of the weekend, starting at about 3 today. Ill be back sunday night.
I will try to get back to you about the network coding early next week, Psy, as I dont know exactly when I will get a chance to really sit down and take a look at them.
Z.
-
i decided not to send it yet, i wanna get some more basic and better code going.
-
Darn this is complicated.
Im thinking like this:
Code:
Servers Main Thread
-> Check For Connections
-> Client Thread Started
-> Check Messages
-> Get Data
-> Act Upon It
-> Disconnect ?
-> Close Thread
Im trying to get this sorted in my head, do u have any threaded server demos of theory code zaei ?
-
well im getting there, i now have connections being done and a thread gets spanned which then continually loops for messages and data.
-
I know very little about network coding, beyond simple things with the Winsock control in VB. I want to learn, but I need to set it aside for more important things right now =).
Are you using TCP/IP, or UDP? TCP/IP will probably be best for chatting, but fr the actual game, UDP will be a requirement.
Z.
-
TCP/IP at the moment.
I got stuck now because i need to pass an integer to a thread but cant get the data back from the function:
Code:
divThreadData m_divthreaddata;
m_divthreaddata.m_server = &this;
_beginthread(Function, 0, &m_divthreaddata);
then
Code:
static void Function (void *parameters) {
divThreadData (*???)threaddata;
threaddata = ????
}
the _beginthread function sticks the index var into the prameters thing but i cant get it back out coz im **** with pointers.
Once i can get around this i can get all the server going properly. I now have a class called divThreadData. i now pass this into the thread (shown above).
-
YES YES YES
This is going very well at my end. I was wondering why it wasnt wokring and why nothing i was changing was having an effect but then i realised it was in Debug compile not Release. So far connections can eb accepted and then any data sent gets passed back to the OnData function :D
-
Ooooops, found a few bugs that have been cleared up. The client threads were not being ended :(
the dll for just the server bit stands at 40kb at the moment so with the other stuff added it should be nice and light. I shal lwork on clearing the function names etc up then post a copy of it plus source code on to you Zaei.
Sorry - I did not get to test the old server and chat client because i was busy with my girlfriend ;). I think it would have been obsoulete anyway in light of a new threaded server being created.
-
Well in my news..
The Unicorn, Mage, Sorcerer, and Necromancer are inked, and
I will send the as soon as I get my scanner back, my brother is using it for a few days....
I could also do a more powerful version of the unicorn...The Pegacorn!!! a unicorn with wings and alot of power..Think about
it... the name is changeable....
Plus I need to know sort of the powers of the Mage & Sorcrere..
-
Zaei you should have awaiting you in your mail box the zipped up source for the server.dll.
The networking now comprises of three dlls:
Code:
main engine
-> network.dll
-> server.dll
-> client.dll
-
lol, the yahoo.com mail address was not accepted, nor was the other, i dont wanna post it here.
-
Sorry for not being here the past few days - a horrible flu passed my way and I've not felt up to anything, really.
-
Well, I am back. Sitting in classes right now, so i wont get anything done until later. I am going to keep working on the editor, and maybe get a bit into skinned meshes tonight. Glad to see the networking is going along, I will have to get the UI system converted so we can get something going inside the game.
Z.
-
I added icons to the editor, so the type of object determines its icon. It looks neat. I am going to try to get a scene loader into the actual engine, and see how it works =).
Z.
-
I hope you start feeling better soon, Sas. I didnt see your post earlier.
Z.
-
Everything sounds great Zaei! I already am feeling quite better, I just have a bit of a headache now. Thanks for that too!
I'm planning to do a wall building next in VRML.
-
I think I have figured out how I am going to do it. I will have a model that will form the actual wall part. This wall will not have sides, and will be a mirror of itself, so that it can be repeated. I will repeat this model until I come to a corner. The corner will be a skinned mesh, with a single joint. The joint will then be angled so that the one bone will be parallel with the first part of the wall, while the second will be parallel to the second section of wall. There is then the special case of single distance walls, and wall endpoints, which are easy. Sound good?
Z.
-
I gotcha. So all I need is a wall that looks good repeated?
-
Glad ur better Sas.
Everything is going good here at my end, bout to start work on the client.
-
this is the sweet way the server / client works:
Code:
bool divNetworking::OnData (int module, int client, char *data) {
switch (module) {
case DIV_N_M_MOD_SERVER:
return true;
case DIV_N_M_MOD_CLIENT:
return true;
}
return true;
}
There is only one OnData function which can get called from both the client and the server, althoughit can tell between which one by using the module integer. This class has to go in the actual game coz this is where it is decided what is done with the actual data sent. This also allows for both hosting and playing :D:D
-
You seem to be in a good mood Psy! By the way, that is a good way to handle it.
-
WOW, on my new computer.
I have to wait until i get the visual studio cd back off my mate before i can do more work coz its stuck in the hall way at the moment (my old pc) so i cannot use it. The sound on this byatch is so good. 19inch monitor is fat in a 1280 x 1024 resolution :D:D
-
Put it to good use, load up 3DMark2001!
-
i got the old pc setup so i can get back to worok on the module on that but i need to wait for my dumb ass mate to give the visual studio back.
-
I dont know if you guys care about the bugs or whatever but, I finally got DX8 and when I tried to open your game it gave me this (after each return is a new message):
Device Creation Failed!
D3D Object creation Failed.
E_UNKNOWN
--------
Description: An Unknown Error has Occured
IC
Degub Error!
Program: Divloader.exe
DAMAGE: after Normal block (#163) at 0x00B11510
DIVLOADER caused an exception 03H in module SYSTEM.DLL at 0177:0049e2d0.
Registers:
EAX=00000001 CS=0177 EIP=0049e2d0 EFLGS=00000246
EBX=007df830 SS=017f ESP=007df384 EBP=007df394
ECX=80007cc0 DS=017f ESI=007df544 FS=117f
EDX=80007d20 ES=017f EDI=007df444 GS=0000
Bytes at CS:EIP:
33 c0 85 c0 75 bd 8b 4d fc 83 79 14 03 75 6c 8b
Stack dump:
007df444 007df544 007df830 00b114f0 007df3c8 0049e0a1 00b11510 00000001 007df444 007df544 007df830 000000cd 007df1b4 007df528 004a5034 00547680
Hope it helps in one way or another...
-Andrew
-
DX8, or DX8.1? If you dont have 8.1, it wont work.
Z.
-
Make sure your card has 3D Acceleration, and that it is DX 8.1, not 8, that you posess. :)
-
-
Off Topic, but...
Has anyone read the Count of Monte Cristo. I just finished it an hour ago, and would suggest it to anyone who hasnt. In fact, I cant find the words to describe how much I recommend it.
Z.
-
Ok... Thats probably my problem, I got DX8 not DX8.1,
later,
-Andrew
-
I found a bug in the net module which was ****ing me off, i now fixed it. I will post a demo soon, the server is working and the callbacks are working. I will post a demo once i have got the client done.
I cant work on the new pc yet coz my **** visual studio cd is bust and so i cannot get it to install, i gotta get it copied to my pc then burn a new one befroe it will work.
Any tips to get the scratches of a cd ??
-
There are usually CD cleaning/scratch removal kits at hardware stores/do-it yourself stores.
-
That really sucks. Hope you get it working soon =).
Z.
-
I almost got the stuff from the cd copied to my harddrive and things copied via floppy to my drive too. I will then burn a cd and voila :D should be working tonight
-
ok, i got it installed on my pc although lots of header files are missing. im gonna copy the ones needed to get this ass working then i shall copy the rest across tomorrow when the network gets set up.
For some reason now neither the old version of DNM or the new one will accept connections which is ****ing me off :(
Just so i know how do i get apps to look like the new WinXP style ?
-
Filburt has a tip on his Turtle Tips site...
http://www.turtletips.com/
-
I got a wall to render, and tile, and it looks pretty nice.
Z.
-
Looks like your having better luck than me.
For some reason winsock seems to have completely ****ed up on my systems (both that is) i copied the code form a demo on planet-source-code.com to check if its wokring (one that worked before) and not even that works.
It wokrs fine except it wont accept connections for some reason, i went back to code i wrote ages ago that had not been chnaged (in another project) and not even that will work.
:( :( :(
-
Download the latest service pack, I believe it has the latest Winsock version in it.
-
Well i made a little demo in vb using winsock which worked, i got somehting made by someone else off my old pc and stuck it on this one and that worked. I also just ran the one i made before and it seems to work now i added port 50 to the WinXP firewall list, i tried it on port 100 and it works too, so im completely not sure.
-
LOL, it works now, connections are going through fine, now i gotta get it to pass a disconnect message ok, then i can start onto logging in and user details etc
-
arse, i dunno if the connection is holding up, no data will pass
-
I got it all back and wokring again =)
Im gonna redo part of the server. At the moment it spans a thread for each connection. As data comes in on the thread it gets passed to a OnData function, the only problem is that if the client closes but doesnt send the /quit message (if the app crashes) then the thread locks and loops.
I need to make it create two threads, one checks for messages, if there is a message the second thread handles it whereas if it has crashed the first thread will stop it and so stopping the locking error.
-
Excellent, looks like you've put a lot of work into that.
-
Sas, in your mail box any time now u will have a demo of what i have been doing.