3D Cube with canvas with rotation

Post here your demos and examples with the source files.
Forum rules
Always post the games with a screenshot.
The file must have the ged and data files (complete game source)
Use the forum attachment to post the files.
It is always better to use the first post to put the game files

3D Cube with canvas with rotation

Postby Bee-Ant » Thu Aug 06, 2009 11:00 am

Yes I'm experimenting 3D stuff with canvas. And here's the second demo.
Thanks to fuzzy for the elipse code (sin,cos,degtorad)
You can use this stuff to make 3D room :D
Enjoy.
Attachments
3D_Cube.png
3D_Cube.zip
(2 KiB) Downloaded 1209 times
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: 3D Cube with canvas with rotation

Postby DST » Fri Aug 07, 2009 4:18 am

This demo sucks!

Haha just kidding!

:D

Its interesting though, what makes it slow down is lots of draw, an issue with the canvas. When i look more top down at it, it rotates fast, but from a more side view, its slow.

It lends some possibilities to the raycasting demo from before, that if you can minimize the drawing the canvas must do, by using the bitmap renderer instead, you could get some good speed from it.

Perhaps if you had texture sets, with all the sizes,....i mean, in wolfenstein, the walls only rotate on the x/z axis, but never the y axis.(i'm calling x the angle rotation and z is the depth(zoom) of the object). If someone can put all these puzzle pieces together, i'm sure there's a way to make a fast 3d program with no need for gpu.

Basically, take Feral's 3d examples which ran fast,combined with yours which are more convincing....perhaps it can be done!
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: 3D Cube with canvas with rotation

Postby Bee-Ant » Fri Aug 07, 2009 6:01 am

I didnt know that it slow. Because it ran well on my lappy from any side of view.
Feral's 3D...that 3D box platform right?

Hmmm...first of all, I'm still new at this stuff. So I still dont know how to read and render bitmap. But yes, I will think about the perfomance by reducing the drawing.
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: 3D Cube with canvas with rotation

Postby Fuzzy » Fri Aug 07, 2009 10:09 am

Great job using the ellipse example for this. That is the sort of logic that a good programmer uses. The code underneath is very much the same, but the appearance is quite different.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: 3D Cube with canvas with rotation

Postby Bee-Ant » Fri Aug 07, 2009 1:15 pm

Yes :D
I use 4 points x y that decided by 4 angles(0,90,180,270). Connect point 1 to 2,2 to 3,3 to 4,4 to 1 using moveto and lineto. This is for basic square without filling.

Ummm,one thing that im unable to do fuzz, how do i fill the top square of the cube?I could make some points that follow line 1-2(the line that formed of point 1 and 2) but i cant pull lines to fill the top square.arkghhh...my cube isnt perfect after all...
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: 3D Cube with canvas with rotation

Postby Turon » Tue Jan 26, 2010 9:34 am

This all sounds exciting! :D
Turon
 
Posts: 862
Joined: Sun Jan 24, 2010 5:23 pm
Score: 32 Give a positive score

Re: 3D Cube with canvas with rotation

Postby Scorpion50o1 » Wed Jan 27, 2010 3:14 am

You be able to edit this with color and make a rubics cube game of some sort? :) hope this was helpful somehow.
OMG IM SO BORED <(^^)> (>^^)> (>^^)>
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
User avatar
Scorpion50o1
 
Posts: 246
Joined: Fri Apr 17, 2009 1:07 am
Location: TX
Score: 8 Give a positive score

Re: 3D Cube with canvas with rotation

Postby Hblade » Fri Mar 05, 2010 2:58 am

Exelent stuff, bee :3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: 3D Cube with canvas with rotation

Postby Hblade » Sat Mar 06, 2010 11:42 pm

It's amazing, nice job :)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: 3D Cube with canvas with rotation

Postby Bee-Ant » Sun Mar 07, 2010 4:52 am

You just found it??
Thanx anyway
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: 3D Cube with canvas with rotation

Postby Hblade » Sun Mar 07, 2010 12:54 pm

Well, uh.. no but I wanted to compliment it again >.>
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: 3D Cube with canvas with rotation

Postby edwardfanboy » Fri Dec 31, 2010 12:30 am

How the ? do you make my little tetrahedron rotate vertically then?
Code: Select all
10 PRINT"Hello World
20 GOTO 10
edwardfanboy
 
Posts: 40
Joined: Sat Jun 20, 2009 2:38 am
Location: Nowhere
Score: 3 Give a positive score

Re: 3D Cube with canvas with rotation

Postby Bee-Ant » Fri Dec 31, 2010 4:33 am

edwardfanboy wrote:do you make my little tetrahedron rotate vertically then?

You are asking my help to make it be able to vertically rotate or what?
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest