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.

Newcomers DBPro Corner / Need help with Matrix

Author
Message
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 2nd Sep 2005 22:11
Hi, I am trying to create a Matrix. What I want is a landscape that I can loop when I move thru it and make it randomly make hills, but I am having a trouble texturing it. I have created a Bitmap of 256 x 256 with 4 Images in it to use and it will only use one of the images and i cant change it. Can someone help plz.


http://www.Bevansfunbox.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Sep 2005 00:26 Edited at: 3rd Sep 2005 00:27
Look for my tutorial on the Newcomers board for texturing a matrix with a single image.

You really need to try the search option lol!

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 3rd Sep 2005 00:30
I was doing that tutorial, thats how i got wot i have, but id didnt lem me select different tiles in the image.

http://www.Bevansfunbox.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Sep 2005 15:37
That's because it's a media-less texture to make it easier to download.

All you need to do is to create a set of textures and use prepare matrix texture - or look for the tutorial in the series that covers texturing your matrix with a single image.

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 3rd Sep 2005 16:04
I have made a Matrix that is long and narrow how i want it, but i would like the edges to raise up so its like mountains and randomize it and make a certine hieighth a certin texture. Is there a way to do that?

http://www.Bevansfunbox.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Sep 2005 16:38
Try MatEdit - or another matrix editor.

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 3rd Sep 2005 16:49
Here is what a pic of my marix looks like. I need it to Shift as i go foward and not on the sides.

http://www.Bevansfunbox.com

Attachments

Login to view attachments
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 3rd Sep 2005 17:34
I downloaded Mat Edit but i dont know how to use it. Its a bit confusing and it crashes sometimes.

http://www.Bevansfunbox.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Sep 2005 18:11
Read the documentation - should be in the Docs folder and look at the example programs that come with it to see how to use MatEdit matrices in your own programs.

It won't be as confusing when you have read the docs.

Pressing Space will toggle the control panel on and off.

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 3rd Sep 2005 18:39
i have made the matrix but i dont know how to do the shift matrix command.

http://www.Bevansfunbox.com
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 3rd Sep 2005 18:48
What does that program code for, classic or pro. I have an error message in the Matrix Height Data. It stops at Dat.

http://www.Bevansfunbox.com
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 3rd Sep 2005 20:42
Here is a part of the code that dont work.

Its the "DAT" that wont work.
Can some1 help plz.

http://www.Bevansfunbox.com
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 4th Sep 2005 00:11
Ok, now i have the matrix working, i just deleted the Dat and it was as simple as that. Hopefully it dont mean anything! Now im having trouble getting my movement code working!!

http://www.Bevansfunbox.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 4th Sep 2005 00:46
Yes, that stray dat required removing.

All you do now is look at the scrolling matrix tutorial and apply the same method to the matrix you just created.

MatEdit just makes creating the initial matrix easier to create with many textures. Saves you a lot of hard work...

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 4th Sep 2005 01:12
Am i looking for the Shif Matrix Command?

http://www.Bevansfunbox.com
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 4th Sep 2005 01:18
LOL, i have no idea how to intermingle that shift matrix in the one i have! Cant it be done on the editor?

http://www.Bevansfunbox.com
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 4th Sep 2005 13:31
Ok, i have been screwing around with the code, no luck but I may have figured out that i need to insert this code --


Somewere in this part of my code.

--


So im taking it that the shift matrix command has to be somewhere in the Control Movement code??

http://www.Bevansfunbox.com
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 4th Sep 2005 13:32
Whoops, dunno y it copied it all for the first snippet. Its ment to be this.



http://www.Bevansfunbox.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Sep 2005 03:45
OK, what you need to do is use the Build option in MatEdit to create a .MDF file and a texture image. Don't use the Write dba code option - it's the most difficult way to do what you want...

Start with the code from the scrolling matrix snippet and replace the code which generates the matrix texture and the matrix itself with the code that MatEdit requires to load the matrix you created with the Build option.

