Main Menu

Pseudo 3D/Mode7 in PlayBasic.

Started by kevin, August 02, 2006, 01:14:06 AM

Previous topic - Next topic

kevin

Here's a bit of an example of how PB users can build their own 3D engine in PlayBasic.

The example makes a flat matrix (in DB terms) with full your standard mouse look controls to roam around over it. It's a little more hands on (of course) then DB say, since PB is a 2D tool, but it's not rocket science either, since PB includes mesh/rotation/texture mapping and clipping functions built in.

(login required)


Ian Price

#1
This might be a silly question, but how exactly does this differ from the 3D platform game example? How big can the image be? Can it be tiled indefinitely? Can sprites be placed over the top? Is this any different to your 3D Rugby game?

Any chance of making a Mode7 type demo to show it in effect?

I'm used to using Mode7 effects in Div, and I've considered doing something with that 3D platform as a base for something completely different.

To incorporate an easy to use FULL Mode7 mode into PB would be brilliant. :)
I came. I saw. I played some Nintendo.

thaaks

This might be a silly question, but what exactly is Mode7???

Ian Price

#3
It's the ability to place an image onto a plane, then use that plane as a 3D object - a good example is the floor in Super Mario Kart on the SNES.

With true Mode7  you can view the image plane at any angle and rotate it. You can also place sprites on top of the plane and incorporate a true depth to the sprite depending on where it was placed on the plane - meaning that stuff in the distance would be smaller and move slower than stuff in the foreground. If you moved closer to these objects, they would scale correctly.

See the image below - the race track and the map are both 3d planes, whereas the karts, coins and pipes are sprites placed onto the plane.
I came. I saw. I played some Nintendo.

kevin

#4
Erm, it's 3D, so the ground is polygon mesh.  The camera has 6DOF.  You can have any number of textures / Subdivision the programmer wants.. It's a mesh!  However, there's no built in provision for handling visibility clipping of the sections though. I.e quad/octree.      

(login required)


The only down side is that since PB is 2D then texture mapping is linear (fixed Z).  So perspective (per texel) is lost.  But  ya get that !

kevin

#5
Slapped an object system into the terrain demo and this is result.   The tree textures are way too big, but ya get the idea.


Ian Price

Cool :)

BTW It would appear that you have to be registered on the Coders Turf forum to view the images.
I came. I saw. I played some Nintendo.

empty

QuoteBTW It would appear that you have to be registered on the Coders Turf forum to view the images.
Yep, but that's only relevant if your eyes survived their colour scheme. ;)

Ian Price

I came. I saw. I played some Nintendo.

kevin

#9

(login required)

kevin

#10

(login required)

Ian Price

Are some of those trees supposed to be different sizes?, as there is a small one that appears to be in front of a larger one - not sure if it's a perspective problem, or if that's the way it should be.

Whatever the case, Mario Kart PB? Ooooh yes pease! :D
I came. I saw. I played some Nintendo.

kevin

QuoteAre some of those trees supposed to be different sizes?

 There all different sizes.

BlinkOk

#13

-----bob-----------------mrt----------------elvis-------------sarg--------------pirate -------------chick--------------madsci---

i sent these dudes off to kevin. hopefully he's got the time and the motivation to complete it. there are some awesome tracks (by another artist)  to go with them that i'm in the process of getting as well.

Ian Price

I came. I saw. I played some Nintendo.