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.

Author
Message
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 16th Nov 2014 02:58
I am trying to create a 3d level using cubes from saved 2d data, i thought i could simply use the y-coords in 2d as the z-coords in 3d, the x as x and the y as height, just 0 for testing.. but it seems this aint good enough, does anybody know the formula?

Hail to the king, baby!
http://davidjohnwheeler.blogspot.co.uk
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 16th Nov 2014 08:55
So what actually happens? Can you show us any code? What format is this 2d data in?

Quote: "just 0 for testing"

You mean the width and height are 0? If so, then yes, nothing will display, because the 3d cubes will have no volume.

Quote: "simply use the y-coords in 2d as the z-coords in 3d"

Is there any particular reason that you are translating the y coords to z coords? The z axis is the one that goes into the screen.

Where is your camera positioned? Is it definitely facing in the right direction to see the objects?

shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 16th Nov 2014 11:22 Edited at: 16th Nov 2014 11:30
i see the cubes, they go in a straight line, i have a moveable camera, yeh of course they need volume..lol, i meant how high they are placed!
and yes i mean y for z, imagine reading a newspaper right? held upwards you read from left to right (x) and up/down(y), if you lay that paper down flat and give the lettering height (volume) then this is what I am after, yeh i know it aint possible with a paper! but it sure is with a computer

Hail to the king, baby!
http://davidjohnwheeler.blogspot.co.uk
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 16th Nov 2014 12:54 Edited at: 16th Nov 2014 14:13
ah nm, sorted it, I did exactly what I thought should happen and now it places 3d objects in the places the 2d were! what threw me off was missing a parameter in the createobjectbox() command, think I was tired at the time .. amazingly though AppGameKit never reported the human error and compiled/ran regardless! lol

**edit**
here's some pics of final results.. will make 3d app making alot easier for me

http://tinypic.com/view.php?pic=2l9tj7l&s=8#.VGiioPmsWcc

http://tinypic.com/view.php?pic=2ufqb0m&s=8#.VGii0vmsWcc

Hail to the king, baby!
http://davidjohnwheeler.blogspot.co.uk
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 16th Nov 2014 16:51 Edited at: 16th Nov 2014 16:56
id use x,y in the 3d draw space just the same as you would with 2d

use z for depth if you want to throw layers in it.

if you need an example 3d tile engine let me know and i will post one for you to look at and use if ya wish

this example project of mine uses 1 layer pulled from a single 2d map....but uses 3d tiles to draw it.
http://forum.thegamecreators.com/?m=forum_view&t=209371&b=48

shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 16th Nov 2014 17:03 Edited at: 16th Nov 2014 17:11
i am doing this way to keep it visually simple, i am going to code into the 2d editor a way in that if you switch layers, then a ghost copy of all the previous layers sprites are copied onto the 'current' layer, then you have a reference to what the level looks like underneath a floor lets say,when you think 3d! So I can imagine editing in pure topology,of course you could only work from the ground up, like real building i guess?! the height of the 3d object is simply layernumber*3d object depth-size.all the info is saved into one file from a type with several fields in the editor the file is then copied/read back into the 3d engine test, allowing me to do anything really based and what field has what value

Hail to the king, baby!
http://davidjohnwheeler.blogspot.co.uk

Login to post a reply

Server time is: 2024-11-25 11:24:15
Your offset time is: 2024-11-25 11:24:15