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 / A few questions (2D with 3D, multiple source files, .x importing)

Author
Message
SkyeFyre
20
Years of Service
User Offline
Joined: 18th May 2004
Location: Ontario, Canada
Posted: 1st Jul 2004 07:05
Ok I've got a few questions. (Using DBPro, .csm's and the CSM importer)

1. I've got myself my maps. They're all made and junk and I have my 2D sprites drawn up. Now I want to somehow put those sprites into the world, but I haven't got the slightest clue how. What command should I use for this? Is it even possible? Will I need to maybe make a 3D mesh and just play the sprites on it? (That'd suck...real bad) That's all I need to know, after that I should be able to figure out how to do the rest.

2. How do you call functions and sections of code from other files?. Example: I have main.dba and then lets say... oh... mouse.dba (Just an example) How can I run main and call code from mouse.dba? I know I've seen the command somewhere but I can't seem to find it again.

3. Same goes for importing .x files into DBPro... I've seen somewhere what I should use to import it but I cannot seem to find it anywhere.

Any help would be greatly appriciated
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 1st Jul 2004 08:29
1. Load the images with LOAD IMAGE and use SPRITE command to make/position sprites. There are quite a few examples floating about.

2. Add the other source files to the project in the files section of the ide. What actually happens when you compile your project is the ide appends all the source files to the bottom of the main source file and sends it to the compiler.
So if you include the file you can use functions/gosubs as normal.

3. Use LOAD OBJECT.

can i scream
SkyeFyre
20
Years of Service
User Offline
Joined: 18th May 2004
Location: Ontario, Canada
Posted: 1st Jul 2004 09:01
Thanks... but just to question 1. That would work if I say wanted the character to run to the right and then something from off screen would pop up?... Example: Hero character runs towards the right of the screen and it scrolls along. An Enemy scrolls onto the screen from a different part of the level. (What if the camera rotates?.. like in the Strider games?) Wouldn't it be easier to have something actually in the level? Rather than just floating above it? Someone mentioned something about PLANEs or something like that... but I don't know what they were talking about.
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 2nd Jul 2004 02:37
Well, sprites are 2D anyway... if you want to have them appear to be 3D you have to have drawn the image from the various sides, then change the sprite image as the camera rotates.

??Perhaps you don't want a sprite after all?

Any truly great code should be indisguishable from magic.
SkyeFyre
20
Years of Service
User Offline
Joined: 18th May 2004
Location: Ontario, Canada
Posted: 2nd Jul 2004 11:08
ok... here's an example... Mix MegaMan and Ragnarok Online together and you get what I wanna do... lol

2D sprites like Ragnarok and Megaman... ya know, png,bmp, whatever.. in a 3D environment like in RO... but sidescrolling like in MegaMan... so I only need to draw the sprites going sideways anyways. I was just wondering if there's any way of actually having the sprites IN the map... because I want them to be able to interact and collide with the 3D objects as well.
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 2nd Jul 2004 18:53 Edited at: 2nd Jul 2004 18:55
Well...?

From what I read from Zenassem on the 2D board he tells me that sprites in DB Pro are using the newer direct-x defintions, meaning they are "planes" in the 3D space as opposed to 2D images "pasted" over the 3D world. If this is truely the case, (and I have no reason to doubt him,) then these planes "should" be able to detect collisions, camera angles and such just like any other 3D object. Perhaps Zen can help us in this area with a little wisdom...

S.

Any truly great code should be indisguishable from magic.
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 2nd Jul 2004 20:52 Edited at: 2nd Jul 2004 20:53
i concur with sandraD, you will have to use a plain.
to do this

This hasnt been tested so i dont know if it will work or anything.
this will only put a plain in the 3d world and texture it you will have to worl out the collision yourself

Any spelling mistakes are totally In tensional.
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 3rd Jul 2004 02:33
Ah... I get you. Thanks!

S.

Any truly great code should be indisguishable from magic.
SkyeFyre
20
Years of Service
User Offline
Joined: 18th May 2004
Location: Ontario, Canada
Posted: 3rd Jul 2004 07:45
Hey cool... I'll go try that right after work... thanks a lot

Login to post a reply

Server time is: 2024-09-22 15:25:07
Your offset time is: 2024-09-22 15:25:07