Simpl 3D-Engine

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Simpl 3D-Engine

Post by GPI »

It would be nice to have a simple 3D Engine. The actual is (for my) to complex.

It should used like Lego. There a definied blocks and the user simple set the blocks in the world. All Blocks have the same size. The World is a definited Raster in blocksize.

Code: Select all

Here a simple block:
   ____
  /   /|
 /   / |
 +---+ |
 |   | /
 |   |/
 +---+

The world also exist as blocks:

     ____________________________________
    /   /   /   /   /   /   /   /   /   /|
   /---/---/---/---/---/---/---/---/---/ |
  /   /   /   /   /   /   /   /   /   /| |
 /   /   /   /   /   /   /   /   /   / | |
 +---+---+---+---+---+---+---+---+---| |/|
 |   |   |   |   |   |   |   |   |   | / |
 |   |   |   |   |   |   |   |   |   |/| |
 +---+---+---+---+---+---+---+---+---+ |/|
 |   |   |   |   |   |   |   |   |   | / |
 |   |   |   |   |   |   |   |   |   |/| |
 +---+---+---+---+---+---+---+---+---+ |/|
 |   |   |   |   |   |   |   |   |   | / |
 |   |   |   |   |   |   |   |   |   |/| /
 +---+---+---+---+---+---+---+---+---+ |/
 |   |   |   |   |   |   |   |   |   | /
 |   |   |   |   |   |   |   |   |   |/
 +---+---+---+---+---+---+---+---+---+

So i simple set a block in the World.
SetBlock(#nr,x,y,z,rotatex,rotatey,rotatez) ; Rotate in 90 deg.
Also a blockcreate would be nice:

SetBlockSize(#nr,pixel) ;- X-Y-Z-Axis have the same size.
CreateBlock(#nr)
addPolygon(#block,#polynr,x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4,texture)
(I know, Polygons in 3D are normaly triangles, but i can think simpler with 4 corners :)
ChangePolygon(#block,#polynr,x,y,z,texture) ; -1=no change.
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

I'm working on one. Don't know about "simple" although it is producing exe's, with the same complexity of PB-OGRE examples, in the region of 60..80k (no dll required) . Mine isn't intended to be a game engine although the design hasn't ruled it out. But probably going to migrate the code to C/C++ to get solid support for doubles, Linux, etc, and to remove a lot of the work-arounds due to inconsistencies in PB's variable addressing. Oh, and it's opengl based :D

PS: What you describe seems like a voxel based engine. Do a web search for some working examples and info. Some even think that hw may in future support voxels, giving true solids.
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Post by fsw »

dmoc wrote:I'm working on one. Don't know about "simple" although it is producing exe's, with the same complexity of PB-OGRE examples, in the region of 60..80k (no dll required) . Mine isn't intended to be a game engine although the design hasn't ruled it out. But probably going to migrate the code to C/C++ to get solid support for doubles, Linux, etc, and to remove a lot of the work-arounds due to inconsistencies in PB's variable addressing. Oh, and it's opengl based :D
I bought PureBasic 2 years ago with the intention to make little technical applications with simple 3D stuff.
But the 3D part of PureBasic seems to evolve in a GAME-ONLY feature.
That's sad.

I'm very interested in your approach though.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Yes this sort of block engine would be very interesting, for an set of programs, including games...

Maybe someone can create a simple 'Wolfenstein 3D block engine' but without using Voxel or raycasting... just D3D/Gl Api with all of it's potencial...

A block (cube), could have certain properties like:

Texture
Light (emitter)
Transparency
Etc...

After seeing that 8000 cubes demo in D3D & PB i've been trying to create a Cubic Engine... but without much sucess :P
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Maybe i should be a little bit more exactly:

In 2D older games build the Map with tiles. Like in RPG2K. I want this in 3d.

The Block should be not a solid block, in the block should be a Polygon-figure, a chair for example.

Then i can set the block in the world.

And no, i don't mean mesh. Mesh kan be set free in the world, have no fixed size.

Also, i want to create a 3D-World on the fly.

When i remember right, Breath of Fire 3 use such a 3D-Engine. Also it would be nice to have such a 3D-Engine (for all thant don't know, what i'm talking about: Breath Of Fire 3 has a 3D-World and 2D-Bitmap-Sprites) I think, so a simple 3D-Engine would be best solution for beginner. In this world i can easy edit the word and can easy move a sprite. Also i can easy found sprites in the internet, when i'm not a good spriter. For 3D it is difficult.

Also a Snes-Mode7-Effect (like in Mario-Kart) would be nice.

What i Mean: When i want to write a game with a actual 3D-grafik, then i would learn C++.

GPI
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

isometric
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Yes this game. And yes, a type of ismetric. But there is a real-3D, you can rotate the "map".

GPI
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

GPI wrote:Yes this game. And yes, a type of ismetric. But there is a real-3D, you can rotate the "map".
GPI
No it isn't....
It's isometric....
What happens is that you rotate the view (the way the map is viewed and drawen) to give you a 3d effect....

take a look:

Image
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

Yes, looks good. Sounds similar to Syndicate Wars (http://pc.hotgames.com/games/syndic/review.htm), at least from a technical point of view (it too had a freely rotatable isometric landscape and 2D sprites).

In fact, I think there is someone already developing a game like that in PureBasic, but I think the landscape is all 2D tiles, like the original Syndicate?
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Post Reply