Ostrich Riders Ride Again

Ostrich Riders Ride Again

Postby dulsi » 18 Feb 2016, 17:08

Ostrich Riders

Enemy knights are invading the kingdom. As one of the elite ostrich riders, it is your duty to defend the kingdom. With lance in hand you fly off. Remember to stay above your opponent least you fall to his lance. Collect the eggs least your opponent hatches stronger than before. Work togther with other knights.

Ostrich Riders is a free clone of the arcade game "Joust". Originally developed by Seby with graphics by Suiland. They abandonned the project in 2009. This is a new continuation of the project.

Screenshot
Image

0.6.2 release updates the project to the latest SFML. It also adds a third player.

Future development may include some kind of boss monster. (But joust doesn't have a "boss monster". True but my oldest wants a big villain to fight. Right now I'm thinking of a snake with multiple sections you can destroy.)
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Ostrich Riders Ride Again

Postby Imerion » 21 Feb 2016, 14:30

Cool! I'd say add the boss, sounds like a fun addition! Btw, does this have support for gamepads?
Try my games! : My Games - Read my FOSS Games Blog! : Free Game News
Imerion
 
Posts: 100
Joined: 09 Apr 2011, 19:37

Re: Ostrich Riders Ride Again

Postby dulsi » 22 Feb 2016, 03:40

It will. In the release it almost has gamepad support for multiple players. It supports one and supports left and right for the others but not the flap button. That has been fixed and will be in the next release.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Ostrich Riders Ride Again

Postby dulsi » 25 Feb 2016, 04:24

I decided to do an Open Game Source article on Ostrich Riders. It describes what was needed to update the code, how a third player was added and what changes were needed to package the game for Fedora.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Ostrich Riders Ride Again

Postby c_xong » 25 Feb 2016, 05:46

Nice post! I really appreciate your efforts in reviving an open source game like this one :cool:

I can relate to your experience with SFML; many of their decisions struck me as being out of touch with their users. SDL is much better in this regard; migrating from 1.2 to 2 isn't trivial but it's really easy and you just have to follow the migration guide, which covers everything. I've done so on 2 or 3 games now; it takes me <1 hour total.

I've also found that adding extra players to a game is all about UI changes :x When I was adding 3/4 players for C-Dogs SDL, it was all about the HUD positions, menus, score screens, camera and split screen code... and recently I've had to revisit all this because I've been adding networked multiplayer! :lol:

For future improvements, there are two more options to consider: copying parts of Balloon Fight, or Smash Brothers. Maybe you know this already, but these games were both made by HAL, and Balloon Fight was clearly inspired by Joust, and was programmed by Satoru Iwata, who also ported Joust to NES earlier. So really, all these games are descendants of Joust.

Balloon Fight's way of spawning enemies solves one of the problems you mentioned, of too many players being able to camp the spawn positions for enemies. Each level in that game simply had all enemies spawned already, on the platforms above the players, so there's nothing to camp.

Smash Brothers is obviously wildly popular, and can be implemented by adding some fighting moves to the players. You may get a lot of attention if you can add this to Ostrich Riders! :)
User avatar
c_xong
 
Posts: 234
Joined: 06 Sep 2013, 04:33

Re: Ostrich Riders Ride Again

Postby themightyglider » 28 Feb 2016, 17:35

I had some trouble to build your game from source on Ubuntu 14.4 32Bit and 64Bit as well.

I tried:

sudo apt install libsfml-dev
git clone https://github.com/dulsi/ostrichriders
cd ostrichriders
make -f OstrichRiders.cbp.mak


And here is the error I get:

src/sfmlGame/MediaManagers/SoundManager.cpp: In member function ‘void SoundManager::addSound(const char*)’:
src/sfmlGame/MediaManagers/SoundManager.cpp:44:46: error: ‘printf’ was not declared in this scope
printf("Loading sound: %s...\n", fileName);


What am I doing wrong?
User avatar
themightyglider
 
Posts: 126
Joined: 23 Feb 2016, 12:13

Re: Ostrich Riders Ride Again

Postby smcameron » 28 Feb 2016, 20:35

