online high scores tutorial

Previous topic - Next topic

Kuron

Does anybody know of any good sites with tutorials on how to setup online high scores on websites?

Hemlos

Quote from: Kuron on 2008-Aug-22
Does anybody know of any good sites with tutorials on how to setup online high scores on websites?

1. make GLBASIC server/client game software using glbasic "networking" command list.
2. Have game Client connect to GLBASIC server and post highscore.
3. Make the glbasic server use OPENFILE() command list to build a highscore.html, and save to an open port 80 directory on an HTML WEBSERVER.

Keep in mind, server software should be used hidden, i could add a gbal API to hide programs....let me know if you need it, ill whip it up for ya.
Bing ChatGpt is pretty smart :O

Kuron

Thank you, I really appreciate it, but, those really don't answer my questions.  I know how to create high scores in a game.  It is the web-side of it that I do not understand.  I am not a web guru and generally use a WYSIWYG editor for web development.  I am trying to find a way to integrate the scores into my games page and make it secure.  I found this tutorial (for another language):

http://www.clickteam.com/eng/resources/online_score/onlinescoreboards.html

But based on my lack of experience with SQL and databases in general, I might be better off saving up some money and trying to hire somebody.

Moru

Read the help on the command "NETWEBGET()", there is some info on how to get a free webscore, mabe Gernot can release the source code of the web-page too? It needs to be made secure first though, if you plan some serious usage of it :-)

Hemlos

You dont need a database, if youre hosting the webserver...glbasic does data.

All you need is a HTTP webserver....with this it opens a directory you spcify, to the public basically...
when someone plugs in the address, it trys to open "index.html" inside that directory.
If index.html isnt available, then it opens the directory (if you allow it to)..and thats secure enough.

And to make a program with glbasic to handle posting the data...
With glbasic you make a program that has both network commands (to communicate with the game) and openfile commands to be open for communication with your games and to retrieve high score information.
If you havent already, you will have to study those command sets, and apply the good ole elbow grease..."Trial and error" to get it working to make html scorelists....ill help with that.

The program you make with glbasic is just to retrieve, store and post the highscores.
The webserver hosts the internet of the directory you post to...nothing more.


Make the glbasic server post files with openfile() that look like this:
Code (glbasic) Select

<html>
<body>
Scores:<br>
1. Data_Name1 Data_Score1
2. etc....
</body>
</html>


Thats a very basic webpage....it need to be saved as an html document with openfile().

Its really simple.

The webserver hosts the directory, Its a directory ported on 80 on your computer, thats where index.html is found.


Thats all you need to host the files...the html doesnt need to be secure server either...
Make the glbasic highscore server repost the html every 10 minutes or hour or every once a day.
Generated by data from your program, not a human, so if a hacker were to say alter the score list, he wasted his time.....You can make your program setup to post that webpage again in a specified amount of time.

Once you have a webserver hosting your port 80.
You program the glbasic program to openfile/closefile in that same directory.
html is easy to make, and easy to make glbasic make html..

The question is , are you hosting the webserver yourself? If not, then this is likely not possible, as you will have to maintain the glbasic program and make sure it is running.

If you are setting up the webserver, then im sure we will be able to help you through making the highscore generator no problem.

If its a sql thing, youre gonna need a good IT man, i recommend, Schranz0r ;)


Bing ChatGpt is pretty smart :O

Schranz0r

I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Kuron

It sounds like it would be best to write a CGI app to place on my server to communicate with the GLBasic game.  I am not sure if my hosting service allows custom CGI apps.  I will have to check for the details on that.

Moru

#7
What's wrong with PHP? Most hosts allow this, even if they run a windows server :-)

Have a look at the Scramble source code in the samples directory (_Projects_).

Edit: Also have a look at the highscore table why you need some sort of security check before entering just anything into the table...

Kitty Hello

See the "Scramble" example game.
Just copy/paste the highscrore get/write part.
Upload your game in the showroom.
Send me an email to initialize a highscore list for you.

See example:
http://www.glbasic.com/showroom.php?game=Quantum&site=games
OK, some script kids might "crack" that list, but they always do don't they?

Schranz0r

LOL cheater on highscore!

Highscore = 2147483647 .... thats the bigest signed integer value  ...

WTF?
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Moru

Well, what did I say in the start? ;-P

Kuron

Quote from: Moru on 2008-Aug-23
What's wrong with PHP?
Mainly, I am not familiar with it =D  I did find another tutorial (again PHP and SQL), but it is a bit easier to understand.  For now, I am going to leave a space for it in my site design, but just put something else in that "space" until I can get it figure out.

QuoteUpload your game in the showroom.
I really appreciate that Gernot, but some of these games are not made with GLBasic ;)

Hemlos

Like i said, start a webserver on your computer, unlock port 80 to a unique directory.
Also Run a glbasic-highscore-server.exe to recieve the data input...it cant be cracked if you dont release your games code...because you can store the data in a separate directory NOT available through the internet.

html code is as easy as it gets, and i will help you with it if you want, send me an email.
Bing ChatGpt is pretty smart :O

Kuron

Like I said, I need something I can integrate into my site.  Running a server off of my computer wouldn't work as that is a violation of the TOS for my DSL service.  Apologies for asking here, as it isn't the place.

bigsofty

#14
Is there any reason you can manually create your own little HTML Form as a string, with hidden fields (or use 'get' method URL with encoded fields)containing the highscore data and post it (using GLB comands) to a PHP form processing page(or whatever script language) and from there to wherever, DB, web page, etc...? No extra server side stuff needed?


Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)