This will be a case of adding the block of DIM statements (see the examples that come with MatEdit - like the CandyLand Demo) and use the function call LoadMatrix.

This should then use your MatEdit-created landscape in the scrolling demo, though you will have to tweak some of the variables to look right.

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 6th Sep 2005 18:32
What is the LoadMatrix command? I have tried LoadMatrix "filename.MDF" but it doesent work

http://www.Bevansfunbox.com
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 6th Sep 2005 19:54
Ok, i have been reading the candyland script and where is tells me to rename the matrix to my own matrix it goes wrong.

It returns an error saying "script must be interger of DWORD when referencing an array" and i dont know what that means. The word that was already in there was candyland so i dont know why mine doesent work as its still the same type of text.

http://www.Bevansfunbox.com
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 6th Sep 2005 20:44
Ok, that problem was solved by using the rite file, (yes i know im stupid) but now it is saying for the first line of the scrips "Could not determine parameter type of '1 step' inside LoadMatrix.dba". Does that have something to do with the Loadmatrix file? I got it from the support folder in Matedit.

http://www.Bevansfunbox.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th Sep 2005 18:48
OK try this:

Put your Canyon.mdf file and your Canyon.bmp texture image bmp file into the same folder as the Candyland demo.

Change the name of the matrix in the demo from "Candyland" to "Canyon" and run the demo.

It should then let you walk around your landscape instead of the original Candyland landscape.

If it works, read all the rem statements in the demo and make sure your own program has all the required bits in it.

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 7th Sep 2005 19:22
arr!! now its sayingn "could not find include file 'LoadMatrix.dba'" but that file is clearly there.

http://www.Bevansfunbox.com
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 8th Sep 2005 19:27
Ok, none of the demos are working, its saying the same error, i may have to reinstall it. Does anyone have a link to mad edit? Not Matedit.com, its under construstion.

http://www.Bevansfunbox.com
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 8th Sep 2005 20:34 Edited at: 8th Sep 2005 20:40
aaaarrr! I reinstalled the Matrix editor but even if i just run one of the demos, it brings an error. Ive added a screen shot of the error. It seem that it doesent have to have writing on the first line, it jsut doesent like it and returns the error. Can some1 plz help?

http://www.Bevansfunbox.com

Attachments

Login to view attachments
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 8th Sep 2005 20:45
Ok, and i found another bug in the actuall LoadMatrix.dba. I didnt think that was to be edited, or am i wrong?

http://www.Bevansfunbox.com

Attachments

Login to view attachments
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Sep 2005 17:08
All I can say is:

Aaaaaaaaarrrggghhhhhhh!

Did you at any point say you were using DB Pro????

MatEdit was written in and designed for DB Classic and the #Include file won't work in Pro.

That's why the last of the Stickies (the posts with green arrows on them that you are supposed to read first) at the top of the Newcomers board clearly asks forum users to state whether they are using DBC or DBP when they post a question! So you don't waste the time of people trying to help you.

What you now need is the DBP version of the LoadMatrix function!

I'll see if I can dig it out for you...

TDK_Man

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Sep 2005 18:30
OK - I just did a quick demo in DB Pro for you:

http://www.computechtenerife.com/island.rar

This rar file includes the demo source, media and the Pro version of the LoadMatrix.dba file.

A snapshot of the demo:



I'm not well clued up on the improved DBPro commands, so this demo can probably be made a lot better...

But, it does show that the LoadMatrix function works!

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 9th Sep 2005 18:36 Edited at: 9th Sep 2005 18:37
Ah thank you so much, sry for wasting your time about not stating that i am using Dark Basic pro, but i did state
Quote: "What does that program code for, classic or pro. I have an error message in the Matrix Height Data. It stops at Dat."

But anyways, i am going to try this out now. Dont suppose u know of a powerfull Level Editor/Creator do you? Im not one to look for free stuff as they r usally crappy after a while, hence thats why they are free

http://www.Bevansfunbox.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Sep 2005 18:45
Quote: "I have an error message in the Matrix Height Data. It stops at Dat."


