OutRunduino Work-in-Progress

Store Forums Hackvision Game Development OutRunduino Work-in-Progress

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #685

    Every game console should have a car game, right ?

    OutRunduino work-in-progress video 1, running on my TVout SFML framework for Windows. I will test soon on Arduino, should be about 80% of this speed, if memory doesn’t out run 🙂

    Road calculations are based on lookup tables (for speed, as no calculation is needed). This is the reason for artefacts when road shifts. I need to add another lookup table for more accurate perspective shifts.

    https://www.youtube.com/watch?v=KkwyPA-hmOo

    • This topic was modified 3 years, 7 months ago by Michael.
    #1891

    WIP 2 video

    – perspective calculations corrected
    – preliminary curve algorithm added
    – 3 lane road
    – parallax background

    http://youtu.be/eTF3JiTGLbM

    • This reply was modified 3 years, 7 months ago by Michael.
    • This reply was modified 3 years, 7 months ago by Michael.
    #1892
    Michael
    Keymaster

    WOW, I’m really impressed. That looks fantastic. I also hope you have enough memory! After the framebuffer uses 1.5K, there’s only 500 bytes left for variables and stack. I had to be very stingy and creative when making Asteroids.

    #1893

    Yes. Memory is going to be tight. I need to test on a real Arduino very soon.

    I use as much hard coded constants and progmem lookup tables as possible (<-might be too slow tho). While it looks like a lot is moving on screen, in reality there are not so many variables in play. I can also cut down on vertical framebuffer height (sky) if I run out of stack. I want to scroll the background by using TV.shift. I have tested it and it could give a big speed boost. The road gets shifted also, but since its updated per every frame, it doesn’t matter. I could really use a version of the Asteroids overlay bitmap routine that draws vertical column of a bitmap extracted from a given point in the bitmap data – even described in pseudocode… 😉 And, on another note: Just think about the possibilities here, Hackvision Special Edition Kickstarter, with Outrunduino firmware, bundled with airbrush art poster and a C-cassette with game music tracks …. oh the coolness! *grin* O0 <- its a joke, no need to get worried.

    #1890

    I’m very confident in this game idea. I made the engine resolution independent. I was able to run at very low res and yet maintain a good feeling. Linked here is a video of running in 104×56 res. This means I have ways of cranking up speed and freeing memory for traffic and other gameplay improvements!

    https://www.youtube.com/watch?v=eIGohiheIEQ&feature=youtube_gdata_player

    • This reply was modified 3 years, 7 months ago by Michael.
    • This reply was modified 3 years, 7 months ago by Michael.
    #1894
    Michael
    Keymaster

    Looks great at lower res! KEEP GOING!

    #1899

    Work-in-progress video episode 4 … palms and pesky Porsches !!

    #1900

    Update 5: 1st run on real hardware

    https://www.youtube.com/watch?v=gk1YBu-7jXo

    This was my first attempt to take the game from SFML on Windows to real HW. It took about 1 hour, I need to put #define switches into the code for enabling/disabling Arduino specific code (progmem access, random, inclusion of Arduino.h and some types)

    Result ?

    Flash remaining: 15 kB
    RAM remaining: 614 B

    Speed is very good, in fact its too fast as you can see from the Z count running over rather quickly on the left hand screen corner.

    Also, unoptimized road curvature (30 x float) and road edges lookup tables (3 x 30 ints) are still in RAM !

    So basically I have 15 kB to add game graphics and gameplay and around 900 B remaining for game variables.
    The screen buffer is now only 728 B, so perhaps in the end I can even crank up the resolution.

    I am pretty amazed at what the tiny atmega 328 can actually do.

    • This reply was modified 3 years, 7 months ago by Michael.
    • This reply was modified 3 years, 7 months ago by Michael.
    #1901
    Michael
    Keymaster

    That’s fantastic. You are a very talented programmer. I’m impressed you have so much memory left. I agree that it is quite amazing how fast the ATmega328 runs when doing this sort of development. Memory is the constraint, not speed. I’m some of the other things I do (audio processing with the Audio Hacker shield), it’s the other way around. CPU speed is the limiting constraint, but memory is no issue.

    Let me know when the game is “done” and I can put it on the games page. No hurry.

    #1902

    Thanks for the compliment Michael.

    I don’t know what it is about having to deal with limited resources that really appeals to me. I also play around with ARM Cortex processors and I have Olinuxino embedded Linux boards, but … the more memory and processing power I get, the less it seems to interest me 😉

    You will not see a finished game soon. I want the end result to look impressive and be genuinely fun to play – in a way that people will be amazed that they can get so much game out of a measly atmega328. If I get twisty winding roads with altitude changes, various landscapes and most of all a similar “crossroads” system as in Outrun then it will be mission accomplished. Lets see how far this can go.

    My real concern now, as I put in another post on the bulletin board, is sound. I am wondering how to create engine and screeching type sounds. I’ve thought about distorting the sound output by involving some other pin, or perhaps even involving some external circuitry. It’s stretching the Hackvision format a bit, but I think that’s what hacking is about, adding bits and pieces, not just by coding but also by soldering. I want to generate the kind of saw-tooth wave (?) rough sounds that the games of yore had. TVout.tone might be good for melodies, but I want effects: crackling, buzzing, popping crap that is more noise than sound.

    What would you do, if hypothetically you were a coin-op game designer circa 1982 and had to improve the sound capabilities of your arcade driving game – as cheaply as possible ?

    I’d appreciate just a pointer to some direction to start looking & experimenting. Sound (unlike graphics) has never been my domain.

    #1912

    Road segments, alpha-bitmapped car, sideways forces, hills & curves

    https://www.youtube.com/watch?v=CV2rHwstXSI

    • This reply was modified 3 years, 7 months ago by Michael.
    • This reply was modified 3 years, 7 months ago by Michael.
    #1913
    Michael
    Keymaster

    simply incredible. I’d wager that this is the most sophsticated Arduino-based video game of all.

    #1903

    Thanks Michael

    When I started this, I had a hunch that I need to be able to develop in a smarter and faster way. Porting the TVout to PC was a very good first move.

    For example:

    – The whole road algorithm is now done using 3 integer lookup tables. All the rest is done by combining the lookup values with multipliers and modifiers.

    – The alpha bitmap was a pain to develop because I needed to come up with a logical operation that would combine the screen, the bitmap and the alpha channel in such a way, that all 7 different logical states would result in the correct output. All “simple” solutions ended in 1 state inverting a pixel or some other misery.

    If I would have had to do all that tweaking by uploading to Arduino it wouldn’t have been slow, it would have been impossible. I only have a couple of hours now and then to work on this.

    SO:

    To give others the opportunity to do the same, I have opened a git repository for my SFML port of the TVout library. I have also shifted over to Linux for the development. In Linux its plug-and-play.

    https://github.com/jonneva/TVout_SFML

    for git clone:

    https://github.com/jonneva/TVout_SFML.git

    and a lousy instructional video:

    https://www.youtube.com/watch?v=8fgVn5jRmpY

    If you wish to share this information on your Hackvision page, you are more than welcome to do so.

    The OutRunduino work-in-progress files are also under my account, but those I do not wish to be linked or announced, as the code is far from stable.

    Let’s hope we will see more sophisticated Arduino games in the future ! I have been directly contacted by at least two people, that’s what made me put the code on github.

    • This reply was modified 3 years, 7 months ago by Michael.
    • This reply was modified 3 years, 7 months ago by Michael.
    #2280
    johnniewalk
    Participant

    Looks good but still lot to do! all the best.

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.