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 / Gone are the days of the ol' Matrix.

Author
Message
Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 27th Jun 2014 07:31
Hi Friends,

You'll find a bit of a hack & slash below, written & sourced by myself a few years back. It should hopefully compile (no doubt there's some Matrix1 Utils hiding in my code) on copy & paste, and you'll see a few camera tricks at play in the resulting EXE.

A bit of background on where I'm at. I'd like to move on from DBPro Matrix features, mainly due to the fact they you can't recover them during a media reload operation, which ultimately causes any DBPro application that's using a Matrix to crash upon reload.

Now, my question; can those of you familiar with any of the 3rd Party terrain plugins for DBpro, create a similar or identical scene, which allows users or objects to select "squares" on mouse over the terrain object, allowing the change in colour of that terrain square? Further to this, it's not just a simple colour change, but rather a texture changing, that red/green is actually a generated image that slots on to each Matrix tile.

If you think or know that this can be achieved, would you care to post an example? Feel free to modify the code below, but note that I don't own any terrain plugins so won't be able to compile your example, so please include an example EXE too in your reply.

Cheers in advance,
BFM

PS: Mind your step in my code dump!



Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 27th Jun 2014 20:07
Theoretically, if you take into account the size and position of your matrix, looking down at it from a birds-eye view, you should be able to use PICK SCREEN to estimate where on the grid your mouse is hitting and then when you click you can tell it which image to fill it with.

I can come up with an example, but I may not have time until next week.

I have a Matrix-From-Heightmap code that will paint a single image over an entire Matrix (may be buggy) but that's obviously not the control you're looking for.

666GO†O666
Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 29th Jun 2014 13:47
Yeah, my main focus here is to find an alternative to the default DBPro Matrix by something that will offer similar functionality.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 29th Jun 2014 17:40
I started an experiment which allows you to create multi-tiled terrains using Matrix1 utilities. I am using some of these techniques in my engine. Perhaps you could create your own matrix system similar to what I did, it just needs more work.

Here is the link

Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 30th Jun 2014 02:55
Ahh yes, I recall seeing this a year or so ago! Thanks for the guidance Chris! I'm still curious about the "official" terrain plugins if anyone would like to comment on these.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 30th Jun 2014 21:47
Blitz terrain are composed of sectors; but I cannot remember if they can filter user input. The other feature is environment maps; each part of the terrain can have different values supplied by a texture pixel lookup

Login to post a reply

Server time is: 2026-07-06 02:14:16
Your offset time is: 2026-07-06 02:14:16