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 / Level Editor For Your Games

Author
Message
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Mar 2008 03:31
Was my suggestion for your radius problem useful?

Enjoy your day.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 24th Mar 2008 05:05
Yes - and no. I'm still working on it. Sorry if that sounds a bit cryptic!

Rotating is fine when working with just the Y axis - and has been all along. Your suggestion solved the problem I was having after zooming in and out - so thanks for that.

But as soon as I rotate on the X or Z axis, the problem returns and the camera takes very strange elliptical paths.

I have to admit that I could never get my head around Euler angles so I'm trying to learn more about the subject.

TDK_Man

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 24th Mar 2008 21:46
This should make a box when you click and drag the mouse



Now comes the problem:
At each corner of the object, I have placed a plane object pointing at the camera. I want those plain objects inside the box above to light up. I have tried alot, but every time the object is on the left side of the screen, they won`t select again.

Can anyone help?

Thanks, TheComet

Oooooops!!! I accidentally formated drive c.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Mar 2008 22:15
@TDK
I was going through some folders on my HD and I found a file titled rotate_camera_mouse (there's actually about fifty files with a variation of that title - I need a vacuum cleaner to organize this stuff!) I opened it up a voila I believe it is the solution to your camera rotation question. I wrote it to answer someone elses question a year or two ago. The solution is so simple you might kick yourself. No math (except distance forumla), at least nothing more than addition or subtraction.

Use the standard mouse look with camera y angle + mousex() and x angle + mousey(). Rotate the camera on it's own axis, then position the camera at the desired coordinates, and use move camera 0-radius to back it up. In between recalulate the radius if you zoom using the distance formula. Because you are positioning the camera at the desired coordinates (in this case we'll say the sphere in the center of the matrix) and just backing it up, it will always automatically be pointing at those coordinates.

I remember a big problem with trying to swing the camera around in arcs on all three axis had to do with POINT CAMERA - because the angles get flipped around at certain values. The solution I propose is a simple camera follow object variation.

Want a snippet?

Enjoy your day.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 24th Mar 2008 23:55
Lol!

I actually spent most of the afternoon using the Search option going back years for a solution and found one from 2004 (I think) by Van B who basically suggested the same thing - move the camera to 0,0,0 then rotate it and then back the camera up.

I've not had time to try it out yet though, and it wasn't a snippet - just the method. It sounds quite easy, so I should be OK.

I've now implemented a camera rotation gadget in the bottom right corner. You drag the three axis to rotate the camera, use the up/down arrow to raise and lower the camera and move it forward with the movement section.



Hopefully the rotating should be working a little later this evening...

TDK_Man

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 25th Mar 2008 18:25
Would anyone mind letting me know what they think of the way I've implemented the camera control gadget, (in the bottom right corner)?

Hold down the LMB on the blue axis bar and move the mouse left and right to rotate the camera around the scene on the Y axis.

Hold down the LMB on the green axis bar and move the mouse up and down to rotate the camera on the X axis.

Hold down the LMB on the red axis bar and move the mouse left and right to rotate the camera on the Z axis.

Hold down the LMB on the up/down arrow and move the mouse to move the camera on the Y axis.

Hold down the LMB on the X/Z span section and move the mouse left and right to turn the camera left/right.

Hold down the LMB on the Y/Z span section and move the mouse up and down to tilt the camera up/down.

Click on the camera reset button to reset the camera to the default position.

Move/Zoom the camera in and out with the mouse wheel.

Right-click on an object to centre it in the camera view.

Select an object with a quick single click of the LMB.

To drag, rotate or size an object, click and hold down the LMB.

When two objects are very close and are difficult to select with the mouse, use the left/right cursor keys to cycle through them, the up key to go to the first object and the down key to go to the last one.

Download Version 0.7: here (900K)

Warning: Please note that I have been working only on the camera controls and I haven't done anything to address the axis used when dragging objects yet. For example, when looking at objects from the back, dragging on the X axis will be reversed.

TDK_Man

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th Mar 2008 19:05
@Latch - Awesome Feedback and QA test reporting!

@TDK - WOW Man! Looks AWESOME!

@TheComet -
Quote: " but I doubt this will ever get as near as good with TDK`s..."
... Pay attention to Sinani201 who wrote:
Quote: "don't be discouraged by that comment. Keep trying!"


@TDK - doing this in Classic Eh?

The gotos... the select case... to really get it faster - though its ugly as sin - try a binary tree.



Only implement such spagettit when you are pretty much FINISHED making changes because its ugly but it is fast.

Jmahmood
18
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 26th Mar 2008 07:14
TDK What code did u use to select the objects in the screen?I had it in my HD but i think i've lost it.



The gadget doesn't look very comfortable to me.It is very hard to use.
Here is a camera rotation+movement system i am using in RTM.




TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 26th Mar 2008 15:55
Quote: "TDK What code did u use to select the objects in the screen?"


I'm using Sparky's collision DLL.

Quote: "The gadget doesn't look very comfortable to me.It is very hard to use."


