using SDL to plot 3d terrain

Started by
3 comments, last by vaneger 20 years, 1 month ago
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?
Advertisement
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]
SDL OpenGL. I don''t know anything about it, except for the fact that it exists. IIRC, nehe.gamedev.net has sourcecode modified for it.

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..
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
Computer Graphics: Principles and Practice, Foley, Weiner, van Damme et al. Look for it at your local public/college library.

This topic is closed to new replies.

Advertisement