Road Rash clone

Road Rash clone

Postby asdv » 30 Mar 2014, 16:09

Hello guys.

I'm making a road rash clone currently called open rash. I think I've gotten the basics in place (movements, animation, physics) so I though I'd show it here. Here's a video, there's some stuttering in it but that's due to the recording program:
https://www.youtube.com/watch?v=JfPwjvO6e80

There are no pre-built packages available but the source is here: https://github.com/asdv/open-rash
I've only tried to compiled it for Linux. It's written in C and uses SDL1.2 (image, mixer, ttf, gfx packages) and openMP. Levels are auto-generated on startup.
I've tried to keep the engine as simple as possible so I do think I have a chance to actually finish this project and in a reasonable time frame. What I need help with is the graphics; if you know someone who feel like doing the sprites please tell.
Comments are welcome.
Attachments
1.jpg
asdv
 
Posts: 19
Joined: 30 Mar 2014, 15:55

Re: Road Rash clone

Postby charlie » 30 Mar 2014, 21:02

That's pretty cool! It looks a lot better in motion than I was expecting from the screenshot.
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2025
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: Road Rash clone

Postby Akien » 30 Mar 2014, 21:44

I just tried it, it's quite nice! It plays really smoothly, I could do some pretty nice jumps (and crashes :D).

I just had to add "-lm" to the linker flags in the Makefile to complete the build.
It would be great if you could add a way to change the key settings in future versions, I have an AZERTY keyboard so I had to twist my fingers a bit to be able to play ;)

Keep up the good work!
User avatar
Akien
 
Posts: 731
Joined: 22 Feb 2014, 13:14

Re: Road Rash clone

Postby andrewj » 31 Mar 2014, 01:04

Looks great so far.

I think it needs shadows for the player / bike, as that helps you see if you are off the ground and how high up you are. These can be done as sprites: convert a sprite to solid black, squish them vertically, maybe mirror them vertically, and draw alpha blended at 50% or so alpha.

A nice sky background would be good too. You can try OpenGameArt, but I have looked there for my own game and there isn't many usable ones there. Wikimedia has numerous panoramic photos, but these may be too realistic for your game.

Alternatively you could generate some fractal mountains and make a sky with something like ppmforge (or even just a nice gradient between two colors).
User avatar
andrewj
 
Posts: 194
Joined: 15 Dec 2009, 16:32
Location: Tasmania

Re: Road Rash clone

Postby asdv » 31 Mar 2014, 16:20

Thanks guys. Yes, adding a config files for changing key mappings and other stuff is something I've wanted to do for some time so I should probably start doing that. I also forgot to add to the post that currently the keys are: wasd for steering, j for punching, q or ctrl+c to exit.
Shadows are another really good idea. I've added a simple blob shadow for now.
asdv
 
Posts: 19
Joined: 30 Mar 2014, 15:55

Re: Road Rash clone

Postby farcodev » 31 Mar 2014, 16:50

Really cool :]
farcodev
 
Posts: 163
Joined: 09 Feb 2011, 02:52

Re: Road Rash clone

Postby c_xong » 31 Mar 2014, 23:21

asdv {l Wrote}:keys are: wasd for steering, j for punching, q or ctrl+c to exit.

Road rash for PC used arrows for steering and ctrl/shift/alt for attacks, maybe those would be better.
User avatar
c_xong
 
Posts: 225
Joined: 06 Sep 2013, 04:33

Re: Road Rash clone

Postby asdv » 01 Apr 2014, 16:44

Yeah, as default it should use arrow keys for steering and ctrl or space for actions. I've just gotten used to move with my left hand, that's why I favored wasd. libconfig is being added so this should be configurable soon.
asdv
 
Posts: 19
Joined: 30 Mar 2014, 15:55

Re: Road Rash clone

Postby asdv » 26 Apr 2014, 15:09

Time for a development update. Most visible change is that there now are basic ai opponents. Keys have also been changed to arrows for steering, ctrl for punching, esc or just close the window to exit. That can be changed in cfg/input.cfg. Here's a video:
http://youtu.be/Lw8Vg9hqE34
There's a lot of rubber banding in the ai but since it's not really about racing I felt it was ok. The original also relied heavily on it.
When you reach the end of the 'track' it just stops you and then you have to exit the program.

It's also been ported to SDL2. Not entirely successfully since frame rate is around half of what it was with SDL 1.2. Maybe I'm doing something wrong. At first I tried following the migration guide on SDL's homepage, where you mostly use textures, but then performance was even worse than if I used surfaces. Also I couldn't figure out how to preserve transparency when loading a png file into a texture.
Another possible reason is that while I can use SDL_WINDOW_OPENGL flag for the screen surface I can't use the SDL_RENDERER_ACCELERATED flag for the renderer without all the graphics going haywire. Maybe it would work if I installed the binary blob driver for my graphics card.
If someone wants to try with rendered set to accelerated you can go into cfg/settings.cfg and change “sdl_renderer_flags” from [ 1, 8 ] to [ 2, 8 ].

I tried building an exe file for windows using MinGW but I could never wrap my head around how it was supposed to be set up (despite reading a couple of guides on it...). The SDL_gfx package seemed particularly difficult to get working.
I'll make a .deb package though when I get something closer to release.
asdv
 
Posts: 19
Joined: 30 Mar 2014, 15:55

Re: Road Rash clone

Postby domsson » 18 Jun 2014, 21:25

This is great! I regularly checked the web for a Road Rash reimplementation, so I'm exicted to finally see someone taking it on.

Say, what exactly are you aiming for? A clone/reimplementation that looks just like the original? In this case, you could or would probably want to figure out how to extract the sprites from the original game data. If you want to go with own graphics, what style / quality are you looking for? Pixely-retro or sharp-newish? I'd be happy to contribute some stuff, but I fear I am really horrible with graphics, so only retro would work; and even there I'm not so sure. Anyway, would probably be good to know for everyone who's interested in contributing. Where could contributors upload / send their work, via GitHub? And one last question, is there an IRC channel for the project, maybe?
User avatar
domsson
 
Posts: 4
Joined: 18 Jun 2014, 21:16

Re: Road Rash clone

Postby domsson » 19 Jun 2014, 21:18

In any case, here is a tree for you. :D

Image Image

Edit: added a second tree, improved the first tree
Last edited by domsson on 20 Jun 2014, 13:38, edited 2 times in total.
User avatar
domsson
 
Posts: 4
Joined: 18 Jun 2014, 21:16

Re: Road Rash clone

Postby Arthur » 19 Jun 2014, 22:22

Not bad that domsson, maybe put it on OpenGameArt.org for other people possibly interested? :)
Hey pal, I took an oath for justice! "In happy days or tightest tights..." or something like that.
__________________________________________________________________________
Image
User avatar
Arthur
 
Posts: 1065
Joined: 06 Dec 2009, 00:49

Re: Road Rash clone

Postby domsson » 20 Jun 2014, 13:42

Thanks Arthur, I didn't know that site! I guess I'll up them there - can't hurt. I added a second tree and improved the first one, now I am actually somewhat pleased with them.
Anyway, let's see if asdv reports back... I sure hope so!

Edit: Uploaded as suggested. http://opengameart.org/content/two-pixelish-tree-sprites
User avatar
domsson
 
Posts: 4
Joined: 18 Jun 2014, 21:16

Re: Road Rash clone

Postby julien » 09 Aug 2014, 21:24

Hi,

I've cloned your git repository and tested the game. I could not figure out how to have the opponents and the curves on the road. How can I have the version displayed in the youtube video ? Also, input does not work.
C++ developer with some 2D art skills
http://www.stuff-o-matic.com
julien
 
Posts: 10
Joined: 02 May 2010, 20:40

Re: Road Rash clone

Postby asdv » 11 Nov 2014, 21:44

