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.

Newcomers DBPro Corner / I require some assistance with GITBA (DBPro).

Author
Message
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 6th Jun 2006 02:38
GITBA stands for Getix Interactive Text-Based Adventure. I need some help with writing to a .ini file. First off, how do I create the .ini? Then, I know I use open for writing 1, savedgame.ini ... Thx, jim.

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 6th Jun 2006 04:50
Another question reqarding GITBA. How do I import an image correctly and display as the background? And how do I change the background color after adding a sphere. Also, after adding the sphere, my text disappears except for the typing blinker... any help would be greatly appreciated, thx in advance, Jim

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 6th Jun 2006 23:37
I can give a generic template to start with, but without knowing what the actual data is that your trying to save, I can't write it specifically.

Example:


Once you have determined what the saved game data is, you will have to use the WRITE commands to store the data in the file. To know which type is suited for the data, look under the commands help in the editor. (ie. Write Byte 1, variable, Write Word 1, variable, Write Long, variable, ect., ect.)

To read the file data into the program, just use the Open To Read, and any of the READ commands to get the data. Make sure you read them in the same order they were written.

You can use the Skip Bytes and Read/Write Byte To/From File to edit or read certain elements as well. This is done after the file was initally created though.
To help you with your text and image problem, I need to see a code snippet or a source file. This way I can see what your doing and I might be able to spot your problem.
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 6th Jun 2006 23:49
D Ogre: Thx. You've made me relize what I've done wrong. The program always went screwy once it was done writing and ended, as I never instructed it to close. Thx again. By the way, can you help me out with the second thing I asked?

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 7th Jun 2006 00:00
As for the text problem you are having, the problem is that the backdrop automatically turns on when a 3D object is created. You want it on so that the screen clears the old image off for 3D objects, but for input you want it off. So when you want to input something you should put.


Insanity is just a state of mind
D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 7th Jun 2006 00:15
Daemon is correct you need to turn of the backdrop. If you don't turn it back on again, you will have to handle the screen updates yourself using the CLS command. This will have to be done with some sort of loop though.

To help you any further, I need to know a couple of things first. Is there any 3D animation or movement in the scene during the time of the INPUT command? Is the image you are using for the background?
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 7th Jun 2006 00:26
Ok, what I am trying to do, is make an object rotate and slide toward the front (of the computer monitor, so to speak). Then have it say... nvm, I'll just put the code on.

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 7th Jun 2006 00:43
I don't see a code snippet or source file.
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 8th Jun 2006 01:59
I know... it got deleted somehow.... hold on.

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 8th Jun 2006 02:02
ok, nvm. I got the object sliding in done. After typing many lines, (via print "etc...."), how do I go about erasing what has been typed?

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
Moe
18
Years of Service
User Offline
Joined: 1st Apr 2006
Location: Sunny California
Posted: 8th Jun 2006 03:27
hmm... There is a magical place called the help index...
cls

parrot
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 8th Jun 2006 03:39
how do I figure out the exact middle of the screen? 1024x768. I tried dividing both by two, with no success. Checked help file... notta.
512x384. That ain't working...

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
Moe
18
Years of Service
User Offline
Joined: 1st Apr 2006
Location: Sunny California
Posted: 8th Jun 2006 03:45
lets see, help contents,commands, core commands,cls... i think you'll know where 2 go from there


parrot
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 8th Jun 2006 06:08
huh?

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
Moe
18
Years of Service
User Offline
Joined: 1st Apr 2006
Location: Sunny California
Posted: 10th Jun 2006 00:41
click on help, then click help contents, then click commands, then click core commands, then click cls

parrot
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 12th Jun 2006 10:06 Edited at: 12th Jun 2006 10:06
Quote: "how do I figure out the exact middle of the screen? 1024x768. I tried dividing both by two, with no success. Checked help file... notta.
512x384. That ain't working... "


There is two very helpfull commands for this... "screen width()" and "screen height()".
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 12th Jun 2006 19:44
The code from Mr X doesn't center the text correctly on the y axis because it doesn't take into account the text size. This is more apparent when the text size is made very large. Here is an example of what I mean.



Insanity is just a state of mind
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 13th Jun 2006 03:05
Thx.

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 13th Jun 2006 12:13
Didnt know that. Thanks, now I know that.
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 17th Jun 2006 18:02
How can I create a save load function?

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 17th Jun 2006 21:31
Please be quick with answer... thx.

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
Coder#05
18
Years of Service
User Offline
Joined: 26th Oct 2005
Location: Denmark
Posted: 17th Jun 2006 21:39


See the commands in the built in help index

easy comes easy goes
Getix Interactive
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 18th Jun 2006 01:19
I meant so It could return to a certain part of the code

Getix Interactive and Nanovision. Good Combo.
www.getixinteractive.com
D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 18th Jun 2006 21:12
I think what you actually need to do is try and finish your game code
first. Once you do this, you will know what variables you are using
and have a better idea of how to interface the game code with a
LOAD/SAVE function.

You would have to save certain key variable values used in the game
engine upon saving. Then retrieve those values back from the save
game file and plug them back into the game engine upon loading.
(ie. level number, score, lives, position within the map, enemy
position and strength, ect.)
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 21st Jun 2006 11:11 Edited at: 21st Jun 2006 17:48
Ok If this is any help, here is a little tutorial from way back that shows how to store data in a file and load it again.
For this example it is the positions of an object, but it could just as easily be any other type of data.
Hope it helps, if you need something slightly different just say.

M.I.A is pending

Attachments

Login to view attachments
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 21st Jun 2006 15:35
Er, Baggers, I think that you have forgotten to post the link!
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 21st Jun 2006 17:46 Edited at: 21st Jun 2006 18:01
*smack* Well I tried to be helpful this morning, but it's astounding how readily I failed...be right back

[edit]
editted..see post above

M.I.A is pending
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 21st Jun 2006 17:51
Two for two, Baggers! Definately not a good morning!
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 21st Jun 2006 18:02
Haha yeah true...wonder how long it'll take for all the other posts to come and bite me in the arse aswell...ah well, it's the thought that counts.

M.I.A is pending
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 21st Jun 2006 18:05
Sorry Baggers, I didn't mean to bite

Login to post a reply

Server time is: 2024-09-25 01:28:25
Your offset time is: 2024-09-25 01:28:25