- Online Community Forums » The Depot » Move the crate

This thread is locked; no one can reply to it. rss feed Print
Move the crate
Member #2,756
September 2002

Hello everyone.

Finaly managed to actually finish a tiny game. Its a simple sokoban clone.
Developed under Linux in Code::Blocks.

Windows binary available in attachments. ( Hope they will work. )

Source code available here.
Download source code here.

To compile the game use CODE::BLOCKS.

Compiling under Linux:
Use script to build your game directory before running the game.
This scripts uses Imagemagick convert to convert GIMP XCF files to bitmaps.
Also copies all required files to the directories they need to be when the game runs.


Member #7,827
October 2006

Nice! I used the windows binary, it worked great. I liked the graphics, and everything went pretty smooth. I really appreciated the scale factor option in the settings menu. I got all the way to level 17 before things got a little too hard for me. I should say though that levels 1-10 were too easy, and things only got interesting around level 13. In terms of improvements... perhaps an undo system might be an option (perhaps max number of undo's per level?). Also, it'd be a big quality-of-life improvement if you allowed keyboard menu input, e.g to advance to the next level. Might be nice to have a sokoban solver to tell you when you're in an impossible state, but that might be a bit too much work.

I tried the editor, but one thing I noticed missing is the ability to select alternate tiles for the floor (e.g. there are some tiles with floorboards missing). Maybe I missed something.

Good job!

Izual said:

Developed under Linux in Code::Blocks.

Can't think of a more appropriate IDE to develop this game in ;D

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Member #2,756
September 2002

Thank you for trying it out. I was expecting a crash or two or perhaps a missing dll, so i am actually pleased to hear that there were no problems running the game.

The first 10 levels are there just to be there. I made them in a hurry to meet the quota of 20 levels for release i set for myself. :)
There is a plan to make more levels for future releases. And of course, more challenging.

Undo should be easy to implement but the "solver" is another thing.
Keyboard input for menu is also planed for future releases.

In editor you can use mouse wheel to scroll trough all the floor "decoration" tiles or mouse wheel press to delete / add random floor decoration.

Member #7,536
July 2006

I don't like GUIs/IDEs so I hacked up these simple makefiles to build from the command line. :-/

1.PHONY: all clean 2 3all clean: 4 $(MAKE) -C game-source-code $(MAKECMDGOALS)

1.PHONY: all clean 2 3ALLEGRO_LIBS = allegro-5 allegro_dialog-5 allegro_font-5 allegro_image-5 4CFLAGS = -Iinc -Wall $$(pkg-config --cflags $(ALLEGRO_LIBS)) 5CC = gcc 6GAME = ../bin/move-the-crate 7HEADERS = $(wildcard inc/*.h) 8LIBS = $$(pkg-config --libs $(ALLEGRO_LIBS)) 9SOURCES = $(wildcard src/*.c) 10OBJECTS = $(patsubst %.c,%.o,$(patsubst src/%,../bin/%,$(SOURCES))) 11 12ifdef DEBUG 13 CFLAGS += -g3 -O0 14else 15 CFLAGS += -O2 16endif 17 18all: $(GAME) 19 20clean: 21 rm -fR $(GAME) $(OBJECTS) 22 23$(GAME): $(OBJECTS) 24 $(CC) $(CFLAGS) -o $@ $? $(LIBS) 25 sh ../scripts/ 26 27%.c: %.o 28 29../bin/%.o: src/%.c $(HEADERS) 30 $(CC) $(CFLAGS) -c -o $@ $<

The game expects you to run from the generated "bin" directory so I also created a to go with it:
1#!/bin/sh 2cd bin && ./move-the-crate

The game is nostalgic because it reminds me of Chip's Challenge from the DOS days, and probably other related games. It's a nicely polished first game!

Edgar Reynaldo
Member #8,592
May 2007

Congratulations on a functional game. ;)

It would be nice to have the interface completely thru the keyboard, or the mouse, but mixing the two slows the game and breaks up the feel.

I played to level 12 before it started to get very difficult.

One thing I noticed, is that creating a triply scaled window breaks the game. The controls and the title bar go off the top of the screen and you cant get them back. More graphics modes might be nice.

The 'X' button in the window doesn't close the game. Catch the ALLEGRO_EVENT_DISPLAY_CLOSE event to act on the close button.

If you get time, a little bg music or sound fx might be cool too.

EDIT - It should be "available", not "aviable" for the level info.

Thanks for letting me play. ;)

Member #2,756
September 2002

Hello again.

Updated version of this little game called "Move the crate" can be found here. Or as an attachment to this post.

Source code available here.

What is new:
- Lots of keyboard controls in menu, gameplay and also some in editor.
- Confirmation to keep changed window size.
- Undo! Yes, you can undo your last 100 moves now.

bamccaig said:

I don't like GUIs/IDEs so I hacked up these simple makefiles to build from the command line. :-/

One day i will have to learn the magic of makefiles so i can keep everyone happy.
Thank you for your effort in making one.

Thank you everyone for testing it out and all your suggestions.

Go to: