Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ByteMe95

My Beginner demo - good fps?

This topic is 5826 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey. After learning the basics of 3D the past couple of weeks I finally have a small demo I''d like to share and get some criticism about (Bear in mind i literally learned how to plot a point in 3d space no more than 2 weeks ago if not less) Ok, so I have a torus .ASC file which gets loaded and is rotated at a constant rate (no interactivity) and uses diffuse lighting with gourad shading (finally got it down after ALL those posts!! Thanks to everyone who helped me out) So this exe uses DDRAW to get into 640x480x32 bit mode, but that''s all it does. Then I lock the backbuffer at the beginning of every frame and release it at the end, so the 3d is ALL pure software that I coded myself from reading massive amounts of articles and tutorials. So I wanted to know a few things. First and foremost, what are the FPS you are getting and your machines? Also, what is a good fps for something like this? Just having a spinning torus (I''m not sure how many vertices and faces there are but you can easily check in the asc file) with gourad shading. There is no clipping yet either. Sorry but I forgot to include the code in the zip and I dont have it with me here, I''m at work. But if anyone is interested in seeing the code just ask, you''re more than welcome to look through it. Ok, here''s the link, tell me what you think I''m a poet, and I didn''t even know it ;oP 3dTest Feel free to check out my web page if you want, http://pages.nyu.edu/~rba203 I await your repsponses - Rob ByteMe95::~ByteMe95()

Share this post


Link to post
Share on other sites
Advertisement
I recommend using 16-bit mode, not only will that be faster, but not all video cards support 32-bit mode(like mine).

*** Triality ***

Share this post


Link to post
Share on other sites
I started off in 16b mode and it was working well, but I was having trouble drawing the right colors in that mode. I had the right code (I believe) that get sthe video mode "565" or "556" etc. and then a macro using that info RGB16() but it wasn''t working and i couldn''t be bothered to look into it. Besides I wanted to my jump into 3D look as nice as possible, and 16 million colors is a lot nicer than 65K from what I''ve seen.

I forgot one more thing in my original post, IF this frame rate is high enough (which im not so sure it is, it is only ONE object), what should i work on next on my quest to become a 3d guru? And when should I move on to D3D or opengl?



ByteMe95::~ByteMe95()

Share this post


Link to post
Share on other sites
Wow, pretty cool.. seems like you''re working hard on this 3D thingy I haven''t had much time, just completed my VECTOR class and now I''m starting my Matrix class, and my 3D Object organization... I would like to organize it well so it would be easier for me when i start working on the engine, and use it as a framework for other engines that i do.. (or somethinb like that )... anyways, you said you were going to send me some ASC files... i never received any im waiting for those, so I can start coding my ASC loader...

What''s diffuse lighting?

Coule you give me some URLs of articles that you read on 3D programming? Thanks!

btw, Can I see the code that you have?,.. oh before i forget.. i got 20fps on my computer at work... it''s an NT, so it supports DirectDraw 3.x only... that''s why it''s so slow... ill try it out on my machine at home once i get there...

P.S. Apology for not coming back on time yesterday.. had to help out my father...

-------------------------------
That's just my 200 bucks' worth!

..-=gLaDiAtOr=-..

Share this post


Link to post
Share on other sites
hey, it nice to see someone else taking the manual road to 3d.

yes it''s much faster using 16bpp mode. since you''re using ddraw try the function GetPixelFormat. it''ll give you everything you need. it gives you the bitmasks for each RGB component and it''s easy to calulate what you need.

if you want some code i''ll post it.

Share this post


Link to post
Share on other sites
I had some code I found on the net that calculates the bitmasks using GetPixelFormat. I thought it was woring, but then i realized it didnt work for all values. Like if i put in RGB16(31, 31, 31) it would come up white, but if i did RGB16(15, 15, 15) it would be greenish instead of grey.

BTW, what color is the torus showing up for you guys? Is it yellow??? I have a feeling it wont be yellow on all machines.

I think I''ll stick with 32b for now cause it''s easier and the colors are much nicer. 255 shades per component sounds nicer to me than 32.



ByteMe95::~ByteMe95()

Share this post


Link to post
Share on other sites
Hey Rob, could you answer my questions please? Thanks!

btw, about the color... Your RGB macro is not correct. I would guess that the pixel format is 565 on your machine when using 16-bit color. I had the same problem as you getting greenish, purplish type of color simply because my macro was wrong... but finally i found out what the problem was and here is what im using now (off the top of my head)

#define RGB16_565(r, g, b) (((r)>>3)<<11)|(((g)>>2)<<5)|((b)>>3)

Hope this helps!

-------------------------------
That's just my 200 bucks' worth!

..-=gLaDiAtOr=-..

Share this post


Link to post
Share on other sites
Hey Gladiator.

Diffuse lighting is basic lighting, when you take the angle ofa light source with a face normal (for flat shading) or a vertex normal (gourad) to get the desired intensity of the light. It''s the most standard lighting from hwat I understand. After that comes specular lighting where you get the "shininess" effect, that takes the camera vector into account cause specular lighting is relative to the position of the viewer''s eye, or in this case the camera.

About the ASC files, sorry I completely forgot. You could actually use that torus asc file in the zip in my demo. But if you want more I told you where to find them, look for 3dica (REALLY easy to find!!) or zed3d (not so easy to find). But 3dica has the most asc files, like 7. Anyone else know where I can find more asc files? Or what 3d file format I should move on to that isn''t too complicated?

About the sites I''ve read, I can''t name any because I''ve pretty much read them all until I found myself reading the same articles. Take a look at flipcode tutorials, they''re pretty good. Also on the intro page of gamedev go to the side bar for "Hosted sites", there''s a link to a good 3d programming page.

And try to find zed3d. 115 pages on 3d coding in word format can''t ever be bad.

PS - no one answered me about the color of the torus, is it yellow for everyone?



ByteMe95::~ByteMe95()

Share this post


Link to post
Share on other sites
Looks Nifty... i got 15 fps (sometimes 18) while running AOL and some other progs in the background. P2 350, 192MB Ram, ATI 3D Rage Pro.

Yes it was yellow for me too....

Nice work for pure software coding

40

www.databyss.com
www.omlettesoft.com

"Don''t meddle in the affairs of wizards, for they are subtle and quick to anger."

Share this post


Link to post
Share on other sites

This topic is 5826 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!