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 / My first problem :) : Mat_Edit to DBpro?

Author
Message
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Apr 2003 02:44
Has anyone got mat edit matrices to work with DB pro? I tried running ED with Pro and got some wacked out error message about matrices "Matrix Dimensions Illegal" I tried making them smaller (dividing) but still, no luck

Anyone got these to work?

Cheers!

RPGamer
Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
http://www.realgametools.net/forums/attachments/EDDemo.jpg[/img]
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Apr 2003 05:18
Nobody? I have tried using int() around the matrix part, but it is still not working. I would really like to talk with anyone who has got matedit matrices working in Pro.

Thanks

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
Dave J
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 6th Apr 2003 11:37
I'd imagine it wouldn't be too hard to make a converter but I haven't got DBPro so I can't help personally heh. Maybe if I ever buy DBPro though...

Oh, and while we're on the topic of MatEdit, what kind of shortcut is Alt+Gr? Some other keyboard? Or more to the point, once I've activated it, how can I deactivate it?

"Computers are useless they can only give you answers."
Shady Simpson
23
Years of Service
User Offline
Joined: 15th Mar 2003
Location: United Kingdom
Posted: 6th Apr 2003 11:46
hi,

I haven't got an answer to your problem but I'd like to know where I can get MapEdit (download address) because I've been lookin for a good matrix editor for ages.

Is it freeware?

thanx.

David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 6th Apr 2003 15:15
AltGr is the Right Alt key.

You are the th person to view this signature.
Programmers don't die, they just Gosub without return....
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 6th Apr 2003 15:18
@RPGamer: This is the infamous "DBP backwards compatability" you've stumbled across. In other words, you've had it

You could make a piece of code that will save all info about a matrrix to a text file (from DB 1 app) then load it into DBP - this time using your own format so (hopefully) it'll be straight forward?



then load it again, this time in a DBP app.

You are the th person to view this signature.
Programmers don't die, they just Gosub without return....
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Apr 2003 16:02
Alt+Gr is the right alt button. This switches between mouse editing and square editing.

Matedit is freeware, and available from www.matedit.com

David: Hey thanks- Ill have to work on that. Currently we are developing a memblocks system to do this, a set of "fake" matrix commands. If this solution does work, I will be truely thankful

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Apr 2003 16:11
Write string wont work, because it expects a string. I am going to try other writing formats.

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Apr 2003 16:29
Bugga still not working I ran this code in classic...

if file exist("test.dat") then delete file "test.dat"
open to write 1,"test.dat"

Do

for matx# = 0 to matwidth#
for maty# = 0 to matheight#

