Coder Social home page Coder Social logo

openfodder / openfodder Goto Github PK

View Code? Open in Web Editor NEW
442.0 36.0 41.0 6.64 MB

Open Fodder: An open source port of Cannon Fodder

Home Page: http://openfodder.com

License: GNU General Public License v3.0

C++ 98.43% Makefile 0.01% NSIS 0.09% C 1.23% Batchfile 0.02% CMake 0.23%
cannon-fodder game dos amiga

openfodder's Introduction

Open Fodder

Build Status Build status

Come for a chat over at our Discord

image

About

Cannon Fodder is an action-strategy shoot 'em up game developed by Sensible Software and published by Virgin Interactive.

The game is military-themed and based on shooting action but with a strategy game-style control system. The player directs troops through numerous missions, battling enemy infantry, vehicles and installations.

Open Fodder is an open source version of the Cannon Fodder engine, for modern operating systems.

Play now

You can play the demos in your browser here.

Map Editor

See OpenFodder Editor for the campaign and map editor.

Scripting

Open Fodder includes a Javascript interpreter for the purposes of creating randomized maps, a number of scripts are provided which implement various functionality, such as placing of random hostages, rescue tents, and a helicopter if required to rescue to hostages.

Customisations and additions can be made to any of the scripts

Media

Open Fodder 1.5 Video
Open Fodder 1.4 Video
Open Fodder 1.3 Video - Amiga Format Special
Open Fodder 0.8 Video

Open Fodder Smoke Testing

Installation

Please see INSTALL.md

For the most recent Windows build, you may obtain the executable built during testing from Here

How to play

Open Fodder supports six demos from the Amiga platform, and three retail releases (See below for supported versions).

Command Line Parameters
  OpenFodder [OPTION...]

      --about                   About
  -h, --help                    Help
      --pc                      Default to PC platform data
      --amiga                   Default to Amiga platform data
      --engine cf1              Default to engine (single map/random)
                                (default: cf1)
      --columns 22              Number of camera columns (default: 22)
      --rows 16                 Number of camera rows (default: 16)
  -w, --window                  Start in window mode
      --window-scale arg        Set the window scale (default: 0)
      --integer-scaling         Set integer scaling (default: true)
      --cheats                  Enable cheat keys

      --max-sprite 45           Set the maximum sprites (default: 45)
      --max-spawn 10            Set the maximum spawn (default: 10)
      --sleep-delta 2           Set the engine speed (default: 2)
      --demo-record "Demo File"
                                Record Demo (default: )
      --demo-record-all         Record Demo
      --demo-play "Demo File"   Play Demo (default: )
      --unit-test               Run Tests
      --unit-test-headless      Run Tests, with no output

      --nosound                 Disable sound output
      --playground              Sprite playground
	  
      --skipintro               Skip all game intros
      --skipbriefing            Skip mission briefing
      --skipservice             Skip mission debriefing
      --skiphill                Skip the hill

      --list-campaigns          List available campaigns
  -c, --campaign "name"         Starting campaign (default: )
  -m, --mission 1               Starting mission (default: 0)
  -p, --phase 2                 Starting phase (default: 0)

      --single-map "MyMap"      Play a single map (default: )
  -r, --random                  Generate and play a random map
      --random-save "MyMap"     Generate and save a random map (default: )
      --script "script.js"      Name of script to execute (default: )				  
Hot Keys
* F1:    Switch to Amiga version (if available)
* F2:    Switch to PC version (if available)
* F9:    Make current squad invincible (with --cheats enabled)
* F10:   Complete current map (with --cheats enabled)
* F11:   Toggle full screen
* F12:   Lock cursor to window
* +:     Increase window size
* -:     Decrease window size  

* ESC:   Back menu/abort phase
* M:     Show map (Retail releases only)
* P:     Pause game
* 1:     Select squad 1
* 2:     Select squad 2
* 3:     Select squad 3
* Space: Switch weapon

Purchasing the retail release

Cannon Fodder can be purchased from Good Old Games, directly at Cannon Fodder and Cannon Fodder 2

Supported Versions

