Ok – I see what you mean.
No! I did not place the wrong picture up there! This is CSLib. A library I have written to allow me to write games under windows.
Ok, you got me again.
I never actually came arround to write a game (in C++, under windows) – but I could!
CSLib is a C++ game library, build on the graphical foundation of SDL (1.2). I did that about – oh wow – 15 years ago! (Time really flies sometimes, doesn’t it?) [That means I started it about year 2000…]
Just today I configured a virtual PC with Windows XP on it, installed Visual Studio 6.0 and got it running again in no time – well, nearly no time.
What’s special about CSLib, you ask? – The answer is easy – nothing, only that I did it, and that it is flawlessly designed and executed (*cough*). Its a library that allows you to build 2d-games using sprites and tiles. All definitions are placed in xml-files and can be loaded on the fly and reused. Some features:
- sprites and tiles and collision detection between the two entities
- two different collision detection algorythms
a) exact: one pixel hits -> message send (or better -> event generated :-))
b) “hitCount”: this is usefull if you don’t want that EXACT one pixel hit, here you can say: “generate an event when 15 pixels overlap, only than is a “hit” relevant”. In many cases I find that that gives a smoother gameplay.
- music files and samples can be played
- tilemaps can be displayed in a viewport
- you can display more than one viewport
- each map can be scaled and viewed via a viewport
- tilemaps can have layers
- scrolling for maps is implemented, also parallax scrolling
- you can have fixed backgrounds
- you can switch between fullscreen and window (on the fly)
- you can enable/disable a “desktop” during the game
- the desktop has many of the usual items one expects, like:
label, button, checkbox, combobox, textfield, textarea, listbox, icons, windows (resizable/movable), menubar, menu etc.
(these were all painstakingly implemented using sdl primitives, at that time there was no adequate library)
- the desktop can have user defined lafs (look and feel)
- you can have a HTML area (this is what broke my neck, after implementing that I was so frustrated by programming, that I stopped for a while and never returned to that project)
As a “testobject” for my library I reused old stuff that I had lying around. As you undoubtedly have recognized I went for the old pacman tiles and sprites. With the library I was able to implement the pacman game in only a few days. Everything is there except:
- high scores
- a life counter
- an “end” of game
But you can play, you can go to the next labyrinth, there are ghosts chasing you and you can chase them. There are powerpills… etc.
Here some more images:
Gui with “Pacman”-LAF
The little map can be configured (zoom) at runtime,
you can also set which sprite the map center on.
You can download the version I did the screenshots with: Dev.zip
Included is a Pacman workspace and project which expects the files under “
c:\Dev\“. Visual Studio 6a works just fine, later versions – I don’t know.