Author Topic: QuickCG and Codeblocks  (Read 7425 times)

0 Members and 1 Guest are viewing this topic.

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
QuickCG and Codeblocks
« on: May 18, 2009 »
I have been getting more into C++ programming and I found two nice packages. QuckCG is a graphics package based on SDL. It is a lot like TinyPTC with some added functionality and looks a lot like FreeBasic graphics commands. It works perfectly in Code::Blocks (below) too. I am slowly trying to switch my game programming over to C++ from FreeBasic (since the FB compiler is stagnant at this point) and this is just what I needed to get similar functionality.

Code::Blocks is an open source editor that supports several compilers. I have mine set up to use GCC. What is really nice about Code::Blocks is that GDB, the Gnu debugger, is integrated into the IDE. Makes programming much easier.

Right now I am debating with myself on whether I should convert my Sword of Light to C++ or just continue using FB. Since I am not that well versed in C++ I might just continue SOL in FB and maybe convert one of my existing games over to C++ to get a feel for the process. However, I eventually want to move it to C++ and it may be easier to do that now.

Anyway, I thought these might be useful links.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: QuickCG and Codeblocks
« Reply #1 on: May 18, 2009 »
There are some useful code samples in that quickcg site too Rick, thanks for sharing it.

How do you find the file sizes in comparison with tinyptc?
Shockwave ^ Codigos
Challenge Trophies Won:

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
Re: QuickCG and Codeblocks
« Reply #2 on: May 18, 2009 »
Compared to FB there are much smaller. The textured raycaster is only 343 bytes when compiled as a release file.

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: QuickCG and Codeblocks
« Reply #3 on: May 19, 2009 »
Compared to FB there are much smaller. The textured raycaster is only 343 bytes when compiled as a release file.

That sounds not bad, but it of course depends how big the
external QuickCG lib is and how much of the raycast code
is hidden in there.

But I do not want to talk this down at all. I used to work with
SDL libs too and think they are great. There are numerous great
free libraries
available which makes coding so much easier.

Didn't know about QuickCG though - so thanks a lot for posting,
rdc! Keep us up to date on your progress.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
Re: QuickCG and Codeblocks
« Reply #4 on: May 19, 2009 »
QuickCG is included as a source file so the compiled version includes the QuickCG code. What attracted me to it is that it is simple to use but has most of what you need for 2D graphics work: built-in font, keyboard and mouse routines, a set of basic graphics primitives (clipLine is a real boon here), and a nice set of color conversion routines that support RGB, HSL and HSV and it supports loading of PNGs. It does use SDL, but personally I don't really see that as a problem since your only dealing with a single DLL.

I am sure there are down sides as well, which I'll find out about as I work with it more. I think my first project is going to be converting my Escape From Lab 42 roguelike to a raycasting engine using the base raycasting code from the site. I have always wanted to mess around with raycasting, and this is a simple enough project to get more familiar with the lib and C++.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: QuickCG and Codeblocks
« Reply #5 on: May 20, 2009 »
QuickCG is included as a source file so the compiled version includes the QuickCG code.

So the stand alone raycaster is only 343 bytes? Unpacked?

That's damned impressive.
How does it stand up to being crunched? Have you tried?
Shockwave ^ Codigos
Challenge Trophies Won:

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
Re: QuickCG and Codeblocks
« Reply #6 on: May 20, 2009 »
Sorry, I meant 343k bytes there. 343 would be very impressive. :)

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: QuickCG and Codeblocks
« Reply #7 on: May 21, 2009 »
...2D graphics work: built-in font, keyboard and mouse routines, a set of basic
graphics primitives (clipLine is a real boon here), and a nice set of color conversion
routines that support RGB, HSL and HSV and it supports loading of PNGs...

Yup, that is indeed a nice set. Having not to care about such basic gfx stuff
makes coding a lot of more fun I guess. Next to SDL, I played around with
HGE which also impresses me with easy usage and nice inbuilt features.
Cannot say what to prefer - but since SDL has a large fanbase, I would recommend
SDL I guess.

It does use SDL, but personally I don't really see that as a problem since your only
dealing with a single DLL.

Yeah. Think oldschool democoders always try to avoid to use external libraries
but personally I do not mind using a slim external set of libraries, too. Good luck
with your first C++ project then.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
Re: QuickCG and Codeblocks
« Reply #8 on: May 21, 2009 »
Thanks man. Everyone has their own favorite programming graph gizmo. I don't really have one, so I'll give it a try and see how it goes.

Yeah, the idea of external libs is an interesting one, because they are many "hidden" libraries available that are commonly used, but one doesn't think of them as such.

Any demo that uses OpenGL or DirectX is using a library, it is just that most of the time it is already installed on the computer so you don't have to include it. (Depends of course on what you are using in the lib and what version you are programming against.) Even if you roll your graphics, you are still depending on the computer's graph libs to display the images in a window. The can't get there any other way. So even the "lib-less" progs need libraries to run. :)

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: QuickCG and Codeblocks
« Reply #9 on: July 09, 2009 »
Have you tried UPX or KKrunchy on it?
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline rdc

  • Pentium
  • *****
  • Posts: 1495
  • Karma: 140
  • Yes, it is me.
    • View Profile
    • Clark Productions
Re: QuickCG and Codeblocks
« Reply #10 on: July 10, 2009 »
No, but I would think UPX would probably work. I haven't used KKrunchy so I don't know much about it.