Cannon Fodder
  • Amiga
  • Amiga CD32
  • Dos CD
Cannon Fodder 2
  • Amiga
  • Dos CD
Demos

Six Amiga magazine coverdisk demos and one PC demo are included in the data pack.

  • Amiga The One Issue #68: (Jun 1993)
  • Amiga Power Issue #31: (Nov 1993) Cannon Fodder Plus
  • Amiga Action Issue #51: (Dec 1993)
  • Amiga Format Issue #54: (Dec 1993) Christmas Special (Cannon Soccer)
  • Amiga Power Issue #45: (Jan 1995) Alien Levels
  • Amiga Format Issue #68: (Feb 1995) Not Very Festive Fodder
  • PC Format CD-ROM #1: (May 1994)

Thanks To

Sensible Software, for the original game
Alessandro Petralia, for his valuable testing
ScummVM, for the Amiga sound routines

License

FOSSA Status

openfodder's People

Contributors

aidanrichmond avatar apetralia avatar drnovice avatar fossabot avatar mailaender avatar segrax avatar tremby avatar vanfanel avatar winterheart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openfodder's Issues

Is there any way to debug the executable in runtime?

Is there any way to debug the C++ code, or the executable file in Linux to see when what's happening?
I'd like to see in which files are being read, written so on?
In eg. Python it is possible to go line by line during runtime.

[windows] Get data from program directory

It would be great if OpenFodder could get its data from the directory it's in on Windows.

Currently, if i try to put the Campains/, Data/ and Save/ directories in the same path where OpenFodder.exe is, the program starts, but it only shows custom campaigns and then even cannot starts one of those custom levels (direct death).

The Windows setup i am using on this is XP based. But as the program runs up to the menu (with full action there), i don't think XP would be the cause of this.

Thanks in advance, and for all your work on this. 👍

"SDLAudioP2" received signal SIGSEGV, Segmentation fault.

Describe the bug
I appear to have triggered some sound related crashes. Plus a crash on exit.

To Reproduce
I believe it's triggered by the launching of some of the bonus amiga levels - which don't appear to feature any music - then hitting ESC to go back to the main menu.
Do it enough times and it sometimes bombs the game or stops the music from playing.
If I click on the about screen or the cannon fodder 1/2 campaigns I don't seem to trigger it.

Expected behavior
You'd expect the main menu music to reset from the beginning when closing any of the campaigns/levels but you end up with silence. After it starts doing this you still don't get any music if you launch the cannon fodder 1 or 2 campaign.

Desktop (please complete the following information):

  • OS: Debian Linux
  • Version: Testing (Buster)

Additional context
I compiled a debug version of the game by changing the makefile:
CC = clang++ $(CXXFLAGS) -c -g -O0 -Wall -std=c++14 -ferror-limit=100 $(pathInc) $(Libs)

I've attached some logs with backtraces by using gdb OpenFodder:
openfodder1.log
openfodder2.log
openfodder_crash_on_exit.log

Hopefully those help. OpenFodder otherwise appears to be reliable and faithful to the original games. You can even shrink or increase the window size with the plus and minus keys - found that by accident!

Cheats

Would it be easy to add e.g. god mode just for fun?

Need help compiling and running game

I was surprised to find an Open project on Cannon Fodder, and more surprised still to see it past 1.0! Congratulations.

I can't seem to find any instructions (or discussion) about this game or how to compile it. When I run the .exe in VS2017, I get The program '[12304] OpenFodder.exe' has exited with code 1 (0x1)..

Here is the whole output, if that helps.

'OpenFodder.exe' (Win32): Loaded 'C:\Users\jason.gilbert\Downloads\openfodder-1.4.0\openfodder-1.4.0\Run\OpenFodder.exe'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Users\jason.gilbert\Downloads\openfodder-1.4.0\openfodder-1.4.0\Run\SDL2_mixer.dll'. Module was built without symbols.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Users\jason.gilbert\Downloads\openfodder-1.4.0\openfodder-1.4.0\Run\SDL2.dll'. Module was built without symbols.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\winmmbase.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. Symbols loaded.
'OpenFodder.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Symbols loaded.
The thread 0x20 has exited with code 1 (0x1).
The thread 0x3918 has exited with code 1 (0x1).
The thread 0x39a4 has exited with code 1 (0x1).
The program '[12304] OpenFodder.exe' has exited with code 1 (0x1).

