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 / Converting memblock matrix from DBP to DBCE

Author
Message
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 8th Jun 2004 04:17
Hi guys!!

I was going to post this in the Jesticular's post but I didn't wanted to go off topic, so I did this post.

Reading what Phelax said, I searched in the codebase for the memblock matrix code, and it was there, too bad it was for DBPro only, so I'm trying to pass it to DBC Enhanced (DBCE).

This is my work so far, I tried to convert it and now I have this problem, most of the code works, I rem'd the instructions whose load the matrix height data because I don't have that "height.dat", and there's a little problem with "make object object(mem),object(mem)". DBCE doesn't let to use "make object" alone, it must be a make object cube, sphere, plain or something like that. I wonder, that can be replaced with other instructions to make that? perhaps using memblocks too?

C'mon! let's make this code for DBC too! ^_^



:: Pentium 300 Mhz, 8Mb video card, 64Mb RAM, 5 gb & 1.6 gb HD's, W98SE, Sound Blaster AWE 32 ::

http://darkguy.redgaming.net
Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 8th Jun 2004 07:10 Edited at: 8th Jun 2004 07:13
The use of the make object plain command was dissappointing, because from experience, plains are still slow and unoptimized for "patching" like that (wasted vertices as opposed to optimizing the mesh).

I'll give it a shot. It could take a while though, as I'm determined to get rid of the make object plain command and instead replace the code to really make a mesh.

edit: If I stumble into pro-specific features, I'd have to write from scratch. Pro and Classic memblock mesh formats are different.

DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 8th Jun 2004 09:04
about the make object plain...well I tried and didn't worked, so I leaved it like that, the original instruction is this:

make object object(mem),object(mem),0

Oh well...as long as the DBC community have a faster matrix, it's ok

Thanks!!!!

Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Jun 2004 09:49
Not sure what make object plain has to do with anything, but this function makes a plain using memblocks.



"eureka" - Archimedes
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 8th Jun 2004 11:10
Man you have a memblock manual or something??? this will help arkheii in translating the code I think!!

NICE!

Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 8th Jun 2004 12:20
@Phaelax: That's pro again... Pro and classic have different memblock mesh formats.

@DarkGuy: Everything you need to know about memblocks is in the help file. You'll be most interested in reading the image and mesh formats. Go to the command index and read about Make Mesh From Memblock commands, etc. and you should see the specifications for the formats.

Here's the one for meshes:




Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 8th Jun 2004 19:53 Edited at: 8th Jun 2004 20:15
Sorry for double posting, but I think I just discovered something interesting enough to deserve a bump to get attention, as I could use some help...

edit: lol I misread the numbers. Nevermind, I guess it was just my routine, it wasn't calculating the size correctly, but I've yet to trace the problem.

btw, 100*100 matrix with hardly any slowdowns. Me likes!

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 8th Jun 2004 20:42
Quote: "there's a little problem with "make object object(mem),object(mem)". DBCE doesn't let to use "make object" alone, it must be a make object cube, sphere, plain or something like that."



It's just make object because it's using a mesh to make an object I think.

Two strings walk into a bar. I'll have a pint says the first$%ASLDJ09920D"$"$D. Excuse my friend says the second, he isn't null terminated.
Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 8th Jun 2004 20:51
*Blam this piece of crap!!!*

I am so annoyed... I have no idea why DB allows me to make small memblock matrices, but not bigger ones unless I explicitly give make memblock a big number like 128000000, and even then it limits me to around 100*100 matrices. But I'll think of a solution tomorrow. I mean, later this morning... much much later this morning... or this afternoon... *yawn*

DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 9th Jun 2004 04:00
whoooooooo at last this code can be done in DBC!!! whooooo better matrices!!

Quote: "btw, 100*100 matrix with hardly any slowdowns. Me likes!"


Me likes too

Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 10th Jun 2004 10:28 Edited at: 10th Jun 2004 10:39
This is the bastard so far, after rewriting 3 times... No UV's or proper normals yet as I'm too lazy and I want to get this to run huge matrices first...



Call that, then use make mesh from memblock and make object.

And it _still_ has the same problems. When the matrix resolution is small (ie. 20*20) it works fine. It can't handle bigger resolutions though, like 50*50 or 100*100 unless you replace the memSize with a huge number (128000000 like I mentioned, or even bigger). A 100*100 matrix takes a while to load, but the FPS is fast. I need help. Badly. I'm assuming that I'm writing the mesh correctly, because small matrices work.

DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 10th Jun 2004 19:41
Awesome work arkheii! I'be glad to help but I can't because wireframe objects restart my PC :S until it gets textured, I can't see anything, but for the code I'm seeing, is great

whooooo better matrixes for dbc!

Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 10th Jun 2004 23:56
Lemme install DBC and see why it's giving you problems with large numbers.

"eureka" - Archimedes
Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 11th Jun 2004 05:55
@DarkGuy: It's not a wireframe object, that func only generates the memblock. You then make a mesh from that then you make an object from that mesh. It's gonna look like a giant white plain (until you wireframe it, then you'd see the subdivisions).

@Phaelax: So you do have DBC afterall. Might as well let the memblock expert do this, since I've never fiddled enough with things like this.

Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th Jun 2004 23:33
well, i found my enhancement cd. can't find the actual classic disc though. think i let someone borrow it.

"eureka" - Archimedes
DARKGuy
21
Years of Service
User Offline
Joined: 28th Nov 2003
Location:
Posted: 13th Jun 2004 08:11
ohhhhhhhh nice

Login to post a reply

Server time is: 2025-05-27 19:00:58
Your offset time is: 2025-05-27 19:00:58