write file 18,get matrix height(1,matx#,maty#)

next maty#
next matx#

my other large chunk of code

loop

And then I took the files it made, and threw them in my pro directory. I ran this code in pro...

open to read 1,"test.dat"
Read File 1,20
Make Matrix 1,Matx#,Maty#,TilesX,TilesZ

And I still got the same error. Any help?

Thanks,
RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
hmm
23
Years of Service
User Offline
Joined: 31st Aug 2002
Location:
Posted: 6th Apr 2003 17:01
Something like this. Use mat edit's arrays where possible.



Remember when loading this file (using similar code) that when setting the tiles' texture x=0 to tilesx-1, otherwise you get an error. I'll try writing a quick converter now cos I don't think there'll be much hassle.

Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 6th Apr 2003 17:29
I didn't have to modify the MatEdit source at all to get it to work - I suggest that it just depends on the Matrix.

Current Project: Retro Compo. Entry.
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Apr 2003 18:16
hmm: I added you to my MSN list, I am [email protected], thanks Ill try that right now.

Rob: Strange,,,what were your matrix dimensions?

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Apr 2003 18:24
Grrrrrr still not working. This is my classic code....

if file exist("file.dat") then delete file "file.dat"
open to write 1,"File"

Do

for x=0 to tilesx
for z=0 to tilesz
` write height
write string 1,str$(get matrix height(1,x,z))
` write tile
` tiles(x,z) is an array that is used for loading mat edit matrices
write string 1,str$(tiles(x,z))
next z
next x

loop

And after putting the File.dat into my pro directory, I ran this code in pro.......

open to read 1,"file.dat"
Read string 1,str$
Make Matrix 1,MatWidth#,Matheight#,X,Z

Still not working......

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Apr 2003 18:41
OK I changed my code around a bit to make sure I wasnt duplicating a variable, but its still not working!!

open to write 1,"Test20"

Do

for matx=1 to tilesx
for matz=1 to tilesz
` write height
write string 1,str$(get matrix height(1,matx,matz))
` write tile
` tiles(x,z) is an array that is used for loading mat edit matrices
write string 1,str$(tiles(matx,matz))
next matz
next matx

Is my classic code. Here it is pro....

open to read 1,"test20"
Read string 1,str$
Make Matrix 1,Matx,Matz,matx,matz

Bah!

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 6th Apr 2003 21:11
Hmmmm been playing around with this for a while and I stil cant get it. This is very frustrating...

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
jrowe
23
Years of Service
User Offline
Joined: 12th Oct 2002
Location: Here
Posted: 6th Apr 2003 23:24
I had a problem with loading mine too. If you open the matrix definition file, are the first two lines something like 10eX00. If so just change it to the X and Z lengths of the whole matrix.

For Fathers and Sons who enjoy wholy spirits.
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 7th Apr 2003 00:11
Hmmm yes if you open the .MA0 file with WordPad, it is all of the matrix data. The only problem is if you change anything (pixel width) then you would have problems with height data going out of wack.

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
GCEclipse
23
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: United Kingdom
Posted: 7th Apr 2003 01:58
1. When you load it should be something like the reverse of how you saved it so when you save it using a FOR...NEXT loop you should be using a FOR...NEXT loop to load it up.
2. The DO command seems out of place.
3. When you load up the strings you'll need to convert them back in values to be able to use them using the VAL() command.
4. Why are you using strings at all for saving this: Surely it would be more efficient to save all the data as FLOATs and LONGs? Then you won't have to bother with converting VALUES to STRINGs and back again?

I would do something like this for saving:



...and this for loading



Or something like that - I'm pretty sure I can get this working for you so contact me on messenger [email protected] if you get really stuck and I'll help you out.

GC
http://www.eclipsedevelopment.co.uk/
Succession: The Betrayal developer
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 7th Apr 2003 05:08
OK, thank you. I didnt get that matrix error! The only problem is, the screen stayed black, nothing seemed to work. The music started, but the screen stayed black, then eventually everything stopped and I was back at the editor. No errors occured. I am trying to fix this now.

Thank you!

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 7th Apr 2003 05:16
OK, I just ran the Raw matedit code (nothing added to it, just how it comes when you compile it) except I added in your code for the matrix. The same thing happend. I just got a black screen for a while then it exited.

Any help?

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
GCEclipse
23
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: United Kingdom
Posted: 7th Apr 2003 12:03
Hmm, difficult to tell without looking at the rest of your code. My initial thoughts are that this may be because of the main game loop so the obvious questions are:
1.is it syncing in the loop?
2.is sync on?
3.wheres the camera?
4.whats it looking at?

I'll tell you what I'll do: I'll have to get me a copy of matedit and create a working loader for it in DBPro. Then I'll post it here.

GC
http://www.eclipsedevelopment.co.uk/
Succession: The Betrayal developer
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 7th Apr 2003 12:08
I think TDKman has developed a DBP version but hasnt released it yet.
He was telling me of some bugs he solved a while back.

GCEclipse
23
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: United Kingdom
Posted: 7th Apr 2003 20:42
RPGamer: Sent you a working piece of source code that seems to work on mine. Tell me if you get any problems...

GC
http://www.eclipsedevelopment.co.uk/
Succession: The Betrayal developer
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 8th Apr 2003 00:27
I will try that wednesday, on account of im not allowed to use db cuz im sick 38 kids out of 114 were absent at my school today (its a private school) and I was one of them. Ugh,,, this isnt fun..

Thanks

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
Dave J
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 8th Apr 2003 10:03
Thanks for that Alt Gr info, I'm at school and I just looked at the keyboard here and it has "Alt Gr" on the right alt key, never noticed it before. My home computer just has "Alt" though, interesting. Now, does anyone know what the Gr stands for?

"Computers are useless they can only give you answers."
jrowe
23
Years of Service
User Offline
Joined: 12th Oct 2002
Location: Here
Posted: 8th Apr 2003 23:19
I'm not talking about the MA0 file I'm talking about the MDF file. Are you using that to load your matrix up? If so all you have to do is replace those two lines with the values you imutted to matedit when you set your matrix parameters. If you need more info the word doc that comes with it there's an explanation of the .MDF format.

For Fathers and Sons who enjoy wholy spirits.
Chief Voyager
23
Years of Service
User Offline
Joined: 20th Mar 2003
Location: United States
Posted: 9th Apr 2003 02:11
i would really like to have a way to load mat edit files into db, that's one of the main things from holding me back from getting pro because i don't know jack about .bsp and i can't hard code a matrix worth a crap.

You're ate up like a soup sandwich.
John H
Retired Moderator
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 9th Apr 2003 18:50
If I wasnt sick Id still be trying this. Hmmm, its funny, there are no errors, I just get a black screen then the proggy quits! Weird!

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines

Login to post a reply

Server time is: 2026-07-10 16:12:26
Your offset time is: 2026-07-10 16:12:26