StarWar HomePage
Table of Contents
1 intro
this is a game written in CL . It's very simple, but still better than the worm game for me. If you are curious about writting games on CL, and think the worm game too simple, you may check this.
This game is developed under sbcl of linux, and I am not sure whether it could work under other platforms.
Tested platform:
- sbcl/linux: good
- sbcl/winodws: little bug (life of planet disappeared, playable)
2 screenshots
Here are some screenshots of the game.
You are TEAM BLUE and your job is conqure the RED TEAM . The small stuffs are your warriors! The grey ones are neutral guys, they are lovely and just don't attack.
You can select one planet and see the LIFE of it (the bar at the bottom-right of the screen). You can move soldiers by hold left mouse button on your planet and release at the goal planet.
If your team is strong enough, the goal planet will be yours!
3 download
3.1 source code
All the source code can be downloaded at github here.
3.2 binary
download starwar-0.11 for linux
currently, there are only binary for linux platform.
4 installation
To run the game, you have to:
4.1 install the latest sbcl (suggested)
If you are using Ubuntu or Debian, you can use aptitude to install this:
sudo apt-get install sbcl
Or you may go to the sbcl homepage.
4.2 install quicklisp on that sbcl
Quicklisp is commonly used in CL for installing packages. Refers to it's homepage to get and make it work.
4.3 install required libraries
here we need lispbuilder-sdl and lispbuilder-sdl-ttf. To install and load them, just run the codes below (you have to install quicklisp first of course):
(ql:quickload '("lispbuilder-sdl" "lispbuilder-sdl-ttf" "lispbuilder-sdl-gfx"))
This will download, install, compile and load the required library. Without the lispbuilder-sdl-gfx, the game is workable but display uncorrectly.
CAUTION: if during the installation process, you got something like: …libsdlxxx.so is missing… , you might have to install the libsdl libraries first. You can find the required package (if you are using Debian related distro) by using (e.g. you need libsdlgfx.so):
apt-cache search libsdl | grep gfx
with the output:
libsdl-gfx1.2-4 - drawing and graphical effects extension for SDL libsdl-gfx1.2-dev - development files for SDL_gfx libsdl-gfx1.2-doc - documentation files for SDL_gfx
Then, libsdl-gfx1.2-4 possibly the required one.
4.4 configure asdf system
To let asdf know my package, run this:
(push asdf:*central-registry* "PATH") (push asdf:*central-registry* "PATH/lib")
Here, PATH should be the path of starwar directory.
4.5 load the game and run
Finally, this will load and run the game:
(require "org.xzpeter.game.starwar") (org.xzpeter.game.starwar:run)
have fun!
5 how to play
Check the screenshots first.
Mostly use mouse left button to play. Single click on planets to select it; Hold the left button on your own planet, and drag it to another planet to make an path arrow to transport soldiers on the original planet to the target planet.
All the maps in the game is auto generated.
Some key defines:
key | functions |
---|---|
P | Pause or unpause the game |
R | Restart game |
ESC | Quit the game |
+ | Speed up |
- | Speed down |
Blue is yours, and Red is the computer. Try to eliminate all the Red planets!
You can change the starwar.conf file to configure the game (as long as you know the right param)
6 bugs
please contact google mail with id xzpeter.
6.1 current
- planet life sometimes display incorrectly (disappear on some platform) (possibly fixed, lack of sdlgfx lib)
- random number will not work correctly in generated binaries. (fixed)