Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / high scores save file?

Author
Message
Guruchild
23
Years of Service
User Offline
Joined: 13th May 2003
Location: United States
Posted: 31st Oct 2003 00:54
How would I go about creating a simple high scores file that may be saved and updated?

I can't figure out how to go about accomplishing this with the file commands. Snippets or examples of this sort of thing would be great if anyone can direct me to any. Thanks.

I have a sign beside my door-hinge, that says nothing rhymes with orange.

Soul Defender: 75% GodMode RPG: 5%
Hamish McHaggis
23
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 31st Oct 2003 00:59
Look into using "save array" and "load array", they're a lot simpler than the file commands.

Do you bite your thumb at me sir?

Athelon XP 1600 Plus - Nvidia Geforce MX400 - 256mb RAM
The Lone Programmer
23
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 31st Oct 2003 02:21
Hmm... I dont know if I would use a save array deal, but I do have an untested brainstorm that would probably work.

Say you have 10 positions for a highscore.

if score>1
open to write 1,"Score 1.dat"
write byte 1,score
write string 1,name$
endif
if score>4
open to write 1,"score 2.dat
write byte 1,score
write string 1,name$
endif

I dont know if I used the proper code for saving since it has been a while.. I think it is right. Well say you are playing, and you get higher that a score. Then maybe its in the high scores.

Hmm..
Well I just confused myself(happens a lot)

Anyways just learn how to write to files and study a lot of the if statements and if then statements.
Trust me I am sure you can do it.

Later,
Nicolas

*Current Project: Untitled RPG
*Working With: Vash the Stampede 815
*http://www.blazing-fire.tk
Mattman
23
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 31st Oct 2003 02:32
also,

To update it on-line, you could use ftp commands

cheers,
Matt

Got a knack for finding secrets??? Jingot Racing---A new brand of Racing---Only from Nightwatch Studios
"hey, it's tomorrow" - Hamish
Guruchild
23
Years of Service
User Offline
Joined: 13th May 2003
Location: United States
Posted: 31st Oct 2003 04:24
I don't know if this is what I'm looking for. Is there a way I could possibly store player names and scores in a single encrypted data file that could be accessed and utilized in-game like for instace displaying high score rankings?

I have a sign beside my door-hinge, that says nothing rhymes with orange.

Soul Defender: 75% GodMode RPG: 5%
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 31st Oct 2003 11:17
You would have to write your own encryption system if you did it like that.


Avatar & Logo by Indi. Insert witty comment here...
Dostej
23
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 31st Oct 2003 13:15
Here is my snippet for highscores.
It has a simple encryption, saves as file. You can easily change the number of entry´s.

Its not commented, but it should be not too complicated to understand

A very early demois now available - comments very wellcome
www.GalacticX.gamhosting.com

Login to post a reply

Server time is: 2026-07-26 08:30:45
Your offset time is: 2026-07-26 08:30:45