Sorry for not replying for so long, some other things came up.
Domsson: Thanks a lot for your comment, I'm aiming to be somewhat faithful to the original but also with things looking a bit more sharpish. I certainly don't want to copy the original frame rate :p. I guess I don't really know what I'm aiming for at the moment, I've been a bit lazy with the graphics but I'll try and get complete sprites for the bike/guy and see how it goes.
Not sure if I'll use the tree but thanks a lot for making it. I prefer to make the original graphics as vector images in Illustrator since I'm so undecisive when it comes to resolution/colors and I found that this make it easier to change things. But maybe I'm wrong about that since I don't know much about graphics...
I definitely don't want to rip the original sprites though. A lot of FOSS games does that were you can download the executable but then have to import all the assets from the original game and this practice has always infuriated me since it makes it so difficult to get things running.
Contributions could most easily be sent to github, however I'm not at all familiar with how pull requests works yet. I'd like to try and make the graphics myself first though, I feel it would simplify things on a project I might just work on irregularly. And I like being self reliant.
No IRC channel either. If there's a FreeGameDev IRC I might pop in some time though.
Julien: I think I left the master branch in a bit of a mess before taking a break. The current master branch should work as intended.

I've also managed to get builds for windows finally. Attaching the binaries, they work on my Win7 machine at least... This was one of the things that held me back before as the difficulty of getting it working on windows made me look into other game libraries. Some things about SDL just boggles the mind.
Attachments
openrash.zip
Windows build
(3.32 MiB) Downloaded 484 times
asdv
 
Posts: 19
Joined: 30 Mar 2014, 15:55

Re: Road Rash clone

Postby DetectDefective » 29 Nov 2014, 00:11

Awesome to see you're still working on this, asdv. Been waiting a long time for someone to do a proper take on Road Rash. :D

Made a quick recording of it to test out 60fps recording and actually got a nice video, minus the mouse cursor I left on by mistake. I put a link to the topic in the description as well.

I also decided to screw about with the files, to see how many AI I could have at once. Open Rash wouldn't start up past 20 (I may or may not have been gunning for 63 AI racers to see complete chaos :lol: ), and I had 19 AI drivers (which actually worked out well, seen here) until OR decided it had enough and crashed, usually after a pair of jerks gained massive air out of nowhere (and they're flying high here).
User avatar
DetectDefective
 
Posts: 10
Joined: 27 Nov 2014, 17:30
Location: Eastern Canada

Re: Road Rash clone

Postby asdv » 05 Dec 2014, 09:44

Thanks DetectDefective! There's a #define in the source that set max amount of players to 20. I'd completely forgotten about it and to check if the number of players being loaded exceeded this. Also I'd forgotten that when a player crashes it spawns another "player" in the form of the loose bike. So if you had 20 players and one of them crashed things would overflow. This should be fixed now, I've tested it with 89 AI guys and the max should now be 499,
Good find.
I should add some config option to clone a certain AI a number of times so one doesn't have to copy-paste so much config just to have extra guys...
Hopefully the problem with some guys flying off too high was related to the bug. But it seems there might be something wonky with the jumping mechanics at lower FPS though...
Progress is a bit slow as I'm still swamped with other stuff. Hopefully things clear up after xmas ;)
asdv
 
Posts: 19
Joined: 30 Mar 2014, 15:55

Re: Road Rash clone

Postby DetectDefective » 09 Dec 2014, 08:33

Good stuff, glad I could be of some help. There was another thing I noticed along with the flying riders: Some of them would go through the ground but stay in position. Hard to describe, I'll try and record it if it happens again.

Unfortunately I know next to nothing about compiling a source, gave it a shot and screwed it up completely, so I'll wait for the next Windows compiled version. :P
User avatar
DetectDefective
 
Posts: 10
Joined: 27 Nov 2014, 17:30
Location: Eastern Canada

Re: Road Rash clone

Postby asdv » 11 Dec 2014, 20:48

I've changed up the jumping physics a bit and compiled a new windows binary, attached. Default # AI riders are set to 60 but I've added 89 of them to the config file so you could try that amount. AI algos doesn't seem to like it though, they bunch up a lot and it predictably turns into a bit of a chaos.
I also noticed that the code I previously added to have the race end after a certain distance appears to have disappeared and now it will just crash after either you of usually an AI bot get's too far and something tries to read out of bounds and it crashes... again... sigh... I have no idea how this code, despite the best efforts of git, has been lost to the ravages of time. I must have happened around april. I'll re-add it but I wonder if some other bugs have been reintroduced...
I'll try and get some basic stuff up next like a menu, options and ability to full screen.
Attachments
openrash 14.12.zip
(3.33 MiB) Downloaded 473 times
asdv
 