Have you downloaded the program and tried using it - or is that what you think from looking at the above screenshot and you are asking me if it is hard to use?

Quote: "Here is a camera rotation+movement system i am using in RTM"


When you try to implement object selection and dragging objects in 3D from any camera position you will see why I didn't use a standard method like that.

TDK_Man

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 26th Mar 2008 18:35
@TDK
This is a good application. I want to preface with that for now I will attack! Just kidding about the attack; but I do have a couple of comments.

I think the camera rotation via the icon is a bit clumsy. It's too specific to click and hold on a little axis and rotate in 1 dimension - assuming you are clikcing on the right spot. The icon looks nice though! Personally, I think, it's better to have a control that goes into "camera mode" where the camera is rotated on the x and y axis free form around a set of coordinates in the manner described in an earlier post. There's no real reason to have a z camera rotation unless the camera angle is going to be carried over into export. The x and y rotation will take care of all angles.

I don't know if I didn't notice this before or if it's something new: It's probably because there wasn't camera rotation before - but the objects are moved and positioned relative to grid, which is relative to world coordinates. That's ok if one is typing in the position. If I'm moving an object around with the mouse, I want to be able to move it relative to the camera facing. So if I move the mouse left, the object goes left. If I move it Right, the object Goes right. Up, down, forward, backward - the same applies.

It becomes very confusing to place objects especially when the camera has rotated around and the object is moved in an opposite direction than the mouse. That takes away the intuitiveness.

In summary, a camera rotation mode with maybe a system key for zoom and/or pan. Object positioning with the mouse relative to the camera view - not the axes. I suppose there could be a toggle for that, but you already have the coordinate entering capability via text boxes. Remember, this is a game level builder and not an engineering app and should be quick and easy to place objects (not to imply that precision and quality in terms of 3d coordinates isn't important). The precision comes into play with the keyboard entry. Plus you still have the readouts in the status bar so people can see where their objects are being positioned.

Enjoy your day.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 26th Mar 2008 23:08
Quote: "It becomes very confusing to place objects especially when the camera has rotated around and the object is moved in an opposite direction than the mouse. That takes away the intuitiveness."


I agree entirely. That's why in the post with the download I did say:

"Warning: Please note that I have been working only on the camera controls and I haven't done anything to address the axis used when dragging objects yet. For example, when looking at objects from the back, dragging on the X axis will be reversed."



Quote: "I think the camera rotation via the icon is a bit clumsy."


It's the way it's done in Truespace and - I only found out today when I downloaded and tried for the first time - Gamespace Lite.

Truespace has an 'odd' interface which you either love or hate. Personally I love it and struggle with other 3D app interfaces.

Doing it the way I have also makes the selection of objects easier. If it's disliked too much, it might be worth adding an option to turn it off on the options screen.

TDK_Man

Sasuke
19
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 29th Mar 2008 14:27 Edited at: 29th Mar 2008 14:28
Hi TDK, as you proberly know i'm also working on an editor, though slower than I would like due to work, but i'm dying to see your editor and none of the DL's work. Could you upload one on to the forums please
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 29th Mar 2008 16:17 Edited at: 29th Mar 2008 16:20
You just happened to try the download during the 24hr period my web site is down while my ISP moves data centres!

I'll try and attach the latest version to this post for you. (900K)

Please note that in the latest version, I've been experimenting with camera movement. As it's not certain that I will keep the method used in this version I haven't done anything to the drag/rotate code so some axis will work back to front if the camera isn't in front of the object.

TDK_Man

Attachments

Login to view attachments
Sasuke
19
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 29th Mar 2008 21:14
Ok, cheers TDK
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 11th Apr 2008 20:07
TDK, are you still working on this?

Enjoy your day.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 14th Apr 2008 07:23
Yes.

I've been very busy putting the final touches to a commercial project I've been working on for the last six months ready for the launch, so I've not been able to work on anything DB-related or get on here just recently.

When everything is all finished, I intend on doing a clear-out and getting all my unfinished DB programs back on line.

TDK_Man

dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 14th Apr 2008 08:17
Wow TDK, that editor looks wonderfull. Reminds me of your MatEdit program, but a tad more 2008-ish Anywho, I got a steady 50fps on it. Works nicely, hope you get more time to work on it some more.

Cheers!
Not_Maindric
17
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 15th Apr 2008 04:33 Edited at: 15th Apr 2008 04:50
I was messing around on it for a while, and when I tried to apply a texture to an object, I got a runtime error...

Fixed it, gotta put it, gotta put the pic in the textures folder. =P

Invincibob 8
17
Years of Service
User Offline
Joined: 4th Feb 2008
Location: Some Place Somewhere
Posted: 20th Apr 2008 19:26 Edited at: 20th Apr 2008 19:28
I can't open the zip. I have Mozilla Firefox and when I try to open it, the ok button won't appear like it is supposed to.

--EDIT--

Nevermind...

Seriously, are sigs even worth it?

Login to post a reply

Server time is: 2025-06-08 01:08:18
Your offset time is: 2025-06-08 01:08:18