How would i do an online high score system? and have my program acsess it?
I want to make an online highscore system... With the top 10 scores online.... How would i do this? is it possible?
Re: How would i do an online high score system? and have my program acsess it?
Yes, it's possible.
Here's a few that come to mind:
- VB(or custom) Server application
- Web server with PHP, ASP, etc.
- FTP Server
Re: How would i do an online high score system? and have my program acsess it?
Hmm..... With the first option, would that be 2 seperate programs?
Re: How would i do an online high score system? and have my program acsess it?
Yes, the server application would conceivably be different than the client application.
Re: How would i do an online high score system? and have my program acsess it?
Hmm.... Okay.... how would i do that, with high scores?
Re: How would i do an online high score system? and have my program acsess it?
You'd want to design a protocol that'd allow users to post data, and get data. I'd suggesting designing your packets as UDTs.
Like these:
vb Code:
'not a complete packet, just a part of a packet
Private Type tUserScore
lScore as Long 'their score
lNameLength as Long 'the length of the next field
sUserName as String 'their name
End Type
Private Type tSubmitScore
lCmdID as Long '4 bytes for a command ID, the parser will check this and act accordingly
lScore as Long 'The score
lNameLegth as Long 'the length of the next field
sUserName as String 'their name
'or design this like the next packet* to upload an entire local scoreboard
End Type
'next packet*
Private Type tScoreResults
lCmdID as Long 'a unique ID for this packet
lNbrUserScores as Long 'the number of items in the following array
UserScore() as tUserScore
End Type
Re: How would i do an online high score system? and have my program acsess it?
Okay. Whats a UDT? (fyi, im not that advanced with vb... so i dont even know how to have it acess on line, nor resive information, other than .txt files...)
Re: How would i do an online high score system? and have my program acsess it?
A UDT is a user-defined type. Like the three in my example code.
For designing a protocol, have a look at this: http://www.vbforums.com/showthread.php?t=615906