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 Professional Discussion / Editing a Matrix With The Mouse...

Author
Message
MSon
21
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 1st Mar 2005 00:35 Edited at: 1st Mar 2005 00:45
Some Problems, but look at it to see what you think

Click on the Matrix Point and Use Mouse Z to Raise and Lower

Need feedback on how to Improve



Edit: The Object over the Matrix Point should be Visable when over the Matrix Point, But its not unless your clicking on it and I don't know why...
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 1st Mar 2005 06:26 Edited at: 1st Mar 2005 06:26
Quote: "Function EditMatrixWithMouse(Mn,Width#,Lenth#,xSeg,ySeg)
If MouseClick() = 0 Then ExitFunction 0
` Get a Free Object Number And Make an Object
Repeat : Inc On,1 : Until Object Exist(On) = 0
Make Object Sphere On,2

If MouseClick() = 0 Then Goto MatrixEditCleanUp
` Position the Object At Matrix Point
Position Object On,x * xSegSize#,Get Ground Height(Mn,Object Position X(On),Object Position Z(On)),y * ySegSize#
"


Thats why, you say 'only show the sphere if your clicking'


Click here to join our forums and get updates on game progress sooner!
MSon
21
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 1st Mar 2005 08:05 Edited at: 1st Mar 2005 08:10
NEW CODE!!!

Pyro990
21
Years of Service
User Offline
Joined: 25th Oct 2004
Location: UK
Posted: 2nd Mar 2005 07:39
Hehe, pretty cool .

My Site
Laptop: P4 3.4GHz w/HT-120GB HDD-1GB DDR SDRAM-nVIDIA GeForce FX Go5700 128MB
PC: P4 2.8GHz-30GB HDD-1GB RAM-nVIDIA GeForce FX5200 256MB
MSon
21
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 3rd Mar 2005 01:13 Edited at: 3rd Mar 2005 02:59
Thanks Pyro...

But New Code...

Heres a List of the Commands I've made, and used in this...



Check out the Right Click Menu in This, (All the Above commands used in the Programme)...

Matrix Editor...


PS: All the Matrix Tools in the Menu Work!!!

Still would like a Proper Hill Command and would like any help on improving it...

PS: If you don't have a matrix tile set then you can just rem out the 2 lines load image and prepare matrix texture and it will still work

Edit:
Matrix Shaping Commands...
Use left click to select the Area, and then MouseZ to raise or lower, then right click to exit tool

Matrix Tile Commands
Use left click to select area and then left click to go to the next tile number, and right click to exit tool
MSon
21
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 6th Mar 2005 22:53 Edited at: 7th Mar 2005 02:38
This Might sound a bit Cheaky, but does anyone have any useful Functions or code for editing a matrix?

Example: RaiseMatrixAreaWithMouse(Mn,Width#,Lenth#,xSeg,ySeg)

Above is a function that I have, and it automatically gets xTileFrom, yTileFrom, xTileTo, yTileTo direct from the mouse, and this part is reusable so I can link any matrix commands or functions direct to the mouse...

Ie:
I can change
HillOnMatrix(Mn,xTile1,yTile1,xTile2,yTile2)
To
HillOnMatrixWithMouse(Mn,Width#,Lenth#,xSeg,ySeg)

And I can add it in the Menu...
hannibal dark
User Banned
Posted: 7th Mar 2005 17:02
well i am going to publish a matrix editor next month. and seems like there is not much idea thus they are nearly same. You should try to put the texture editor routinne in your program. also add matrix, delete matrix, resize, tilex, tilez, texture, save texture, save matrix, save project (as dbpro commands in text) e.t.c.
a gui should be added also.
nice work

wanna learn ? Then just ask it to me
MSon
21
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 8th Mar 2005 01:56
I've got an Engine for a 'Never Ending Matrix' which allows large game maps, so I want to adapt this editor to the game engine...

I've altered the Editor a Little to try and make it compatable with the Never Ending Matrix...

So Far So Good...

Will Post Updated Code Soon...
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Mar 2005 04:06 Edited at: 8th Mar 2005 04:06
I converted Rob king's Magic World to DB Pro. The basic, non-enhanced version is here,source and all.

The Classic version was given to the community by Rob, so it's free to do with what you will. I think he'd appreciate a credit if you use any of it, though.

BatVink

Login to post a reply

Server time is: 2026-06-05 08:33:41
Your offset time is: 2026-06-05 08:33:41