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.

Code Snippets / A little helping tool "Position searcher"

Author
Message
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 30th Dec 2004 02:26 Edited at: 30th Dec 2004 03:19
Hi all

i have just finished a little program i like to call "Position searcher"

Here is what it does:

You control a box around on the screen.
The cool thing is that it print the X,Y,Z position on the screen so if you need to find a special position for ETC you car in a car game or a Barrel then you can use this program to find the position
And the camera follow the box so the box dont go off the screen!

Here is the source:


Hope you enjoy Position searcher!


Regards

The Nerd


Wanna join Waggames?
Then go to this link : http://www.freewebs.com/waggames
Dot Merix
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Canada
Posted: 30th Dec 2004 03:35 Edited at: 30th Dec 2004 03:41
Like i told you before, i think it would be better if you also saved the positions of every object within the game into a text file for later viewing.

I've finally completed the code for doing this, and perhaps you'll add it to your program, and whoever else finds it useful. Enjoy



I need to mention one single bug.. This code will only work once. If you try it again, it wont work unless you delete all text files that start with "object" and end in a number..

It will not overwrite previous text files is basically what i'm trying to say.

I should also mention that i have the for loop only going to 50, if your game holds more than that for objects, just change the number to a higher amount.

[EDIT - I've just adjusted the code so that it will overwrite the old file... Here's the new code
]

In any case, hope you enjoy



WindowsXP Home(Service pack 2), Athlon XP 2400+(2.1Ghz), 1GIG Ram, Ati Radeon 9800Pro 128MB.
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 30th Dec 2004 23:13
That is pretty much what I am doing with my RPG level editor except it saves type of object and object settings like culling and transparency etc.

Realms Of Tutopia: Rise Of Evil
http://www.freewebs.com/elbsoftware/index.htm
dj blackdragon3710
20
Years of Service
User Offline
Joined: 5th Nov 2004
Location: In LaLa land
Posted: 31st Dec 2004 01:14
@ merix: If you see this again, you could have just had the user enter in what they would like to save the file as. Then it would save to that file instead of overwriting the other one in case of multiple levels or something.

It has been said that the body is a slave to the mind. Only the mind knows no freedom.
Dot Merix
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Canada
Posted: 31st Dec 2004 03:02
Dj.. I posted a thread about the save stuff...

http://forum.thegamecreators.com/?m=forum_view&t=45123&b=6

In any case, i thought about this.. the thing is, with the original, even without the overwrite, if the user had used a name he's used before, it wouldnt overwrite and he'd have to do it again anyways.

I figured the easiest way would be an overwrite, and that's beside the fact that the code is super easy to change to how they want it.



WindowsXP Home(Service pack 2), Athlon XP 2400+(2.1Ghz), 1GIG Ram, Ati Radeon 9800Pro 128MB.
Dom
20
Years of Service
User Offline
Joined: 31st May 2004
Location:
Posted: 1st Jan 2005 01:09
I did something like this It was called..."OBJECT PLACER!!!!!"

DRAGONFIRE STUDIOS
Lead Programmer
(The Studio being my front room)

Login to post a reply

Server time is: 2024-11-23 17:18:31
Your offset time is: 2024-11-23 17:18:31