Mirage Source

Free ORPG making software.
It is currently Wed May 22, 2024 5:39 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ] 
Author Message
 Post subject: Question
PostPosted: Sat Jun 06, 2009 10:37 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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.

_________________
OREH
http://www.flawsin.com/oreh
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Sun Jun 07, 2009 12:38 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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
Packet() = Split(the data that needs to be split up here (unsplitted packet?), the character that's the seperator)

Code:
Dim Packet() as string
receiveddata = 200 & "," & 300 & "," & "995cool"   ' which is 200,300,995cool
Packet() = Split(ReceivedData, ",")
' packet(0) would = 200
' packet(1) would = 300
' packet(2) would = 995cool

I'm splitting up the received data by indicating the commas as the separators

If you need help with anything, feel free to add me to MSN: tonynooblet@hotmail.com

_________________
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Tue Jun 09, 2009 8:40 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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.

_________________
OREH
http://www.flawsin.com/oreh
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Tue Jun 09, 2009 9:40 pm 
Offline
Knowledgeable

Joined: Sun Jul 29, 2007 12:23 am
Posts: 199
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.


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Tue Jun 09, 2009 11:38 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Tue Jun 09, 2009 11:51 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
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...

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Wed Jun 10, 2009 3:36 am 
Offline
Knowledgeable

Joined: Sun Jul 29, 2007 12:23 am
Posts: 199
I read the directx 4 vb site. So far its doing me well..


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Wed Jun 10, 2009 6:29 am 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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.

_________________
OREH
http://www.flawsin.com/oreh
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Wed Jun 10, 2009 6:32 am 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
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.

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Sat Jun 13, 2009 12:20 am 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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.

_________________
OREH
http://www.flawsin.com/oreh
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Sat Jun 13, 2009 11:28 pm 
Offline
Regular
User avatar

Joined: Sun Jun 01, 2008 8:39 pm
Posts: 91
By giving each type of packet an ID number.


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Sun Jun 14, 2009 4:47 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
Could you give an example

_________________
OREH
http://www.flawsin.com/oreh
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Sun Jun 14, 2009 5:33 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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)
Case "pktCheckInventory"
Call checkinventory

_________________
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Mon Jun 15, 2009 1:29 am 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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.

_________________
OREH
http://www.flawsin.com/oreh
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Mon Jun 15, 2009 8:26 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Fri Jun 19, 2009 11:21 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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

_________________
OREH
http://www.flawsin.com/oreh
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Sat Jun 20, 2009 1:04 am 
Offline
Newbie

Joined: Sun Mar 29, 2009 6:31 am
Posts: 2
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.


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Sat Jun 20, 2009 6:58 am 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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.

_________________
OREH
http://www.flawsin.com/oreh
Image


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Sat Jun 20, 2009 7:33 am 
Offline
Newbie

Joined: Sun Mar 29, 2009 6:31 am
Posts: 2
Code:
    frmmainmenu.show
    dim frm As form
    for each frm In vb.forms
        if frm.name <> "frmMainMenu" then
            unload frm
        end if
    next


That will load your main menu and close everything else.


Top
 Profile  
 
 Post subject: Re: Question
PostPosted: Sat Jun 20, 2009 9:08 am 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
Thanks much... all fixed and simpler than what I was trying.

_________________
OREH
http://www.flawsin.com/oreh
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group