Page 1 of 1

P-51 Mustang (3D effect)

PostPosted: Tue Aug 25, 2009 6:54 am
by cforall
Hi

This demo is based on my 3D wireframe engine.

The fighter P-51 is 3D wireframe, but the bullet and background is 2D. :D

I had planned to make bullet 3D, but its too hard, a bullet is a array, I need to allocate memory dynamically to draw it and then free it...too hard for me...

I did not bestow one thought on making background 3D, it may seem more difficult to do.

The FPS will approach 30 if you don't press any control key, but once you hold any of them the FPS will fall off sharply.
So I limit the FPS to 20 to kill frame delay. I think it will be better off if I change my way to call keydown event. :D

download and enjoy.

Re: P-51 Mustang (3D effect)

PostPosted: Tue Aug 25, 2009 2:31 pm
by Hblade
Dude holy cow man nice, hey do you think you can explain how to make a working typing text for me? I can make it but when it moves to the next message it for some reason types over the original message, >.>

Re: P-51 Mustang (3D effect)

PostPosted: Tue Aug 25, 2009 2:54 pm
by cforall
Hblade wrote:Dude holy cow man nice, hey do you think you can explain how to make a working typing text for me? I can make it but when it moves to the next message it for some reason types over the original message, >.>


:oops: :oops: Thx
Oh man I will try to help you,but I am sorry I don't quite get on to it...
Could you post pic or code to explain in detail...

Re: P-51 Mustang (3D effect)

PostPosted: Wed Aug 26, 2009 2:00 am
by cforall
Hi Hblade
Did you mean this:
I use
Code: Select all
strncpy(text,emptystring,256);
to wipe out all texts between two messages.
so its never over typing. :D

Re: P-51 Mustang (3D effect)

PostPosted: Wed Aug 26, 2009 4:12 am
by Hblade
O.O IT WAS THAT EASY!!!! LOL I ALMOST WENT THROUGH HELL TRYING TO FIGURE IT OUT >.>

Re: P-51 Mustang (3D effect)

PostPosted: Wed Aug 26, 2009 5:05 am
by skydereign
That worked? Weird, all the similar methods did not. I tried several ways of wiping the text, and I guess this one worked... Doesn't make much sense why strncpy would work over memset et all, but I guess go with what finally works.

Re: P-51 Mustang (3D effect)

PostPosted: Wed Aug 26, 2009 6:45 am
by cforall
~
Perhaps I am just one of the lucky ones. :)

Hey man you remind me of those memory functions, especially the memset&memmove&memcpy...
I only know malloc and free when I make my demo,
Now I start figuring out how to use these functions to help me make bullet 3D.~~~

Re: P-51 Mustang (3D effect)

PostPosted: Wed Aug 26, 2009 1:36 pm
by Hblade
Now you should try filling in the plane, using moveto and lineto / putpixel :D If you can do that then you have yourself a 3D model instead of 3D wireframe, also you COULD use raycasting but its not recomended, someone read from .raw files, too I forget how O.o

Re: P-51 Mustang (3D effect)

PostPosted: Thu Aug 27, 2009 12:58 am
by cforall
Hblade wrote:Now you should try filling in the plane, using moveto and lineto / putpixel :D If you can do that then you have yourself a 3D model instead of 3D wireframe, also you COULD use raycasting but its not recomended, someone read from .raw files, too I forget how O.o


Yes I reallyreally want to do planefilling :D But I think it is not a easy job.
I have no idea if the moveto/lineto/putpixel is fast enough to fill polygon.
I donot know raycasting at all and I even donnot know the memset/memmove... :oops:
It so clearly that my 3d engine is just a toy.

I think makslane is very busy now.
I just hope in the future makslane could give GE a good fillpoly function or directly give GE a good 3D engine.

Re: P-51 Mustang (3D effect)

PostPosted: Thu Aug 27, 2009 12:28 pm
by Hblade
Yeah, the only reason he isn't doing 3D now I think is because allot of moble devices dont support 3D However there should be 2 types of game editor or something, one for 3D and one for 2D :O



As far as makslane being busy, I bet he's just a fatty lol >.> I'm joking around makslane, :D

Re: P-51 Mustang (3D effect)

PostPosted: Tue Aug 09, 2011 7:31 am
by tintran
could you manage with filltriangle or fillquad instead of fillpoly?
here's my effort.
LEFT MOUSE BUTTON - will draw test triangles using filltriangle
RIGHT MOUSE BUTTON - will draw test a single green quad using fillquad (it just calls 2 triangles)

when you click the middle mouse button it'll draw 1000 random quads (2000 triangles) but it takes close to 12secs on my machine.

Re: P-51 Mustang (3D effect)

PostPosted: Tue Aug 09, 2011 3:45 pm
by Game A Gogo
How strange, I loaded the GED and ran the random test, I was surprised to see it render almost directly... so I tried it in draw-actor and had a FPS of 15-30, but that's with a buggy fps of 30, with max fps set to 64, i get a steady 20-30 (Having power's of 2 for max fps ALWAYS increases the game speed, somehow). But isn't there suppose to be 1000 quads being created? I checked in the script and only 8 gets drawn per random test. So that figures why it didn't lag much... So I changed the code to actually generate 1000 quads, it takes my computer 3 seconds to render them all. This is quite impressive if you consider my cpu is broken and can't compete with a single core half it's size (really).

Re: P-51 Mustang (3D effect)

PostPosted: Tue Aug 09, 2011 7:14 pm
by tintran
GAG, you're right the .ged only does 8 (I was testing with 8 for a while because i didn't want to wait 12secs every time i clicked).
3seconds is good to know.

Re: P-51 Mustang (3D effect)

PostPosted: Wed Aug 10, 2011 12:48 am
by Game A Gogo
I believe this could be used to create very basic 3D games at a playable rate, like some sort of Asteroid or something. Something that would be on Super Nintendo, which I don't mind :)

Re: P-51 Mustang (3D effect)

PostPosted: Sun Aug 21, 2011 11:07 pm
by tintran
fillpoly is here.

Mouse Left Button draws filled polygons that says "fill poly" plus the star.
Mouse Right Button draws 100 (random polygons with anywhere from 3 to 12 sides).

you can set fill color and border color using setfill and setborder like setpen.
hope someone can use it

code-wise: there is definite room for improvements, such as when i draw the polygon i skip over duplicates of points that go in the same direction and have the same x-values as other points already in the linked list, so an obvious improvement would be not to insert these duplicates in the first place, but when i tried it it caused major bugs which i am not able to solve right now.

right now i am just happy it draws filled polygons (concave and convex).