Archived

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

vaneger

using SDL to plot 3d terrain

Recommended Posts

vaneger    100
is it possible to use pure 2d SDL rendering (perhaps an array of SDL_Surfaces rendered back to front) for creating "3d" i know it would be better to use openGL but i love indulging in such oddites and making things harder than they need to be. So would it work?

Share this post


Link to post
Share on other sites
yspotua    122
SDL is 2D library and there have been many 2D games that faked 3d pretty well. You might go looking for isometric programming tutorials.

Check that isometric forum here. Also check the articles.

[edited by - yspotua on March 22, 2004 2:52:36 AM]

Share this post


Link to post
Share on other sites
MakavelianKode    122
Anything in "3D" being displayed on your monitor is "faking" the 3 dimensional look. The reason for this is that you''re still projecting the image onto a 2 dimensional screen. So, yeah, you can make 3D graphics in SDL. It''s not easy, it''s not the optimal way of doing things(using SDL will probably make it really slow) - but it could be a good lesson in 3D graphics and rasterization. I don''t know any online sources, but some books may help. I have LaMothe''s "Tricks of the 3D Game Programming Gurus: Advanced 3D Graphics and Rasterization" and in my opinion - it teaches exactly the type of thing you are trying to do. I''ve read about 1/3 of the book so far, and I feel like I could make a really [REALLY, REALLY] simple model viewer using just SDL. Haven''t actually tried it yet tho, because I''m working on a 2D game. I''d rather get that out of the way first. You could also just try a 3D mathematics book, but I wouldn''t have any to recommend :-P

-Mak

Share this post


Link to post
Share on other sites
Oluseyi    2103
Computer Graphics: Principles and Practice, Foley, Weiner, van Damme et al. Look for it at your local public/college library.

Share this post


Link to post
Share on other sites