Drawing 3D prisms/polygons (by pyro)

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

Drawing 3D prisms/polygons (by pyro)

Postby pyrometal » Wed Apr 09, 2008 3:30 am

Hey guys! I beleive I am the first GE user to have made a trimetric polygon/prism rendering system with GE! Once again I come to you with an other 3D system, in order to satisfy the 3D craze. All prisms are generated in "wireframe" and all commands must be typed in manually in the text box and then press ENTER key to activate/use them. This demo starts with a prebuilt pyramid revolving in space.

Here are all the commands that you can type in the prompt:
- "clear", clears all data.

- "c_red", wireframe color red.
- "c_green", wireframe color green.
- "c_blue", wireframe color blue.
- "c_yellow", wireframe color yellow.
- "c_cyan", wireframe color cyan.
- "c_magenta", wireframe color magenta.

-"axis_" + ("x","y", or "z") + ("+" or "-"), rotate object around the x,y, or z axes in either direction (+/-)
-"axis_stop" + (optionally "_x", "_y", or "_z"), stops all rotating of object (unless x, y, or z is specified)

-"demo_" + ("pyramid" or "cube" or "plane" or "octahedron"), builds a demo prism to rotate.


This demo was meant to demonstrate the code I developped, and hopefully help some people accomplis cool 3D effects if needed. I know the control prompt design is kinda sketchy and odd to use for most people, but I really didn't feel like designing a GUI for this project. Please do take a look at my codes, see how its made. Now that this is done, I'll try to think about another topic to demo about. Catch ya later guys!

screenshoot.PNG
octahedron revolved at some random angle

Project Prism.zip
The GED file
(8.9 KiB) Downloaded 344 times
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby pyrometal » Wed Apr 09, 2008 3:34 am

ADD: You may want to make the demo windowed instead of fullscreen in or to look at the functions for the command prompt
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby kirby » Wed Apr 09, 2008 2:31 pm

Cooooool. Yeah awesome. (TRUEEEEEE) Wow this take you lot of time to do? Another 1+ for you!!!!! :lol:
kirby
 
Posts: 121
Joined: Wed Nov 14, 2007 3:32 am
Score: 6 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby pyrometal » Wed Apr 09, 2008 2:37 pm

lol, actually, I made this in about 7 hours total of work. Thanks for the point!
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby pyrometal » Fri Apr 11, 2008 2:59 am

hmmm... I guess no one cares enough to leave a comment here...
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby Kalladdolf » Fri Apr 11, 2008 4:38 pm

:mrgreen:
just about the thing I was gonna do.
or was it a camera walkthrough? :lol:

well done, I admire your "endurance" =D
I'm actually too lazy, I just had the flashing idea of creating virtual axis like xx, yy and zz.
and then showing them on a 2d screen.
simple idea, but takes quite some coding.

cheers :wink:
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby feral » Sat Apr 12, 2008 12:07 am

very very nice pyro.. ;)

a few quick questions, would it speed up the draw process if "lineto" was used rather then individual pixel drawing ? or would the overall speed results be the same ?

I was planning on using raster/vector graphics in a retro style 2d spaceshooter game, but it appears ?possibly? that GE is rather slow at draw functions ? is that correct ?

I ended up starting a "fake" version of a vector game because I found the draw functions too slow :cry: ,

I ended up using bitmaps :oops:

that said, if pyro's demo could be further enhanced it would be a nice tool for creating the fake bitmap versions, ie: simply design the 3d shape and screengrab each frame of rotation, then cut/paste into a bitmap "spritefile",

but, I would much rather program a "real" vector graphics game. if possible. any ideas on how to optimse this ?

pyro , would you mind if i "grabbed" a series of frames from this demo to add into my "fake version" of a vector gaming demo ? I will be posting the demo soon, but it would nice to point out that "real" vector graphics are possible, and to cross reference this thread..

nice work and thanks fro the demo.. it helped ! :D :D

a screengrab from the "fake" version below ( tho i am not sure if i should cross post like this ? if not i can delete the pic, i just thought it was relevant to this thread.. )
lasertarget.jpg
demo screengrab of fake vector graphics

feral
User avatar
feral
 
Posts: 308
Joined: Sun Mar 16, 2008 6:27 am
Score: 47 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby pyrometal » Sat Apr 12, 2008 12:58 am

Thanks guys!

To feral: Using the lineto() function would probably be more "effective" than the line function I'm using, the it's far less easy to use in the sense that you always have to preset the line's initial position, which is a real bother. GE's drawing function are in fact very slow, and practically unusable for making vector based games because of this (I started making such a game once, but realized how ressource consuming the methods being used were and stopped...). Optimizing this would take quite a bit of research and time, I doubt my skill level would do too much for this. You are completely welcome to use/expand/optimize/modify this tool as you wish, this is why I posted this in this demo in the first place! I just gave people a basic framework to look at. I don't mind you posting pics if it's relevant to the topic. Good luck with your game!

--pyro
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby feral » Sat Apr 12, 2008 3:16 am

thanks for the answers pyro... looks like I will need to use "fake" vectors graphics :?

your "engine" does work well for creating the sprite frames for fake vector tho :)

my first go...
pyro.gif
frame captured from pyro's polygon engine
pyro.gif (19.84 KiB) Viewed 5364 times


now all i have to do is figure out how to draw a tank :shock:

thanks again
feral
User avatar
feral
 
Posts: 308
Joined: Sun Mar 16, 2008 6:27 am
Score: 47 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby pyrometal » Sat Apr 12, 2008 4:07 am

Nice work! Do you think you can figure out how to code the polygons to make a tank shape? Actually a better question... Have you figured out how the program draws the polygons in? Also, I should warn you that you can only draw it in triangles... unless you somehow managed to make other shapes ( which none could have the certainty of being contained in a plane...). You could always make a "line segment in space" function by altering some of the codes!
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby Kalladdolf » Sat Apr 12, 2008 4:35 pm

you said that the GE line drawing functions are slowing down the game?
but I was just about to use the drawline function with canvas for the 3d :cry:
this creates a problem
here's what I wanna do: make a 3d camera walkthrough with GE.
(I don't use real sprites though, just lines)
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby DarkParadox » Sat Apr 12, 2008 5:08 pm

hey pyro, i found a font over the internet and i couldn't get it to work; so i took yours and edited the color to look like
the one off the internet i saved it, but now i can't figure out the initial font character.
What was the initial font character you used?
User avatar
DarkParadox
 
Posts: 457
Joined: Mon Jan 08, 2007 11:32 pm
Location: USA, Florida.
Score: 84 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby pyrometal » Sat Apr 12, 2008 5:53 pm

You like my font?! I made it myself in paint! You can use it if you want, the intial character is "space" (just press the spacebar).
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby pyrometal » Sat Apr 12, 2008 5:56 pm

Good luck Kall, just to warn you that your game will most likety be somewhat laggy though... Its not an easy task.
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

Re: Drawing 3D prisms/polygons (by pyro)

Postby DarkParadox » Sat Apr 12, 2008 6:07 pm

thanks pyro!
User avatar
DarkParadox
 
Posts: 457
Joined: Mon Jan 08, 2007 11:32 pm
Location: USA, Florida.
Score: 84 Give a positive score

Next

Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest

cron