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 / Free Source Code

Author
Message
alpha numeric characters
21
Years of Service
User Offline
Joined: 17th Jan 2004
Location:
Posted: 10th Sep 2004 09:08 Edited at: 10th Sep 2004 11:29
We'll, i've searched code base, different forums(wonder if a search in one forum is different from another) for multiple things, but all seems hopeless. I can't get it to print to the screen for the menu. I'm sure i could get it to do the rest, but i need to save space, so i won't use pictures. Here's the main source, 9xx lines

Thanks alot for all your help.
I've got thwe program to do what I want. I'll leave the source code up to inspire whoever... Thanks alot.
alpha numeric characters
21
Years of Service
User Offline
Joined: 17th Jan 2004
Location:
Posted: 10th Sep 2004 09:26
update to the last function,

It will only work right when you end the game, hit f12...
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 10th Sep 2004 14:47
There have been many threads dealing with this problem, primarily because DBC tends to print the 2D text on the back plane before the 3D backdrop and objects appear on the screen. This means either a) you must print your text after all other rendering and before a sync command, or b) you must make your text into a sprite and paste it over the rendered image. In my quick & dirty menu system I chose the latter operation, which works for my needs but hasn't ever explained the solution to me. For my money, you have to print the text at each loop to get it to appear, which is a real bother.

s.

Any truly great code should be indisguishable from magic.
Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 10th Sep 2004 17:45
I have had this problem for soooo ******* long that it nearly drove me to destruction, and i realised eventually i wasnt doing one thing...



i hope for your sake that this was the problem
alpha numeric characters
21
Years of Service
User Offline
Joined: 17th Jan 2004
Location:
Posted: 11th Sep 2004 10:42
Thanks alot for all your help again. Now I need to create a menu. I can grasp the basic concept of if you click on this, then go here. But, I want to load an object and stick it on a plain and print over the plain to make it look better. I want there to be a few buttons on the screen and let the mouse show, but to have to let the mouse show just because of a menu is kind of dumb, it makes the game look like I programmed it instead of a professional. Using the varibles x# and z#, can you'll give me a code to compare where the mouse clicked to move the character there in the main loop? Thx.
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 14th Sep 2004 05:12
Here's a limited way of getting your OWN mouse (not wot u wanted, but u may be able to improve it.. probably the code's too crap.. )

load image 1,"cursor.bmp"

do
`insert crap here

paste image 1,mousex()-xadjustment,mousey()-yadjustment

loop

in xadjustment and yadjustment, if, say, the mouse pic started on 1,1 rather than 0,0 you could set xadjustment=1 and yadjustment=1

Actually, forget it. I'm just reading what I want to be written down.

P.S> **ACTUALLY GOOD ADVICE** I think what you're looking for is a 3d coordinates > 2d coordinates > 3d coord's converter. try searching these forums for 'mouse picking'

[img src=http://blanky.pt-web.net/ddd.gif] >::p

Login to post a reply

Server time is: 2025-05-24 19:04:54
Your offset time is: 2025-05-24 19:04:54