[SDL] writting a doom-like game

Bob Pendleton bob at pendleton.com
Tue Jan 4 20:02:04 PST 2005


On Tue, 2005-01-04 at 21:52 -0300, J Inacio wrote:
>  --- m7174389-1 <priest at seraphim.info> escreveu: 
> 
>  Well, C was my first programming language, C++ my
> second and Java was the last I learned (3 years ago).
> (the thing I most love in programming is pointers and
> pointers of pointers).
>  I used to write pascal and delphi code (wich I hate),
> visual basic code (wich I hate even more than delphi).
>  I wrote some asm inline codes, but it was 8 years
> ago.
>  I have to apologise, I had take doom too "easy".
>  Maybe I should have said "Wolfenstein 3d".
>  I just want to play with some matrices using SDL for
> page flipping and things like that.
>  The reason why I can not use OpenGL * for now *, is
> that, my SiS 740 agp card is only 3d accelerator under
> windows, and I do not even use windows anymore (I am a
> Slackware fan ...) - I think I am not the only one on
> the world wich have a pcchips motherboard (I will get
> a MSI motherboard and everything will be different :)
> )
> 
>  I was thinking about that for fun, only.
>  Sorry if I looked like I thought I was a master C
> programmer.
>  I know that I looked like I was trying to show
> myself,  but I was just trying to get some fun :)
>  And I think I still have too much time, I am only 22
> now ;)
> 
>  A special sorry for Bob Pendleton, I think I made him
> angry someway.

No, not at all. I was not angry at all. I think what you are talking
about makes a lot of sense. It is a good way to learn about 3D graphics
at the lowest level.

It is very easy to ascribe emotions to the content of an email that are
not there. This is especially easy when the two people come from
different cultures or speak different native languages. 

BTW, my code for polyfonts
(http://gameprogrammer.com/polyfonts/polyfonts.html) includes a software
line drawer and a software polygon renderer including clipping. It would
be a good place to start. And the article at
http://gameprogrammer.com/6-text.html is one I wrote about doing texture
mapping. It is very old. I did a lot of the original work on a 386 about
12 years ago and is based on fixed point arithmetic. So, the code may be
a bit hard to follow.

Also, the VOGLE library at http://www.wumpus.com.au/eric/ is a good,
though confusing, software rendering library that does every thing you
want to do. Studying it can be very helpful. It was to me.

		Bob Pendleton

> 
> 
> 
> > >  Does anyone here have a good advice?
> > 
> > Well - I do have a copy of the doom-source at home -
> > the following to 
> > say:
> > 
> > - Most things they did back than were necessary back
> > than but are not 
> > necessary today.
> > To learn how to code the old way is not bad but IMHO
> > wasted time 
> > because you will still have to learn the current
> > ways of programming 
> > and if you learn those you will sooner or later
> > understand the old 
> > ones.
> > In short - redundancy :)
> > 
> > - Seeing the doom code is good if you want to learn
> > some (old) dirty 
> > tricks. Can be helpfull some time but you will need
> > some understanding 
> > of what they do first.
> > 
> > - You say you code Java - well - let's hope that's
> > not the only 
> > language because a jump from Java to assembler
> > (which doom is written 
> > in) is a - let's say - HUGE leap. If Java is the
> > only language you know 
> > you should learn C (or C++, but C is better (IMHO)
> > if you want to head 
> > that way) first before hitting assembler.
> > 
> > - It may be handy to know how to write a complete
> > renderer (rasterizer, 
> > etc.) but that's all. You don't actually want to
> > write a renderer 
> > (believe me :) you want to create 3D graphics (at
> > least I did - and I 
> > had the same idea you have ;).
> > In short - get a book about the basics (e.g. Peter
> > Shirley -  
> > Fundamentals of Computer Graphics) that will give
> > you all the 
> > understanding you need in much less time.
> > Furthermore IF you want to learn from doom you have
> > to understand all 
> > the optimizing they did and that can get really hard
> > if you don't know 
> > the basics which the doom code will NOT tell you
> > (like I already 
> > mentioned ;).
> > 
> > - If you did it anyway and wrote your own renderer
> > you will sooner or 
> > later discard it and turn to OpenGL or DirectX. Why?
> > Those libraries 
> > stick around here a long time, meaning many people
> > put lot of work in 
> > it, meaning those libraries will be better than
> > anything you will end 
> > up with in the same time. And - after all - if you
> > want to write games 
> > you need to know one of those libraries anyway.
> > 
> > Ergo - what I would recommend:
> > 
> > - If you don't know C - learn it. If you learned C -
> > switch over to 
> > C++, maybe have a (short) look on assembler (comes
> > handy some times).
> > 
> > - Get a book about 3D basics (e.g. Shirley). If you
> > feel like you want 
> > to code a few parts of it - do that one-by-one.
> > 
> > - After that get yourself a few OpenGL tutorials
> > (e.g. 
> > nehe.gamedev.net) and play around with those to see
> > how OpenGL handles 
> > the basics you just learned. You will see - you only
> > need a fraction of 
> > the basics you learned and happily not many of the
> > complicated ones.
> > 
> > - And - if you still don't have enough - get
> > yourself the book "Real 
> > Time Rendering" - that covers nearly every topic in
> > computer graphics.
> > 
> > But after all - that's only my opinion - the rest is
> > up to you :)
> > 
> > Arne
> > 
> > 
> > _______________________________________________
> > SDL mailing list
> > SDL at libsdl.org
> > http://www.libsdl.org/mailman/listinfo/sdl
> >  
> 
> 
> 	
> 	
> 		
> _______________________________________________________ 
> Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
> 





More information about the SDL mailing list