themightyglider {l Wrote}:I had some trouble to build your game from source on Ubuntu 14.4 32Bit and 64Bit as well.

I tried:

sudo apt install libsfml-dev
git clone https://github.com/dulsi/ostrichriders
cd ostrichriders
make -f OstrichRiders.cbp.mak


And here is the error I get:

src/sfmlGame/MediaManagers/SoundManager.cpp: In member function ‘void SoundManager::addSound(const char*)’:
src/sfmlGame/MediaManagers/SoundManager.cpp:44:46: error: ‘printf’ was not declared in this scope
printf("Loading sound: %s...\n", fileName);


What am I doing wrong?


I got past that by adding '#include <stdio.h>' to the files which complained about that (there's one other one you'll hit when you fix the first one).

That is probably not the "right" way to fix that, it may be that those printf's are debug code that got left in by mistake, I don't know.

But, then, I ran into tons of undefined references...

{l Code}: {l Select All Code}
obj/Debug/src/sfmlGame/Entity/MenuEntity.o: In function `MenuEntity::MenuEntity(sf::Font const*, int, Menu*, float, float, float)':
/home/scameron/github/ostrichriders/src/sfmlGame/Entity/MenuEntity.cpp:22: undefined reference to `sf::String::String(wchar_t const*)'
/home/scameron/github/ostrichriders/src/sfmlGame/Entity/MenuEntity.cpp:22: undefined reference to `sf::Text::Text(sf::String const&, sf::Font const&, unsigned int)'
obj/Debug/src/sfmlGame/Entity/MenuEntity.o: In function `MenuEntity::render(sf::RenderWindow*)':
/home/scameron/github/ostrichriders/src/sfmlGame/Entity/MenuEntity.cpp:68: undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
/home/scameron/github/ostrichriders/src/sfmlGame/Entity/MenuEntity.cpp:68: undefined reference to `sf::Text::setColor(sf::Color const&)'
/home/scameron/github/ostrichriders/src/sfmlGame/Entity/MenuEntity.cpp:70: undefined reference to `sf::String::String(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)'
/home/scameron/github/ostrichriders/src/sfmlGame/Entity/MenuEntity.cpp:70: undefined reference to `sf::Text::setString(sf::String const&)'
/home/scameron/github/ostrichriders/src/sfmlGame/Entity/MenuEntity.cpp:72: undefined reference to `sf::String::String(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)'
/home/scameron/github/ostrichriders/src/sfmlGame/Entity/MenuEntity.cpp:72: undefined reference to `sf::Text::setString(sf::String const&)'
/home/scameron/github/ostrichriders/src/sfmlGame/Entity/MenuEntity.cpp:76: undefined reference to `sf::Color::Color(unsigned char, unsigned char, unsigned char, unsigned char)'
[... many more that I omitted ...]
smcameron
 
Posts: 377
Joined: 29 Oct 2010, 23:44

Re: Ostrich Riders Ride Again

Postby dulsi » 28 Feb 2016, 22:13

Based on this blog, Ubuntu 14.4 comes with SFML 1.6. Did you install a more recent version (or is that blog post wrong)? It seems like it found a newer SFML headers to at least compile for the most part. Did it not find the sfml library during linking or is it linking against an old version?
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Ostrich Riders Ride Again

Postby smcameron » 28 Feb 2016, 23:30

I don't know about what themightyglider encountered... but I did the same steps he described. It seems to have grabbed something newer than 1.6 in my case (which is mint 17.3 -- which is based on Ubuntu 14.04).

{l Code}: {l Select All Code}
$ dpkg -l | grep sfml
ii  libsfml-audio2:amd64                        2.1+dfsg-4ubuntu2                                   amd64        Simple and Fast Multimedia Library - Audio part
ii  libsfml-dev:amd64                           2.1+dfsg-4ubuntu2                                   amd64        Simple and Fast Multimedia Library - Development Files
ii  libsfml-graphics2:amd64                     2.1+dfsg-4ubuntu2                                   amd64        Simple and Fast Multimedia Library - Graphics part
ii  libsfml-network2:amd64                      2.1+dfsg-4ubuntu2                                   amd64        Simple and Fast Multimedia Library - Network part
ii  libsfml-system2:amd64                       2.1+dfsg-4ubuntu2                                   amd64        Simple and Fast Multimedia Library - System part
ii  libsfml-window2:amd64                       2.1+dfsg-4ubuntu2                                   amd64        Simple and Fast Multimedia Library - Window part

$ cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17.3
DISTRIB_CODENAME=rosa
DISTRIB_DESCRIPTION="Linux Mint 17.3 Rosa"
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
cat: /etc/upstream-release: Is a directory
smcameron
 
Posts: 377
Joined: 29 Oct 2010, 23:44

Re: Ostrich Riders Ride Again

Postby dulsi » 01 Mar 2016, 02:56

I downloaded min 17.3 and ran it in a VM. The makefile causes it to build with:

g++ -lsfml-audio -lsfml-graphics ...

Old linkers used to require that you specify the libraries last. The version of g++ in mint 17.3 requires that. If you move all the -l commands to the end of the link line it works. However it still fails to run. You need to modify the font location in src/defaultfont.cpp you need to add truetype to the path so:

/usr/share/fonts/liberation/LiberationSans-Regular.ttf

becomes:

/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf

(Note: That it looks like you can just alter the define but that is not the case. Despite creating the define, I accidentally didn't use it and left the hard coded path below.)

I will see what I can do to make this easier in the future. I should also mention it behaves oddly in the VM. It always tries to go left. I don't know if that is due to the VM or not.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Ostrich Riders Ride Again

Postby smcameron » 01 Mar 2016, 08:24

Using your hints, I got it to build, but...

{l Code}: {l Select All Code}
$ bin/Release/OstrichRiders
Failed to load image "/usr/share/ostrichriders/media/hero0.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/hero1.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/hero2.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/mods/standard/media/tiles.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/ennemy0.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/ennemy1.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/ennemy2.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/ennemy3.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/egg16.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/gate64.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/mods/standard/media/bg.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/intro.jpg". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/blackPart.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/hud.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/select.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/life0.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/life1.png". Reason : Unable to open file
Failed to load image "/usr/share/ostrichriders/media/life2.png". Reason : Unable to open file
...
$ find . -type f -print | xargs grep usr.share
./ostrichriders.spec:mkdir -p %{buildroot}/usr/share/ostrichriders
./ostrichriders.spec:mkdir -p %{buildroot}/usr/share/icons/hicolor
./ostrichriders.spec:mkdir -p %{buildroot}/usr/share/appdata
./ostrichriders.spec:cp -R data/* %{buildroot}/usr/share/ostrichriders
./ostrichriders.spec:cp -R icons/* %{buildroot}/usr/share/icons/hicolor/
./ostrichriders.spec:cp ostrichriders.appdata.xml %{buildroot}/usr/share/appdata
./ostrichriders.spec:desktop-file-install --dir=%{buildroot}/usr/share/applications ostrichriders.desktop
Binary file ./obj/Release/src/joust/GameConstants.o matches
Binary file ./obj/Release/src/defaultfont.o matches
Binary file ./obj/Windows/src/joust/GameConstants.o matches
Binary file ./obj/Windows/src/defaultfont.o matches
Binary file ./obj/Debug/src/joust/GameConstants.o matches
Binary file ./obj/Debug/src/defaultfont.o matches
Binary file ./bin/Release/OstrichRiders matches
Binary file ./bin/Debug/OstrichRiders matches
./src/defaultfont.cpp:// #define JOUST_FONT  "/usr/share/fonts/liberation/LiberationSans-Regular.ttf"
./src/defaultfont.cpp:#define JOUST_FONT  "/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf"
./src/joust/GameConstants.cpp:#define JOUST_DATA_DIR_DEFAULT  "/usr/share/ostrichriders/"
grep: ./data/mods/random/scores: No such file or directory
grep: (copie).dat: No such file or directory
grep: ./data/mods/sandbox/scores: No such file or directory
grep: (copie).dat: No such file or directory
grep: ./data/mods/standard/scores: No such file or directory
grep: (copie).dat: No such file or directory


Hmm, paths burned into the binaries and filenames with spaces... oh well. There's probably some way to convince the packaging system to put things here or there, but I can't be bothered to try to figure it out. And that's not your fault, the packaging system designers have all just come up with sort of terrible hacks to solve a sort of terrible problem, and it always is just such a discouraging pain in the ass that I flatly refuse to even try to package up any code I write these days.
smcameron
 
Posts: 377
Joined: 29 Oct 2010, 23:44

Re: Ostrich Riders Ride Again

Postby smcameron » 01 Mar 2016, 09:04

Ok, after tamping down my frustration about the packaging situation on linux, a one line change to src/joust/GameConstants.cpp
to...

#define JOUST_DATA_DIR_DEFAULT "./data/"

and I'm in business!

You could do something like replace JOUST_DATA_DIR_DEFAULT with a function like

{l Code}: {l Select All Code}
char *joust_data_dir_default(void)
{
   static char *jdd = NULL;

   if (jdd)
      return jdd;

   jdd = getenv("JOUST_DATA_DIR_DEFAULT");
   if (!jdd)
      jdd = "/usr/share/whatever/the/default/path/was";
   return jdd;
}


then use joust_data_dir_default() wherever you previously used JOUST_DATA_DIR_DEFAULT and that would let people override it with environment variable.

Or maybe provide a command line option...

OstrichRiders --datadir blah

And maybe a man page. And the sound effects could use some work, esp. the wingsFlap.wav sounds like someone typing on an old Underwood typewriter. :) But, the original Joust sound effects by the famous Eugene Jarvis are a tough act to follow.

And there's something a little odd about the controls... as you let your ostrich fall downwards, no matter how fast you let your descent become, a single tap on the space bar brings your ostrich to a halt -- I am pretty sure the original game's controls didn't work like that.

Having given these very minor criticisms (which you should feel free to ignore if you want to), I should also say that this game is pretty cool, very nicely done.
smcameron
 
Posts: 377
Joined: 29 Oct 2010, 23:44

Re: Ostrich Riders Ride Again

Postby dulsi » 01 Mar 2016, 14:46

smcameron {l Wrote}:Or maybe provide a command line option...

OstrichRiders --datadir blah

OstrichRiders -ldata

Probably should document it. I kinda expected people would use Code::Blocks so the project file automatically runs it with that argument. I only added the makefile because I wanted to be able to package it for Fedora and couldn't otherwise. Detecting the lack of /usr/share/OstrichRiders and trying data is probably something I should add.

smcameron {l Wrote}:And maybe a man page. And the sound effects could use some work, esp. the wingsFlap.wav sounds like someone typing on an old Underwood typewriter. :) But, the original Joust sound effects by the famous Eugene Jarvis are a tough act to follow.

Any sound I create would probably be worse :)

smcameron {l Wrote}:And there's something a little odd about the controls... as you let your ostrich fall downwards, no matter how fast you let your descent become, a single tap on the space bar brings your ostrich to a halt -- I am pretty sure the original game's controls didn't work like that.

Something about that seemed off to me as well. I think you are right about it not being instantaneous like it is right now.

smcameron {l Wrote}:Having given these very minor criticisms (which you should feel free to ignore if you want to), I should also say that this game is pretty cool, very nicely done.

Credit for the game goes to the original developer. I just got it up and running again.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Ostrich Riders Ride Again

Postby Akien » 01 Mar 2016, 16:40

dulsi {l Wrote}:
smcameron {l Wrote}:Or maybe provide a command line option...

OstrichRiders --datadir blah

OstrichRiders -ldata

Probably should document it. I kinda expected people would use Code::Blocks so the project file automatically runs it with that argument. I only added the makefile because I wanted to be able to package it for Fedora and couldn't otherwise. Detecting the lack of /usr/share/OstrichRiders and trying data is probably something I should add.

I think most people will actually use the Makefile instead of loading it in an IDE that they're not necessarily familiar with.
Godot Engine project manager and maintainer.
Occasional FOSS gamedev: Lugaru, OpenDungeons, Jetpaca, Minilens.
User avatar
Akien
 
Posts: 737
Joined: 22 Feb 2014, 13:14

Re: Ostrich Riders Ride Again

Postby dulsi » 11 Mar 2016, 04:52

Akien {l Wrote}:I think most people will actually use the Makefile instead of loading it in an IDE that they're not necessarily familiar with.

Well the plan was that I wasn't going to include a Makefile so you would have needed to use the IDE.

Seeing the error of my ways, I have eliminated the Code::Blocks project file. The makefile generated from the project file has been replaced by a hand written file. The fontconfig library is used to detect the font file location. When /usr/share/ostrichriders is not detected it falls make to the local data directory. That should resolves all the complaints about compiling/running on Mint (although does require the fontconfig development package to compile). The 0.6.3 release also includes multiple joystick support.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Ostrich Riders Ride Again

Postby smcameron » 14 Mar 2016, 04:37

I noticed the Makefile works and it builds easily now. Thanks.

I looked into trying to make the controls a little better, and found the physics model in this game is a little strange, i.e. it contains code like this:
{l Code}: {l Select All Code}
    velocity.y += weight * delay;


And different things weigh different amounts, and things sometimes change weights.

Hmmm, so we sort of have the physics of Aristotle rather than that of Gallileo or Newton. :D And it's (sort of) shared by both the players and computer controlled creatures, which makes it hard to fix the controls without also impacting the "AI" controlling the creatures. So improving the controls is a slightly bigger job than I anticipated. I may still try it, but not tonight.
smcameron
 
Posts: 377
Joined: 29 Oct 2010, 23:44

Re: Ostrich Riders Ride Again

Postby dulsi » 12 Apr 2016, 12:37

I put up a new Open Game Source article based on getting Ostrich Riders to work on Mint. Normally I wouldn't do another article on the same program right away but I wanted have an article discussing finding fonts. Hopefully it can help other developers.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Ostrich Riders Ride Again

Postby dulsi » 16 Sep 2016, 12:53

Ostrich Riders 0.6.4 has been released. There is not much new. I just wanted a new release to attempt to get it into Fedora.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Ostrich Riders Ride Again

Postby Akien » 16 Sep 2016, 16:12

dulsi {l Wrote}:Ostrich Riders 0.6.4 has been released. There is not much new. I just wanted a new release to attempt to get it into Fedora.

And updated in Mageia :)
Actually I already had the same version but still labelled 0.6.3, since I had packaged the master branch with my merged patches ;)
Godot Engine project manager and maintainer.
Occasional FOSS gamedev: Lugaru, OpenDungeons, Jetpaca, Minilens.
User avatar
Akien
 
Posts: 737
Joined: 22 Feb 2014, 13:14

Re: Ostrich Riders Ride Again

Postby dulsi » 28 Feb 2019, 23:03

Ostrich Riders has a new arcade mode (-a command line argument). In arcade mode, only starting the game and exit are available. Pressing 1 starts one player and pressing 2 starts two player. In the game if someone dies they can press the appropriate number and join right back in. Score is reset to 0. Right now high scores are not tracked. Eventually I would like to fix that with an arcade machine like name input instead of using the full keyboard.

This work was done to support an arcade machine the cub scouts put together. It is running EmulationStation. Right now it has Ostrich Riders and Super Tux Kart. It would be nice if games had a locked down mode where you might not have all the features available. For example you would want the players changing the key configuration. It would be great if I could lock Super Tux Kart to multi player and maybe not allow them to adjust number of laps. This way we can quickly cycle through players.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Re: Ostrich Riders Ride Again

Postby dulsi » 04 Oct 2019, 23:10

Funny thing I just discovered. Fedora has compat-SFML16 package. I might have been able to compile Ostrich Riders without converting it to the latest SFML. Granted that wouldn't of helped anyone on other distributions. I probably would have done the upgrade anyway. I hadn't realized how friendly Fedora is to developers. You have multiple versions of SDL, SFML, and ClanLib.
dulsi
 
Posts: 570
Joined: 18 Feb 2016, 15:24

Who is online

Users browsing this forum: No registered users and 1 guest