I don't have much experience, so any help would be appreciated!

Compilation on linux + a couple of questions

Hello there,

First and foremost, thank you very much for creating this project! Cannon Fodder was one of my favorites back in the Amiga days, and probably one of the games I sunk the most time in during my youth, along with two other classics, Sensible Soccer and Chaos Engine. It's great to have it available again under a free software engine, along with a map editor!

I've been previously running OpenFodder on Windows, but I would like to know if it would be possible for you to provide compilation instructions for Linux. Currently there is no documentation specifying the required libraries and additional instructions for compilation, and I think it would be nice if these could be included in the readme or a separate file.

Secondly I would know if a universal Linux Snap/AppImage package could be provided for future stable builds.

Thirdly, and as a more impertinent request, since you've done such a great work with Cannon Fodder, any chance you can eventually give a similar treatment to Sensible World of Soccer? There's still a huge community playing the game online, mostly using shaky emulators with poor multiplayer capability, and an free software port for it would certainly be more than welcome!

That's it for today. Please continue the amazing work and a have a nice day!

to release 1.0

Both x86 and x64 built:
By CF1 stuff, Amiga version:

  1. Missing Animation into Briefing Screen (helicopter landing)
  2. Heroes and Squad writings into Hill Screen are like dos appearence instead original amiga appearence.
  3. Soldiers animation into Hill Screen goes wrong (first soldiers don't get down from the footpath)
  4. On Save Screen, the prompt cursor is corrupted (it shows another part of sprite sheets, seems some people sprites)
  5. On Load Screen the writings don't have square red/green borders

By CF2 stuff, DOS version:

  1. No sound (maybe a wrong my configuration?)
  2. "Try Again" animation has half ufo sprite on the right of the writing
  3. Briefing Screen on first missions (middle-east) don't have to have the ufo landing
  4. Is there a somersaulted car on extreme right of level 1 (Map1)?!?

Compilation on Raspberry Pi requires -fsigned-char

When compiling latest OpenFodder on a Raspberry Pi 2, I received a ton of errors regarding a "constant expression evaluates to 255 which cannot be narrowed to type 'int8' (aka 'signed char) [-Wc++11-narrowing].

I had to add -fsigned-char into the CC = line in the Makefile to get it to compile properly.

Reduce requirement of Cannon Fodder 2 files

From Issue #32 from andrew-mcmahon

"I couldn't see any terminal output listing missing files when I ran the game so I was wondering why Cannon Fodder 2 wasn't showing up (I only copied CF_ENG.DAT to Dos2_CD)"

We should reduce the requirement from all files down to just CF_ENF.DAT, as it can use the Amiga music instead of the PC files, making all the PC files not necessarily required.

Cannon Fodder: German DOS floppy version support

I recently got my hands on the German DOS version of Cannon Fodder and noticed that it is not supported by OpenFodder.

The first floppy disk contains CF_GER.DAT, so I tried to rename that to CF_ENG.DAT and put it into a Data/Dos_CD subdirectory for a quick test. I also changed the MD5 hash in https://github.com/OpenFodder/openfodder/blob/master/Source/Versions_Files.hpp#L31. The game unfortunately didn't start, the output can be seen below.

Disk contents:
Disk 1: http://medienarchiv.digitalimagecorp.de/Disketten/Spiele%20-%20PC/CannonFodder.1.img.html
Disk 2: http://medienarchiv.digitalimagecorp.de/Disketten/Spiele%20-%20PC/CannonFodder.2.img.html
Disk 3: http://medienarchiv.digitalimagecorp.de/Disketten/Spiele%20-%20PC/CannonFodder.3.img.html

Output:

 Failed to execute
File pstuff.dat Not Found in DAT
Total files inside DAT: 293
int26.voc

mor28.voc

mor26.voc

ice31.voc

ice30.voc

ice26.voc

des26.voc

jun28.voc

jun27.voc

jun26.voc

all59.voc

all58.voc

all57.voc

all56.voc

all54.voc

all53.voc

all52.voc

all51.voc

all46.voc

all22.voc

all21.voc

all20.voc

all19.voc

all18.voc

all17.voc

all16.voc

all15.voc

all13.voc

all12.voc

all11.voc

all09.voc

all08.voc

all07.voc

all06.voc

all05.voc

all04.voc

all03.voc

all02.voc

morsub0.swp

morbase.swp

junsub1.swp

junsub0.swp

junbase.swp

intsub0.swp

intbase.swp

icesub0.swp

icebase.swp

dessub0.swp

desbase.swp

mapm9.spt

mapm8.spt

mapm72.spt

mapm71.spt

mapm70.spt

mapm7.spt

mapm69.spt

mapm68.spt

mapm67.spt

mapm66.spt

mapm65.spt

mapm64.spt

mapm63.spt

mapm62.spt

mapm61.spt

mapm60.spt

mapm6.spt

mapm59.spt

mapm58.spt

mapm57.spt

mapm56.spt

mapm55.spt

mapm54.spt

mapm53.spt

mapm52.spt

mapm51.spt

mapm50.spt

mapm5.spt

mapm49.spt

mapm48.spt

mapm47.spt

mapm46.spt

mapm45.spt

mapm44.spt

mapm43.spt

mapm42.spt

mapm41.spt

mapm40.spt

mapm4.spt

mapm39.spt

mapm38.spt

mapm37.spt

mapm36.spt

mapm35.spt

mapm34.spt

mapm33.spt

mapm32.spt

mapm31.spt

mapm30.spt

mapm3.spt

mapm29.spt

mapm28.spt

mapm27.spt

mapm26.spt

mapm25.spt

mapm24.spt

mapm23.spt

mapm22.spt

mapm21.spt

mapm20.spt

mapm2.spt

mapm19.spt

mapm18.spt

mapm17.spt

mapm16.spt

mapm15.spt

mapm14.spt

mapm13.spt

mapm12.spt

mapm11.spt

mapm10.spt

mapm1.spt

fodmus.adl

fodtitle.adl

fodmus.rol

fodtitle.rol

blank.sb

warvox.sb

null.mid

rjnull.bin

player.bin

mapm9.map

mapm8.map

mapm72.map

mapm71.map

mapm70.map

mapm7.map

mapm69.map

mapm68.map

mapm67.map

mapm66.map

mapm65.map

mapm64.map

mapm63.map

mapm62.map

mapm61.map

mapm60.map

mapm6.map

mapm59.map

mapm58.map

mapm57.map

mapm56.map

mapm55.map

mapm54.map

mapm53.map

mapm52.map

mapm51.map

mapm50.map

mapm5.map

mapm49.map

mapm48.map

mapm47.map

mapm46.map

mapm45.map

mapm44.map

mapm43.map

mapm42.map

mapm41.map

mapm40.map

mapm4.map

mapm39.map

mapm38.map

mapm37.map

mapm36.map

mapm35.map

mapm34.map

mapm33.map

mapm32.map

mapm31.map

mapm30.map

mapm3.map

mapm29.map

mapm28.map

mapm27.map

mapm26.map

mapm25.map

mapm24.map

mapm23.map

mapm22.map

mapm21.map

mapm20.map

mapm2.map

mapm19.map

mapm18.map

mapm17.map

mapm16.map

mapm15.map

mapm14.map

mapm13.map

mapm12.map

mapm11.map

mapm10.map

mapm1.map

morsub0.hit

morbase.hit

junsub1.hit

junsub0.hit

junbase.hit

intsub0.hit

intbase.hit

icesub0.hit

icebase.hit

dessub0.hit

desbase.hit

won.dat

virgpres.dat

sensprod.dat

rankfger.dat

fpstuff.dat

paraheli.dat

morphbig.dat

morp5.dat

morp4.dat

morp3.dat

morp2.dat

morp1.dat

morcger.dat

morarmy.dat

junp5.dat

junp4.dat

junp3.dat

junp2.dat

junp1.dat

juncger.dat

junarmy.dat

intp5.dat

intp4.dat

intp3.dat

intp2.dat

intp1.dat

intcger.dat

intarmy.dat

icep5.dat

icep4.dat

icep3.dat

icep2.dat

icep1.dat

icecger.dat

icearmy.dat

hillbits.dat

hill.dat

font.dat

desp5.dat

desp4.dat

desp3.dat

desp2.dat

desp1.dat

descger.dat

desarmy.dat

cftitle.dat

8.dat

7.dat

6.dat

5.dat

4.dat

3.dat

2.dat

1.dat

morsub0.blk

morbase.blk

junsub1.blk

junsub0.blk

junbase.blk

intsub0.blk

intbase.blk

icesub0.blk

icebase.blk

dessub0.blk

desbase.blk

null.drv

roland.drv

bepper.drv

adlib.drv

morsub0.bht

morbase.bht

junsub1.bht

junsub0.bht

junbase.bht

intsub0.bht

intbase.bht

icesub0.bht

icebase.bht

dessub0.bht

desbase.bht

1.5.3 segfault on OpenBSD

Describe the bug
OpenFodder 1.5.3 segfaults after clicking on Cannon Fodder from the main menu. GDB backtrace attached.
Additionally (though perhaps unrelated) Cannon Fodder 2 does not appear in the list despite having CF_ENG.DAT from CF2 in $HOME/.local/OpenFodder/Data/Dos2_CD

To Reproduce
Steps to reproduce the behavior:

  1. Build OpenFodder 1.5.3
  2. Launch it
  3. Click on Cannon Fodder on main menu

Expected behavior
Game loads.

Desktop (please complete the following information):

  • OS: OpenBSD
  • Version 6.4-current

openfodder.log

Libretro support?

Thank you very much for bringing back such a beautiful game for us!

Switching from JSON/INI to YAML as format for configuration/customization

Currently openfodder uses JSON for describing campaigns/mission and INI for configuration. I propose to switch to YAML as more human-friendly format.

Here example of campaign in YAML format:

---
Author: Sensible Software
Name: Cannon Fodder
Missions:
  - Name: THE SENSIBLE INITIATION
    Phases:
      - Aggression:
          - 0
          - 0
        MapName: mapm1
        Name: IT'S A JUNGLE OUT THERE
        Objectives:
          - KILL ALL ENEMY

Library for parsing: https://github.com/jbeder/yaml-cpp

Generating "Random Game" Level -> Another Window Opens -> Crashes To Desktop

I have a Windows 10 machine with (only) the GOG version of the 1st Cannon Fodder game installed. Running this in OpenFodder works.

Whenever (1) I click on OpenFodder's menu option to play a random game (not just a random level), (2) text appears to indicate all? steps of generating the 1st level of this game have been processed, then (3) an extra small window appears (it appears to be blank with a black background, but it only appears briefly); (4) this new window closes; & (5) OpenFodder crashes to desktop.

Custom Soldiers Names

This is more of a question than a suggestion for feature, but you can take as such if you will: Is it possible to make a custom soldier names mod that perhaps from an ASCII text file with one name per linebreak?

To contribute some more, in the SNES version it's straight-up stored in text format, 6-characters long, A-Z (all caps), doesn't support numbers nor symbols, low caps results in a different text color (highlighted) with an "offset" to which character correspond to what ("o" becomes golden "K"), needs a space to fill the blank.

So a name like COOKS is perfectly fine, but Coffee, Max!me, BL0RB1, PIZZA are not

Helicopter intro not scrolling smoothly

Hi!

I am at last using my own built GNU/Linux version of OpenFodder. Its built against latest SDL 2.0.10, etc and works fine.

However, I have observed that the helicopter intro sequence is not smooth as in Amiga and RiscOS (RiscOS version runs natively on the Pi, BTW!).
The game originally synced video during this sequence to vsync, so it was ~50FPS, while OpenFodder seems to be doing about half-the-framerate, which in a modern display would be ~30FPS.
I am sure the solution would be to allow OpenFodder to render this sequence "as fast as possible", so SDL2 blocks on the rendering function: SDL_RenderPresent() is synchronous so it blocks if VSYNC is ON until VSYNC arrives.
DO NOT rely on SDL_Delay() for video speed control, because it will generate micro-stuttering in this smooth scrolling sequence: let the game sync to vsync, so video will be smooth no matter what exact physical display rate is.

How to create Track2.flv

The readme says "Extract Track2 from the CD and name it 'Track2.flv', placed in the Amiga_CD folder."

I wonder how to actually do this. What kind of file format is "flv" and how to create it? Could you please also provide a checksum of the resulting file?

Automatic script updates

Scripts are dynamic in a sense, we should have a mechanism which at least checks if the scripts are up to date, and possibly downloads them if not.

PC Helicopter Intro broken with custom camera tile count

Describe the bug
The helicopter introduction screen is broken on PC data if you use --columns or --rows parameters

Expected behavior
Helicopter background renders correctly

Additional context
cGraphics_PC::Mission_Intro_Render_2
cGraphics_PC::sub_15B98

Both these functions are hardcoded for a screen surface of 320x200

Saves aren't working

I just played through 10 missions of Cannon Fodder 1, saving after every mission, and when I went to load there were no saves. Sure enough the C:\Users\Dan\Documents\OpenFodder\Saves folder is empty. :(

Crashes on FreeBSD if XDG_DATA_DIRS or HOME are not defined

Looks like addDefaultDirs() tries to assign NULL to std::string variable.

$ git describe --tags --always
1.5.3-228-g7a81d0d

$ clang++ --version
FreeBSD clang version 9.0.0 (tags/RELEASE_900/final 372316) (based on LLVM 9.0.0)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

$ OpenFodder --unit-test-headless

Program received signal SIGSEGV, Segmentation fault.
strlen (str=0x0) at /usr/src/lib/libc/string/strlen.c:101
101             va = (*lp - mask01);
(gdb) bt full
#0  strlen (str=0x0) at /usr/src/lib/libc/string/strlen.c:101
        lp = 0x0
        va = <optimized out>
        vb = <optimized out>
        p = <optimized out>
#1  0x00000008008a7775 in std::__1::char_traits<char>::length (__s=0x0)
    at /usr/src/contrib/libc++/include/__string:217
No locals.
#2  std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::assign (
    this=0x7fffffffe728, __s=0x0) at /usr/src/contrib/libc++/include/string:2395
No locals.
#3  0x00000000002e076d in std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator= (this=0x7fffffffe728, __s=0x0) at /usr/include/c++/v1/string:896
No locals.
#4  0x00000000003f6706 in cResourceMan::addDefaultDirs (this=0x8019e6418) at Source/ResourceMan.cpp:69
        path = ""
#5  0x00000000003f65eb in cResourceMan::cResourceMan (this=0x8019e6418) at Source/ResourceMan.cpp:38
No locals.
#6  0x00000000004403d5 in std::__1::__compressed_pair_elem<cResourceMan, 1, false>::__compressed_pair_elem (
    this=0x8019e6418) at /usr/include/c++/v1/memory:2139