OK lol! I'll go half way with you on that, but that error only occurs when you write out 'DB Classic compatible code' with MatEdit, which doesn't use the LoadMatrix function at all!

Anyway, hopefully that demo will at least let you load the mdf you created with MatEdit into DB Pro...

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 9th Sep 2005 18:59
Should the Code work straight away, because its got an error at Line 26 "Success=LoadMap("Island",1)" error= "Subscrit muct be interger or DWORD when referencing an array"

http://www.Bevansfunbox.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Sep 2005 21:15 Edited at: 9th Sep 2005 21:18
Quote: " Should the Code work straight away"


Yes it should.

Unzip all the files into a directory, load it and run. Works perfectly for me...

[Edit] That error means it couldn't find the #Include file.

Just noticed that in the projects panel, it's added LoadMatrixPro.dba as a fixed path. It's in a different location on your machine, so delete the Include file and add it yourself from the same directory as the dba file.

That should fix it.

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 11th Sep 2005 22:45
Ive got the matrix working and i can fly about in it now, all i gotta do is add the shift matrix up somewere, do u know were i add it?

http://www.Bevansfunbox.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Sep 2005 00:45
Yes - and it's not easy 'cos it depends what direction you are travelling.

I've been playing with this for an hour or so this afternoon with the aim to doing a small tutorial. It's a bit of a 'night flight'...



Here's what I've done so far as an exe:

http://www.computechtenerife.com/nematrix.rar (1MB)

You can fly as long as you want in any direction and you'll never reach the edge of the matrix.

Controls are like a flight sim using the mouse - forwards to dive, backwards to pull up. Esc to exit.

Will post the source code when finished...

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 12th Sep 2005 19:30
Cool, thats very nice. What I am trying to do is make it only go in one direction, the picture attached is what it looks like, but you cant see the mountins on the right and left very well. Think of it as a Vally or Canyon, i dont want to be able to fly any higher then the mountins which means you cant fly over them.

http://www.Bevansfunbox.com

Attachments

Login to view attachments
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 14th Sep 2005 20:47
Anymore help with the scrolling of the matrix? I only need it to shift up.

http://www.Bevansfunbox.com
Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 15th Sep 2005 21:32
Arrr! I really hate these god dam bugs. I tried to make my game into a .exe to show my friend, but it didnt load the matrix in it, everything loaded but you couldnt see the matrix. I then gave up and when i went to carry on coding, i found out that it doesent compile in my code!!! All it done was show a black screen, or blue if i turn off backdrop. I then tried to remake the matrix and re code it, and now its saying that an object doesent exist at line 215, but the thing is there is no coding past line 211. Everything has gone wrong and i feel like deleting the whole game. Can anyone help plz? Here is my code.



http://www.Bevansfunbox.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 15th Sep 2005 22:38 Edited at: 15th Sep 2005 22:52
If DB says an error is on a line number beyond the number of lines in your program, then the faulty line is in an Include file.

In your case, the problem is the 4th line in the (first) Include file.

Quote: "i found out that it doesent compile in my code"


Are you talking about compiling the MDF file into your exe? You really need to spend a few minutes reading the documentation for MatEdit - it will most likely answer many of your questions...

[Edit] Just had a look at your code. Are you using DBPro? If so, are you using the Pro version of the LoadMatrix Include file?

Apart from that, I suggest you take a look at the following link as where you have placed the Include files might be part of the problem...

http://www.computechtenerife.com/DB/layout.htm

TDK_Man

Ad87am
19
Years of Service
User Offline
Joined: 4th Aug 2005
Location: England / London
Posted: 15th Sep 2005 23:19
I had it all runing fine, all i had to do is shift the matrix. But then it all screwed up and now wont even work. Yeh i am using the Pro Loadmatrix but its all gone hay wire now.

http://www.Bevansfunbox.com

Login to post a reply

Server time is: 2024-09-24 03:21:59
Your offset time is: 2024-09-24 03:21:59