![]() |
Question - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51) +----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44) +----- Thread: Question (/showthread.php?tid=2844) |
Question - halla - 06-06-2009 I was thinking about getting back into stuff. I always wanted to code something from scratch so I was thinking its a way to learn everything from networking to directx and so on. If I ever finish it im sure it will take me years but I should learn along the way which is the whole point... anyways... where should I begin? Should I begin with both the client and server and get connection so on going on? Should I start with just the server and then client later.... or should I start with the client? My guess would be both get a connection between them. Then setup some way to create accounts... maybe add an account server to handle those so on... also any guides to help me on my way would be appreciated. Not sure if Dx7 or 8 yet. Im going to use MS source to learn a lot as I go but doin it my own way. Re: Question - Tony - 07-06-2009 It won't take you a few years. More like a few weeks. Learn DX8. It may seem hard on the outside but it really is easy. I started messing around with Robin's dx8 engine like a while ago then I started to actually learn it from some website and it was easier to understand after messing around with it already. http://directx4vb.vbgamer.com/DirectX4VB/TUT_DX8_DG.asp After you learn all that, setup winsock, split the data sent and received (packets) so you can read more than just one thing in a packet (i.e. Packet = hairstyle, haircolor, hairsmoothness you need to split that up to read it seperately), and start with some account creation. Learn how to read and write binary files. Split a string Code: Dim Packet() as string Code: Dim Packet() as string If you need help with anything, feel free to add me to MSN: tonynooblet@hotmail.com Re: Question - halla - 09-06-2009 Thanks for the reply and offer. I may take you up on that sometime. So you say to learn DX8 and then to work on networking with winsock and so on. Re: Question - Beres - 09-06-2009 If you are looking for some help with the DX, I can give you a hand.. I've been working on my class module and it seems to be a success. I am learning DX8 too. Re: Question - Tony - 09-06-2009 Ehh don't learn it using Harold's work. That's the short and easy way for people who are too lazy to learn how to use DX8 through scratch and you will barely learn crap. Re: Question - GIAKEN - 09-06-2009 Yeah I didn't really explain the code in my class. I just made it for people to use DX8 easily...it's just like a quick way to use DX8 simplified. I explained how to use my class like a book, but didn't explain how I used DX8... Re: Question - Beres - 10-06-2009 I read the directx 4 vb site. So far its doing me well.. Re: Question - halla - 10-06-2009 I was thinking of using mysql over binary files. What do you guys think about that? I always just thought it was easier to sort through data and incorporate stuff into a website if it ever came to that. Re: Question - Rian - 10-06-2009 I don't know much of the technicalities of binary vs mysql. However, I really prefer keeping my data stored locally, though I'm also very open to making my player accounts mysql, as their are huge benefits if I choose to do account creation on a webpage. As far as NPCs and Shops and all that, I'd just assume keep binary files locally. Re: Question - halla - 13-06-2009 Yeah I would rather use mysql... I have set up mysql server in the past and all, but just wonder how hard adding it would be. Guess I could take a look at old 3.0.7 MS to see how its done there. Also could I get some more information on packets? I learned winsock and have it working very basically. Its connecting and sending a single message. Thanks sorry for the noobness just been so long and I never really did understand packets much. Ok I get about splitting them up but you will be sending many differnet packets. How do you have the client/server differentiate between all the packets so it knows what to do with that given one. Re: Question - Toast - 13-06-2009 By giving each type of packet an ID number. Re: Question - halla - 14-06-2009 Could you give an example Re: Question - Tony - 14-06-2009 halla Wrote:Could you give an example Common man, I'm sure you've messed around with MS enough to remember about it. The way MS does it is you usually define the packets ID/name in the beginning of the packet Then when you split it up then the packet ID is Packet(0) So when you receive the data, split it up, you then check if the packetID equals the packetID you want to received. Code: Select Case Packet(0) Re: Question - halla - 15-06-2009 Ok thanks that does make sense. Its been so long since I have messed with MS and some reason im brain dead about packets but im learning and getting better. Re: Question - Tony - 15-06-2009 halla Wrote:Ok thanks that does make sense. Its been so long since I have messed with MS and some reason im brain dead about packets but im learning and getting better. Don't worry, your on the right track now. Re: Question - halla - 19-06-2009 I'm working here and there and progressing some. Anyways, I was wondering the best way to do this... I'm having it send username/password to server and saving to a file, but to do so I have a button that connects to the server and then I click another button that sends the information. When I tried sending the information right after it connects to the server with the same button it gives me an error which I take it means its not connected yet to send the data. I do not want to have a button to connect to server I would like it to do that and then send the information to the server. What is the best way of doing this? Also I have the server sending a message as it connects back to the client just saying it connected for now... does this have anything to do with sending the information right away as in slowing it down or something? Thanks Re: Question - EdTheHobo - 20-06-2009 If you send the login packet right after trying to establish a connection, the server won't have enough time to accept the connection, which sounds like the problem in this case. You mentioned that the server sends a message after connecting; the point where the client receives that message would be a perfect time to send the login information. Re: Question - halla - 20-06-2009 Well thats all taken care of. I decided to add where you could kick anyone online from the server. Its basic just choose someone online and you can kick them and send a reason why to them. When they receive the message I have it bring back to the main menu, but I cant find out how to close the current form. I was thinking I needed to set a menu state like MS does each time you change forms but I cant see to get it going right. More less I just need a way for it to know which form is open so that it can close it when kicked. Re: Question - EdTheHobo - 20-06-2009 Code: frmmainmenu.show That will load your main menu and close everything else. Re: Question - halla - 20-06-2009 Thanks much... all fixed and simpler than what I was trying. |