Copter

Share your games and programs with the community.

Copter

Postby annyfm » Mon Jul 21, 2014 8:27 am

This is a simple clone of the famous Helicopter Game for Gamebuino.

Rubbish photo, because I work on Mac/Linux and can't take an emulator screenshot

copter-preview.jpg
Copter (preview)
copter-preview.jpg (46.97 KiB) Viewed 7274 times


How to play:

- Press A at the title screen to start the game
- In-game, press and hold A or B to rise and release to fall
- Try not to crash, get a good score!
- After you do inevitably crash (which you can take as an allegory if so inclined), press C to return to the title screen. You can start again from here


No non-standard hardware requirements - this should hopefully work with any Gamebuino out of the box.

Source: https://github.com/annyfm/Gamebuino-Copter (binaries on bin orphan branch)
HEX and ELF download: bin.zip

I look forward to becoming part of the Gamebuino community and seeing what we collectively can achieve with this little thing :D Now to get on with my day job, for the moment...
Last edited by annyfm on Sun Aug 17, 2014 6:35 am, edited 4 times in total.
User avatar
annyfm
 
Posts: 22
Joined: Sat Jul 19, 2014 1:31 pm
Location: London, UK

Re: Copter

Postby ripper121 » Mon Jul 21, 2014 10:39 am

The code looks really nice organized :)

You can upload Pictures with UPLOAD ATTACHMENT and then you can insert it.
User avatar
ripper121
 
Posts: 224
Joined: Fri Apr 04, 2014 2:02 pm
Location: Germany

Re: Copter

Postby annyfm » Mon Jul 21, 2014 11:28 am

Thanks for pointing that out to me - I didn't notice originally. I've edited the OP to include the screenshot as an attachment.

Thanks for the comment re: organisation. As projects go, for me this is an extremely small one, but it feels still important, particularly as I'm working in a language I'm not familiar with. I'd prefer to use classes (I understand there are 'structs' as well, objects basically?) but I'm not that comfortable yet with C, so will keep it simple with this project and just iterate arrays.

Another benefit to organising my code like that, particularly my variables, is it's very easy to tweak parameters and quickly recompile so it's feasible to continually test and adjust until the gameplay 'feels' right. I think I have a good balance at the moment, but I'll revisit the configuration after I've worked out a few kinks possibly later this week or at the weekend.

A question (which I suppose I could ask elsewhere) — where do I find a Gamebuino emulator? Is there one included in the Gamebuino download? I don't plan to use it heavily right now, but it would be useful for screenshots and video recording, and I didn't see a mention of it in the wiki.
User avatar
annyfm
 
Posts: 22
Joined: Sat Jul 19, 2014 1:31 pm
Location: London, UK

Re: Copter

Postby rodot » Mon Jul 21, 2014 12:24 pm

Hey there,

That nice to see games popping out here!

Still a work in progress, but I'm creating a game list on the wiki so everybody can add their own games. Until now I had to manually add them in the "game list" topic which was not really convenient. You should add your game, and please tell me if instructions (at the bottom of the page) are not clear :)

I just would like to point out that in Arduino classes don't have the new() constructor, they are constructed where they are declared. So usually people create a function named begin() which is used to initialize objects.
Another difference with C++ as it is on computer is that there is no dynamic allocation of memory, you have to create all your arrays with the maximum size they could reach.

The emulator is in Gamebuino's github in utilities/emulator. It only works on windows for now, to use it simply drag an drop your elf files on the executable.

To store your games you should create GitHub repo (with the source, hex and elf), this way people can easily fork them and all. You can also host your pictures on github so they'll be updated when you update your game.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Copter

Postby annyfm » Sat Jul 26, 2014 7:13 pm

Hi Aurelien, thanks for the notes - those aspects of Arduino development don't affect me just now (not within Copter at least) but I'll keep them in mind when I start my new project.

I've just pushed some substantial updates to GitHub - as you suggested, I've included the HEX and ELF files, though GitHub doesn't recognise HEX as binary, presumably because of the extension... I guess it should still work if you download and name it correctly.

These updates include fixes for the "top y" problem I had before, which resulted in some side effects particularly when generating 'gates' intermittently. I've fixed this so there shouldn't be any bias towards the top or bottom of the screen any more. I've also restructured and tidied up a lot of the code so it's a lot more readable and accessible. Hopefully, it will now be a decent starting point for other newcomers.

Also, I've grouped important variables together at the top of the corridor.ino and helicopter.ino files in a more organised way, so while I feel I've set some good defaults for the "official" version of the game, you're welcome to tweak them to your own preference - if the game is too fast/slow or too hard/easy, just change a few variables and recompile. There are controls for the game (scrolling) speed, corridor size/direction modulation, and gate size/length/frequency. There's also a "debug" variable now that disables collision detection for testing purposes.

I think I'll leave this project alone now - I'm going on holiday this week, and when I get back I'd like to find a new challenge (or possibly just go back to doing some music/drawing for a bit). I see someone has just forked my repository (albeit without the latest updates) so I'm thinking now that maybe a smarter programmer than myself can add some sound effects and a high score table?? :D

Edit: was going to add Copter to the wiki only to see that Inversesandwich has done so already. Cheers!
User avatar
annyfm
 
Posts: 22
Joined: Sat Jul 19, 2014 1:31 pm
Location: London, UK

Re: Copter

Postby annyfm » Sun Aug 17, 2014 6:40 am

A quick FYI for those that have cloned the Copter repo: I've removed binaries from the master branch retroactively and moved them onto a bin branch instead. If you forked with a mind to contributing code, you'll want to delete your copy and re-fork, as we now have different code histories.

This isn't something I normally do in public repos and it'll be the last time I do it - in future I'll keep binaries on a separate branch from the outset!
User avatar
annyfm
 
Posts: 22
Joined: Sat Jul 19, 2014 1:31 pm
Location: London, UK


Return to Games Gallery

Who is online

Users browsing this forum: No registered users and 12 guests