No locals.
ed_pair<std::__1::allocator<cResourceMan>, true> (this=0x8019e6418, __t=...) at /usr/include/c++/v1/memory:2240
No locals.
#8  0x000000000043ff73 in std::__1::__shared_ptr_emplace<cResourceMan, std::__1::allocator<cResourceMan> >::__shared_ptr_emplace (this=0x8019e6400, __a=...) at /usr/include/c++/v1/memory:3538
No locals.
#9  0x000000000043fd15 in std::__1::shared_ptr<cResourceMan>::make_shared<>() ()
    at /usr/include/c++/v1/memory:4202
        __a2 = {<No data fields>}
Python Exception <class 'RuntimeError'> Type does not have a target.:
        __hold2 =
        __r = {__ptr_ = 0x8004f804d <_rtld_bind_start+45>, __cntrl_ = 0x4f20a0}
#10 0x000000000043e5ab in std::__1::make_shared<cResourceMan> () at /usr/include/c++/v1/memory:4581
No locals.
#11 0x000000000043df18 in start (argc=2, argv=0x7fffffffebf0) at Source/Start.cpp:31
        Params = {__ptr_ = 0x0, __cntrl_ = 0x7fffffffebf0}
#12 0x00000000004f0062 in main (argc=2, argv=0x7fffffffebf0) at Source/stdafx.cpp:35
        result = 0
