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 Discussion / here's a complicated one for all you clever peeps out there

Author
Message
The Jackal
21
Years of Service
User Offline
Joined: 12th Mar 2004
Location:
Posted: 16th Mar 2004 10:34
not while making a rele good 3d first person shooter it may be big bad and full of baddies long levels and lots of death carnage candy, but to be fair it aint no F$^%&ing good if you cant save the game, ne one know how to do this ?

for my personal edification and for any other interested in the same subject.

thanx Aj

Now this is the law of the jungle As old and true as the sky
And the wolf that shall keep if may prosper
But the wolf that shall break it must die.
The Jackal
21
Years of Service
User Offline
Joined: 12th Mar 2004
Location:
Posted: 16th Mar 2004 10:37
oh and here is just another random one for neone who is looking at this, i have heard lots of people talking about framerates exceeding 30, i always use 30 fps as most computers can run it, is this not good ????

Now this is the law of the jungle As old and true as the sky
And the wolf that shall keep if may prosper
But the wolf that shall break it must die.
The Jackal
21
Years of Service
User Offline
Joined: 12th Mar 2004
Location:
Posted: 16th Mar 2004 10:42
God i am really full of em today lol but after reading some peoples posts i have thought of something else, after using the big square root sin cos of this agle wrap value of that angle times by this, you know that big formulae to let you evaluate the distance between things in the 3d world, what units is this measured in pixels or what ?

Now this is the law of the jungle As old and true as the sky
And the wolf that shall keep if may prosper
But the wolf that shall break it must die.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 16th Mar 2004 11:16
Hehe, ok first off saving. You should look into the OPEN TO WRITE and OPEN TO READ commands and the WRITE and READ commands too, learn how to make your own files and file formats, it's pretty easy. Just remember that you need to load in the same way as you save, in the same format. Organise everything you need in your save game file, then come up with a file format. Writing strings is about the easiest method to organise, but it also equates to the bulkiest format, so experiment with file commands and come up with a good system for your game.

Now FPS, 30fps is reasonable, like a first person shooter needs to run at a minimum of about 25fps or it becomes too difficult to aim, so 30fps is fine, but it's still a little meagre for folk with monster PC's. The best method of keeping any PC user happy is to use timer based movement, where you say a bullet moves at 50 units a second instead of 1 unit per frame. Quite a challenge to program, but when it works it means you can have unlimited frame rates and your game just gets smoother and smoother on better spec PC's. You should always allow some kind of user specified detail setting, easy to do with particle systems, and you can specify clipping distances etc, so it's no biggie to make a detail options screen, allowing extra sparkle for higher spec PC's.

And lastly units - that's what they are. Pixels are the 2D equivalent of 3D units. I mean I might make a cube that is 100x100x100 - but the size on screen depends on the camera, I mean that box could be a sugar cube, or it could be a Borg vessel in a StarTrek game. I personally like each unit in DB to be about 1cm as a scale, my terrain tends to have 1m x 1m tiles, or 100x100 units. The scale is upto you though, it's all relative to your engine and camera range.


Van-B


The nature of Monkey was irrepressible!.
ico2
21
Years of Service
User Offline
Joined: 3rd Jan 2004
Location:
Posted: 16th Mar 2004 14:52
try just saving and loading all the arrays you use in the game.
Code Ninja
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: AZ, U.S.
Posted: 16th Mar 2004 18:34
i find making file formats extremely fun... specially image file formats... just a off the wall comment, lol

DragnBreth
of
Dragael Software
Clarks
21
Years of Service
User Offline
Joined: 30th Oct 2003
Location: BALTIMORE,MARYLAND
Posted: 17th Mar 2004 03:32
So hold on a sec. Dark basic allows you to make your own file formats. To be truthfully speaking i never new that.
The Jackal
21
Years of Service
User Offline
Joined: 12th Mar 2004
Location:
Posted: 17th Mar 2004 11:37
thanx for the help guys, no i know who to come to

Now this is the law of the jungle As old and true as the sky
And the wolf that shall keep if may prosper
But the wolf that shall break it must die.
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th Mar 2004 12:55
Quote: "So hold on a sec. Dark basic allows you to make your own file formats. To be truthfully speaking i never new that. "


Not to poke fun at anyone, but I always get a crack outa hearing this. I don't think ppl truely understand what a format is.

"eureka" - Archimedes
The Jackal
21
Years of Service
User Offline
Joined: 12th Mar 2004
Location:
Posted: 17th Mar 2004 14:11
do tell what is a format ?

Now this is the law of the jungle As old and true as the sky
And the wolf that shall keep if may prosper
But the wolf that shall break it must die.
John Y
Synergy Editor Developer
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 17th Mar 2004 14:55
Well, everyone knows that when you click a .txt file most commonly notepad opens. Well, with darkbasic's commands you can name your file anything e.g. 'myfile.bob'.

There you see you have made your own format '.bob'. Windows will show it as an unknown file type, and only you will know what the file contains and it's file structure.

Level Maker 3D: www.levelmaker3d.co.uk/levelmaker3D.asp
DarkBasic Professional Editor: www.levelmaker3d.co.uk/ide.asp
also: www.levelmaker3d.co.uk/KrazyKarts/ & www.DigitalOmega.Net
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 17th Mar 2004 15:04
For example, say you had a game that saves the high score table, well you might call the file 'Highscores.dat' - .dat is a general extension - but if you save the data as a 3 character string for the name then a decimal value for the score, you have made your own file format - it might only be used for saving high scores on 1 application, but it's still your own format.

In terms of DB though, you can load or save any format you want, you just have to program your own file loading and saving routines.


Van-B


The nature of Monkey was irrepressible!.
Code Ninja
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: AZ, U.S.
Posted: 17th Mar 2004 17:25
yes and (unfortunately) DB isn't the greatest for doing that sorta thing. I tried to make an image saver in my own format and a 32X32 image takes like 3 minutes to save... and thats just with black and white.

DragnBreth
of
Dragael Software
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Mar 2004 11:45
Not at all, I made a 512x512 bitmap saver and it only took a few seconds. Any chance you could post your code?


Van-B


The nature of Monkey was irrepressible!.
Cyberflame
21
Years of Service
User Offline
Joined: 4th Sep 2003
Location: Im not sure....
Posted: 18th Mar 2004 15:26 Edited at: 18th Mar 2004 15:29
The .exe (.txt,.rar,.bob) at the end of the program isnt really the format at all, it's just what windows calles it , a filename extention. This is so both you and windows know what your looking at. you can still veiw and image if you delete the .jpg at the end of a image, you just have to tell windows, what you want to run it as. the formatting is in the file, you can actually run most dark basic files with notepad

DANGIT NEO, YOU CHANGED THE CODE AND NOW THE MATRIX WONT TEXTURE RIGHT.
Code Ninja
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: AZ, U.S.
Posted: 18th Mar 2004 17:10
Quote: "Not at all, I made a 512x512 bitmap saver and it only took a few seconds. Any chance you could post your code?"

well what it does is takes a bmp or and image drawn to the screen (box,circle,ellipse etc) and converts it to number codes such as 01=rgb(255,255,255)etc.
example

so, unfortunately, that takes 3-4 mins to convert and save ...

DragnBreth
of
Dragael Software

Login to post a reply

Server time is: 2025-05-23 01:21:41
Your offset time is: 2025-05-23 01:21:41