Posts: 19
Joined: 30 Mar 2014, 15:55

Re: Road Rash clone

Postby DetectDefective » 13 Dec 2014, 03:22

Nuts, I seem to be missing a libgomp-1.dll. Didn't have this problem with earlier versions, there anything I can do to fix it? D:
User avatar
DetectDefective
 
Posts: 10
Joined: 27 Nov 2014, 17:30
Location: Eastern Canada

Re: Road Rash clone

Postby asdv » 14 Dec 2014, 10:03

I compiled it with OpenMP to get same multithread support as on Linux. But I thought windows had native support for OMP and you wouldn't need to package libgomp.dll. Anyway it doesn't seem to work as well as on Linux as core utilization never really goes up. I've attached a new version without OMP that you should be able to run.
Attachments
openrash 14.12.1.zip
(3.33 MiB) Downloaded 488 times
asdv
 
Posts: 19
Joined: 30 Mar 2014, 15:55

Re: Road Rash clone

Postby DetectDefective » 18 Dec 2014, 15:47

Thanks again, asdv! So many racers flying around and beating the crap out of one another. :lol:
User avatar
DetectDefective
 
Posts: 10
Joined: 27 Nov 2014, 17:30
Location: Eastern Canada

Re: Road Rash clone

Postby qubodup » 04 Apr 2015, 01:22

I compiled it on Arch Linux, had to get sdl2 stuff, sdl2_image from AUR even.

It flickers (AMD HD 7750 card, might be open source driver issue) and crashes when the player lands far from the bike it seems.

http://youtu.be/oCjcP3MJY84
User avatar
qubodup
Global Moderator
 
Posts: 1671
Joined: 08 Nov 2009, 22:52
Location: Berlin, Germany

Re: Road Rash clone

Postby asdv » 06 Apr 2015, 09:32

I think the crash has to do with the player being flung too far right when the track is supposed to end and something gets read out of bounds since right now there aren't any checks for the track data to see if it reads beyond one of the arrays. I'll fix this and also make sure that the bike and player doesn't get too far away from each other.
The flickering is something I used to see on my previous linux installation too, apparently it didn't like starting the program in full screen mode. Putting it in window mode (alt+enter) and then fullscreening again fixed the flickering. I'm not seeing it on my current installation but don't know if it's because I run another distro or the binary blob gfx driver.
Anyway I think I can work around it by always starting in window mode and then fullscreening immediately afterward.

There's been a lot of false starts with the graphics that's delayed things but there should be a way to do them relatively quickly now so hopefully things will get back on track soon.
Thanks for trying it out!
asdv
 
Posts: 19
Joined: 30 Mar 2014, 15:55

Re: Road Rash clone

Postby asdv » 26 Jun 2016, 14:51

Just an update to say I’m still working on this but had a few false starts. In short I wanted to move away from SDL and to something a bit more complete like an actually SDK.
So I converted over the whole thing to Qt and because of that to C++ and while Qt was pretty good things seemed to be too much in flux. The parts I wanted to use were semi-deprecated and the new QML stuff wasn’t as nice.
So then it was back to SDL, now with the goal in mind to use emscripten so I wouldn’t have to cross compile.
That worked surprisingly well. Though it works when I run it from a local web server it won't run on the free webhosts I've tried.
Next I want to fix up the graphics and AI to something serviceable, then add a gui and basic level generator.
The GUI is the biggest hurdle. I really don’t want to have to write my own gui lib. The best alternative seems to be some immediate mode gui kits but the documentation for them is lacking. If someone has any suggestions as what to do that would be welcome.
Here’s a quick video:
http://dai.ly/x4ifc4u
Git repo has moved to here:
https://notabug.org/finnucane/openrash
asdv
 
Posts: 19
Joined: 30 Mar 2014, 15:55

Who is online

Users browsing this forum: No registered users and 1 guest