P-51 Mustang (3D effect)

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

P-51 Mustang (3D effect)

Postby cforall » Tue Aug 25, 2009 6:54 am

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.
Attachments
P51(1).PNG
P51Mustang_exe.zip
(1.08 MiB) Downloaded 526 times
P51Mustang_sourcefiles.zip
(489.88 KiB) Downloaded 651 times
P51.PNG
Last edited by cforall on Wed Aug 26, 2009 3:02 am, edited 3 times in total.
User avatar
cforall
 
Posts: 65
Joined: Thu Aug 06, 2009 2:46 pm
Location: Shanghai
Score: 8 Give a positive score

Re: P-51 Mustang (3D effect)

Postby Hblade » Tue Aug 25, 2009 2:31 pm

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, >.>
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: P-51 Mustang (3D effect)

Postby cforall » Tue Aug 25, 2009 2:54 pm

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...
User avatar
cforall
 
Posts: 65
Joined: Thu Aug 06, 2009 2:46 pm
Location: Shanghai
Score: 8 Give a positive score

Re: P-51 Mustang (3D effect)

Postby cforall » Wed Aug 26, 2009 2:00 am

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
Attachments
ForHblade.zip
(194.83 KiB) Downloaded 305 times
User avatar
cforall
 
Posts: 65
Joined: Thu Aug 06, 2009 2:46 pm
Location: Shanghai
Score: 8 Give a positive score

Re: P-51 Mustang (3D effect)

Postby Hblade » Wed Aug 26, 2009 4:12 am

O.O IT WAS THAT EASY!!!! LOL I ALMOST WENT THROUGH HELL TRYING TO FIGURE IT OUT >.>
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: P-51 Mustang (3D effect)

Postby skydereign » Wed Aug 26, 2009 5:05 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: P-51 Mustang (3D effect)

Postby cforall » Wed Aug 26, 2009 6:45 am

~
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.~~~
User avatar
cforall
 
Posts: 65
Joined: Thu Aug 06, 2009 2:46 pm
Location: Shanghai
Score: 8 Give a positive score

Re: P-51 Mustang (3D effect)

Postby Hblade » Wed Aug 26, 2009 1:36 pm

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
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: P-51 Mustang (3D effect)

Postby cforall » Thu Aug 27, 2009 12:58 am

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.
User avatar
cforall
 
Posts: 65
Joined: Thu Aug 06, 2009 2:46 pm
Location: Shanghai
Score: 8 Give a positive score

Re: P-51 Mustang (3D effect)

Postby Hblade » Thu Aug 27, 2009 12:28 pm

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
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: P-51 Mustang (3D effect)

Postby tintran » Tue Aug 09, 2011 7:31 am

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.
Attachments
triangles.ged
(7.47 KiB) Downloaded 301 times
filltriangles.exe
(1.37 MiB) Downloaded 291 times
trianglesandaquad.png
LEFT AND RIGHT MOUSE BUTTON
randomquads.png
MIDDLE MOUSE BUTTON and wait
User avatar
tintran
 
Posts: 157
Joined: Fri Dec 24, 2010 1:34 am
Score: 30 Give a positive score

Re: P-51 Mustang (3D effect)

Postby Game A Gogo » Tue Aug 09, 2011 3:45 pm

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).
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: P-51 Mustang (3D effect)

Postby tintran » Tue Aug 09, 2011 7:14 pm

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.
User avatar
tintran
 
Posts: 157
Joined: Fri Dec 24, 2010 1:34 am
Score: 30 Give a positive score

Re: P-51 Mustang (3D effect)

Postby Game A Gogo » Wed Aug 10, 2011 12:48 am

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 :)
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: P-51 Mustang (3D effect)

Postby tintran » Sun Aug 21, 2011 11:07 pm

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).
Attachments
fillpoly.zip
(9.85 KiB) Downloaded 304 times
fillpoly2.png
fillpoly.png
User avatar
tintran
 
Posts: 157
Joined: Fri Dec 24, 2010 1:34 am
Score: 30 Give a positive score


Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest