SDL Game Freecraft

All about ST/STE games

Moderators: simonsunnyboy, Mug UK, ICS, Doctor Bob Gordon, Moderator Team

Post Reply
medmed
Atari Super Hero
Atari Super Hero
Posts: 717
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

SDL Game Freecraft

Post by medmed »

Please find another SDL port: Freecraft

Freecraft is a free clone of Blizzard's famous realtime strategy game, WarCraft II.

Source are from https://web.archive.org/web/20050126165 ... src.tar.gz

Original data are from http://dasixk.free.fr/freecraft-1.18.lzx

You'll find 020/CF binaries & Mint patch here.

Enjoy!

NB: You can adapt the resolution you want in the option menu. Some docs.
You do not have the required permissions to view the files attached to this post.
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
marss
Captain Atari
Captain Atari
Posts: 485
Joined: Thu Nov 07, 2002 12:29 pm

Re: SDL Game Freecraft

Post by marss »

Works great 👍
medmed
Atari Super Hero
Atari Super Hero
Posts: 717
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: SDL Game Freecraft

Post by medmed »

Cool!
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3087
Joined: Sun Aug 03, 2014 5:54 pm

Re: SDL Game Freecraft

Post by ThorstenOtto »

Your patches to the type casts are wrong. You have it changed to

Code: Select all

#define	FetchLE16(p)	SDL_SwapLE16(*((unsigned short*)(p)++))
But "++" is right-associative, so it will be applied to p only (without the cast), therefor incrementing the pointer only by 1 if it is a void * or char *. You have to use something ugly like

Code: Select all

(((unsigned short*)(p += 2))[-1])
vido
Atari Super Hero
Atari Super Hero
Posts: 813
Joined: Mon Jan 31, 2011 7:39 pm

Re: SDL Game Freecraft

Post by vido »

It works grerat on the FireBee! Thank you!
Your realy made my day with this port!!!
I really like starategy games like that :)
medmed
Atari Super Hero
Atari Super Hero
Posts: 717
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: SDL Game Freecraft

Post by medmed »

ThorstenOtto wrote: Wed Dec 13, 2023 6:51 pm Your patches to the type casts are wrong. You have it changed to

Code: Select all

#define	FetchLE16(p)	SDL_SwapLE16(*((unsigned short*)(p)++))
But "++" is right-associative, so it will be applied to p only (without the cast), therefor incrementing the pointer only by 1 if it is a void * or char *. You have to use something ugly like

Code: Select all

(((unsigned short*)(p += 2))[-1])
Many thanks Thorsten,

I did as quick as I could to let gcc build this twenty year old code :)
Many thanks for the tips.
I'll repatch with it asap.
Last edited by medmed on Wed Dec 13, 2023 8:43 pm, edited 1 time in total.
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
medmed
Atari Super Hero
Atari Super Hero
Posts: 717
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: SDL Game Freecraft

Post by medmed »

vido wrote: Wed Dec 13, 2023 7:47 pm It works grerat on the FireBee! Thank you!
Your realy made my day with this port!!!
I really like starategy games like that :)
happy to hear that :)
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3087
Joined: Sun Aug 03, 2014 5:54 pm

Re: SDL Game Freecraft

Post by ThorstenOtto »

A few more notes:

- You need to enable -DUSE_LIBMODPLUG to be able to play music
- there are problems again with upper-/lowercase filenames from the data archive (e.g Graphics vs graphics). Also some filenames seems to be truncated there. I've made a fixed archive on https://tho-otto.de/download/sdl/freecraft-data.tar.xz (but maybe you want to have a look again). It also seems to be strange that a lot of content is duplicate, eg graphics and data/graphics.

It should also be noted that this game seems to be discontinued because of copyright problems. There is a successor to this on https://github.com/Wargus/stratagus, unfortunately that requires SDL2.
vido
Atari Super Hero
Atari Super Hero
Posts: 813
Joined: Mon Jan 31, 2011 7:39 pm

Re: SDL Game Freecraft

Post by vido »

As Otto mentioned there are problems with filenames. It works on the FAT FS but not on the ext2 FS.
Also the option save game is not working. The file cant be saved.

The game runs really smooth on the FireBee :)
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3087
Joined: Sun Aug 03, 2014 5:54 pm

Re: SDL Game Freecraft

Post by ThorstenOtto »

@vido: you can try the data archive linked above. It can also be used for medmed version. It must be directly extracted to the directory where the game is installed (there is no path prepended).

You can also try the version that i've build : https://tho-otto.de/download/sdl/freecr ... bin.tar.xz (also contains the data already installed)

As for the save games: it should work, but there are (atleast) two bugs. The game uses $HOME/.freecraft/save as directory, but does not check whether $HOME is set at all. And there is some rendering problem in the "fileselector":
Screenshot_20231214_103514.png
Also, the shortcuts for this (F11 + F12) are not available on Atari, and should be changed.

Edit: fileselector looks ok when invoked from the main menu:
Screenshot_20231214_105016.png
You do not have the required permissions to view the files attached to this post.
medmed
Atari Super Hero
Atari Super Hero
Posts: 717
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: SDL Game Freecraft

Post by medmed »

ThorstenOtto wrote: Thu Dec 14, 2023 6:04 am A few more notes:

- You need to enable -DUSE_LIBMODPLUG to be able to play music
- there are problems again with upper-/lowercase filenames from the data archive (e.g Graphics vs graphics). Also some filenames seems to be truncated there. I've made a fixed archive on https://tho-otto.de/download/sdl/freecraft-data.tar.xz (but maybe you want to have a look again). It also seems to be strange that a lot of content is duplicate, eg graphics and data/graphics.

It should also be noted that this game seems to be discontinued because of copyright problems. There is a successor to this on https://github.com/Wargus/stratagus, unfortunately that requires SDL2.
Ah, Thanks Thorsten.
I'll grab the archive.
Yes it seems that people replaced this archive contents with those of the original CD.
The SDL1 successor source code can be found on sourceforge but it needs lua5.0
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
medmed
Atari Super Hero
Atari Super Hero
Posts: 717
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: SDL Game Freecraft

Post by medmed »

ThorstenOtto wrote: Thu Dec 14, 2023 9:41 am @vido: you can try the data archive linked above. It can also be used for medmed version. It must be directly extracted to the directory where the game is installed (there is no path prepended).

You can also try the version that i've build : https://tho-otto.de/download/sdl/freecr ... bin.tar.xz (also contains the data already installed)

As for the save games: it should work, but there are (atleast) two bugs. The game uses $HOME/.freecraft/save as directory, but does not check whether $HOME is set at all. And there is some rendering problem in the "fileselector":
Screenshot_20231214_103514.png

Also, the shortcuts for this (F11 + F12) are not available on Atari, and should be changed.

Edit: fileselector looks ok when invoked from the main menu:
Screenshot_20231214_105016.png
There're filenames with coma (bloodlust,haste,slow,invisible,shield.png) and many spaces. Could it be the reason why it's broken?
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3087
Joined: Sun Aug 03, 2014 5:54 pm

Re: SDL Game Freecraft

Post by ThorstenOtto »

A few of the filenames in the original archive were truncated (.png.g instead of .png.gz for example), maybe because amiga has a limit on filename length? Theoretically, someone has to check the actual names, and how they are referenced. But that's a tedious task.
Post Reply

Return to “Games - General”