POV-Ray : Newsgroups : povray.off-topic : Learning C++ : Re: Learning C++ Server Time
6 Sep 2024 21:23:19 EDT (-0400)
  Re: Learning C++  
From: Warp
Date: 12 Dec 2008 07:49:11
Message: <49425dc7@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Sadly, I'm utterly uninspired about what to write past my first usual 
> program, namely "Jotto".  Any suggestions?

  Coding a small game is always fun, and a good environment for
object-oriented design (there are so many things in a typical game that
can be naturally expressed with classes, such as for example a sprite,
level data, etc.)

  OTOH one small problem with C++ is that there is no standard way of
drawing any graphics. Thus you'll have to resort to some third-party
library. The quality (as in C++ design quality) of existing libraries
is very varied, from usable to absolutely horrible. In my experience very
few C++ graphical libraries employ the same level of code design quality
as eg. the STL or the Boost libraries do, and they are often quite hard
to use, error-prone, and in some cases even buggy (there may be memory
leaks inside the library itself).

  There are two popular 2D engine libraries for Windows which I know of:

http://hge.relishgames.com/
http://developer.popcap.com/forums/pop_index.php

  I have only extensive experience on the latter one, and while it's not
horrible, it's not STL-level-of-quality either, and probably not the
easiest possible to use. From the example codes I have seen of the HGE
library, it might not be the easiest possible to use either.

  You could consider this one too, which would make your program much
more portable:

http://www.libsdl.org/

  However, I unfortunately have absolutely no experience in using it, nor
do I know how easy it is to integrate in Visual Studio. Being a C library
it will most probably be of a much lower level library than an abstract
high-quality C++ library would be, and consequently probably hard to use.
(OTOH, you said you do have a lot of experience with C.)

  You could try making DirectX or OpenGL code directly, but that would be
even lower-level code, and might become a nightmare. And you should forget
trying to program with the Windows API directly, unless you have *tons* of
experience with it, or you want to die prematurely.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.