(gdb) frame 4
#4  0x00000000003f6706 in cResourceMan::addDefaultDirs (this=0x8019e6418) at Source/ResourceMan.cpp:69
69              path = std::getenv("XDG_DATA_DIRS");
(gdb) list 55
54      void cResourceMan::addDefaultDirs() {
55              std::string path;

Portable variant of OpenFodder

Basically a version that doesn't need to need to be installed, just copied into a folder somewhere (or into a USB Stick) and run from there. Also with a configuration tool for setting up paths.

How to play normal 1 player game? (Original Amiga CF1 campaign)

Hi there!

I have just built latest GIT version of OpenFodder, but I dont seem to be able to play the original Amiga campaign (intro, then hill, then first level, etc...)
All I can see upon running the executable is a menu where I can select a level!
My original AMIGA data lives in ~/openfodder/Data/Amiga, as per instructions.

Thanks!

Some segfaults on OpenBSD (backtraces included)

Hello --

I would like to make a package of OpenFodder for OpenBSD. While the game compiles fine, it crashes while playing. There are two backtraces here, and I will explain both.

  1. The openfodder-opening.txt backtrace is what happens if you let the opening cinematics play. After a second or two, the game crashes. If, however, you click to cancel the cinematic before the crash occurs, the game will successfully launch.

  2. The openfodder-level2.txt backtrace is what happens once level 2 loads. Level 1 plays perfectly.

For completeness, I am using the GOG.com version of Cannon Fodder.

Let me know if you need anything more.
openfodder-level2.txt
openfodder-opening.txt

Prevent friendly teammates from using rockets/grenades when left alone

Remember that fun time when you left your teammates with a stash of 6 grenades + 4 rockets which you needed to win the mission - but they decide to fire them all at something relatively harmless and/or blow themselves up in the process?

I wouldn't mind seeing this as a option that could be toggled on or off.
Granted it was part of the charm of the game - perhaps it's heresy to even suggest the change - but it could get a little bit annoying at times.
A slightly iffy workaround was to load all/most of the munitions onto a single man but then you were stuffed if he took a rocket to the face.

openfodder fails to compile under Gentoo Linux

Installed requiered libs and i know 1.30 and 1.3.1 built correctly.
When compiling 1.5.3 i get:

git log -n 1 --pretty="const char* gitversion="%%h";" > ./Source/gitver.hpp
fatal: not a git repository (or any parent up to mount point /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
make: *** [Makefile:16: main] Error 128

SVGA mode?

Was just wondering if it would be possible to increase the rendering resolution to 640x480, and just show more of the map?

Amiga Cannon Fodder files not recognized

Hello!

When I have copied data from Amiga Cannon Fodder disk and run Open Fodder compiled
under Linux Manjaro, I have got these errors when program tries do load files:

Cannon Fodder 2: MAPM71.SPT Unknown MD5: C88DAA9B9985FF5D74CB11B44C438504

Please help

Just making sure... no sound from DOS (GOG version)

Just making sure I'm not crazy. Reading over the code, it seems like there's no mechanism for finding and playing the music from the DOS version of the game (I'm using the GOG version).

It's OK if no. The OpenBSD package can just tell the user to go find their own music assets and put them in the right place. I'm double checking to make sure I didn't miss anything.

License?

Would like to see some package in Fedora (or any other Linux distribution). Therefore, this source needs a valid FLOSS license. We recommend to use GPLv3.

Maximize window

Is your feature request related to a problem? Please describe.
I can't maximize the window using the maximize button

Describe the solution you'd like
Make it possible to maximize the window

Build on Raspberry Pi

Hello, im tryinf to buid this on raspberry pi in raspbian but i get warning en errors and the compilation fails in the end with 16 errors

is there instructions to compile it? i cannot seem to find any

thank you

Cannon Fodder 2 detection

Hi!

I am unable to get CF2 to get detected, i have tried to put all data in the Dos2_CD directory and only CF_ENG.DAT. No difference.
Is there different versions of CF2?

Some things from the Game Boy Color that could be considered for (optional) enhancement.

I've been playing the GBC version and noticed a few things from the get-go that could be interesting to implement:

  1. It's constantly in a 2-men cell mode. This has two pros and con: it's easier to manage, minimizes losses, doesn't have units limit (as long as there is recruits at the base, you can keep throwing them at'em), BUT you can't split the team.
  2. Building capacity limit. In the GBC the buildings can't be destroyed really, you can throw a grenade to force everyone inside to come out, but it's two or three men that are in, meaning the building destruction is optional.
  3. Because you can't see the whole map, the pause screen has a "Scan Radar" that shows blips of enemies that are within a wide area (presumably within 256 pixels from the player?). As a feature the scan radar could appear in a corner and not needing to pause to check, also diminishing the need of map checks.
  4. When grenades are "required", there's a crate conveniently placed near the drop point (except in Mission 2 Phase 2 for unknown reasons). Perhaps this idea could be taken into account for a "map patch" that can be optionally applied before starting a campaign (or, alternatively, just have a "start with grenades" option)

Build is not working on Manjaro Linux

Describe the bug
Build is not working on Manjaro Linux. Not even the AUR package.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...' Source folder
  2. Click on '....' make
  3. Scroll down to '....' to the log
  4. See error

[ 54%] Building CXX object CMakeFiles/openfodder.dir/Source/Parameters.cpp.o
In file included from /mnt/HDD100/Letoltesek/openfodder/Source/Parameters.cpp:25:
/mnt/HDD100/Letoltesek/openfodder/Source/Utils/cxxopts.hpp: In member function ‘void cxxopts::values::detail::SignedCheck<T, true>::operator()(bool, U, const string&)’:
/mnt/HDD100/Letoltesek/openfodder/Source/Utils/cxxopts.hpp:479:42: error: ‘numeric_limits’ is not a member of ‘std’
479 | if (u > static_cast(-std::numeric_limits::min()))
| ^~~~~~~~~~~~~~
/mnt/HDD100/Letoltesek/openfodder/Source/Utils/cxxopts.hpp:479:58: error: expected primary-expression before ‘>’ token
479 | if (u > static_cast(-std::numeric_limits::min()))
| ^
/mnt/HDD100/Letoltesek/openfodder/Source/Utils/cxxopts.hpp:479:61: error: ‘::min’ has not been declared; did you mean ‘std::min’?
479 | if (u > static_cast(-std::numeric_limits::min()))
| ^~~
| std::min

Expected behavior
Exe file should be created.

Screenshots
image

Desktop (please complete the following information):

  • OS: [e.g. Windows] Manjaro Linux

Final phase of final mission (CF1) crashes

OpenFodder crashes at the beginning of the final phase of the final mission (Deathtasticelastic). The screen fades in, scrolls to the right, then crashes.

I've reloaded my latest save, F10 ended phase my way to the last phase twice, and every time it crashes.

This also happens if I skip straight to it with the -m 24 -p 6 parameters.

Does this engine require any custom royalty-free assets? Because I could make them...

Is your feature request related to a problem? Please describe.
This game/engine already uses the copyrighted assets from the original. Even without owning the original games.
Despite the demos being free, they ain't exactly in that "white" zone of legal usage.

Describe the solution you'd like
I want to volunteer to make royalty-free assets of all of the copyrighted material currently used in the engine, in order to remove any possibilities of Codemasters filing a suit for infringement.

Maybe even a few custom MIDIs, and some royalty-free (good) sound effects.

Describe alternatives you've considered
Just to make a new logo for this engine/game.
Or maybe a custom mission/map pack that comes with the engine/game. All of which are completely original, and free.

For the logo, I've considered a new Poppy, or some weapon, or something.

Additional context
What I'm aiming for here is the exact same thing FreeDoom achieved.
https://freedoom.github.io/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.