Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
I couldn't sleep
« on December 10th, 2011, 05:22 AM »
I couldn't sleep tonight and I've been in something of a rut in terms of coding, wanting to do really little time wasting things rather than epic code production.

Now, I have a licence for http://impactjs.com/ and I finally got around to trying it, this is my first game in Impact, and I've spent maybe a little over 2 hours on it total, but I'm pretty happy with the results.[1] Uses Canvas, so needs IE 9, recent Chrome, FF 3.6+ should work alright etc.

http://arantor.org/meteor-storm/

Here's the deal: You're a spaceship caught in a meteor storm, one of your engines is burned out so you drift to the left, but you can use the other to push you to the right.

The deal ultimately is to survive as long as you can. Holding down Space will engage your engines and push you to the right but at the cost of fuel. Fuel is replenished with hitting the little petrol pump icon, though it does slowly regenerate while drifting.

How long can you last?

(Mobile... doubtful to work. I haven't done anything with respect to binding the 'buttons' on the display to anything, so I doubt it'll work on mobile, but that's a tweak for tomorrow.)
 1. The background graphics are ones that come with a demo game, the main ship/asteroids etc are mine.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Asgard

  • So Many Searches, Why Have So Many Searches, One Search Is Enough
  • Posts: 56
Re: I couldn't sleep
« Reply #1, on December 10th, 2011, 05:25 AM »
^_^

Is fun.

My current high score is a paltry 31 55.

Works great in Safari 5.1.1 on OSX 10.7.2

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: I couldn't sleep
« Reply #2, on December 10th, 2011, 06:07 AM »
I'd bind the space press event to screen click as well and remove the mobile button frame, would make it a lot more full of win.
The way it's meant to be

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: I couldn't sleep
« Reply #3, on December 10th, 2011, 02:31 PM »
Well, if I were to do that, Dragooon, I'd end up with a shortened background. I didn't draw the background images, they came with one of the demo games, and I'm really no artist, so I'd probably end up having to roll my own... though maybe I could go for a black motif and use white pixels. *scratches chin* It was really just laziness on my part to reuse the images, though.

Yeah, I suppose I could bind space to screen click, actually... when you only have one control, etc. (Might prompt some interesting refactoring on the main loop though as the first thing it does is test for enter to restart. Long story as to why.)

I just intended to reuse the two buttons at the bottom, left for move, right to restart, again mostly out of laziness. I'm still amazed that I could get a game working in a little over two hours.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: I couldn't sleep
« Reply #4, on December 10th, 2011, 05:43 PM »
Too fast for me. My best score while using Space is 13, while my best score while relying on probability (i.e. not touching anything at all) is 23, on the third, ahem, "try".

Are you working on our easter egg? :P

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: I couldn't sleep
« Reply #5, on December 10th, 2011, 06:27 PM »
For 2 hours it's a very good game, I managed to get 43 without touching anything on iPad :P.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: I couldn't sleep
« Reply #6, on December 10th, 2011, 07:08 PM »
Hahaha, awesome :)

Yeah, it needs tweaks but considering that I didn't exactly attempt to balance it or anything and things like positions and spawning is pretty much random...

Theoretically, I could bundle it in Wedge; the Impact licence would allow me to do so. However, when you issue a build for a game, when it compresses all the JS files down into a single file, it uses JSMin, and even then I still end up with a 50K JS file (of which most of that is Impact) plus several hundred K of assets, of which the two background images account for most of it (my images are tiny seeing how the largest is the font, weighing in at 711 bytes)

I suppose I could try compressing it with Packer but I honestly don't know if it would work properly then.

It was just a nice couple of hours working on something that didn't have any massive code dependencies, didn't need to worry about maintenance or breakage down the line, or worry too much about security or performance.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: I couldn't sleep
« Reply #7, on December 10th, 2011, 10:44 PM »
I still have plans myself for a Js game ;)
Entirely in jQuery I think. A Gaps game using the card set I had had made for my 2006 project. Ah well!

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: I couldn't sleep
« Reply #8, on December 10th, 2011, 10:47 PM »
jQuery's nice for DOM manipulation and implementing drag and drop wouldn't be too strenuous for working with card images, but if you're working with Canvas, I'd say Impact can't be beaten, even if it is $99. The fact you get a (decent) bundled level editor is a major plus for me.

(What's a Gaps game?)

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: I couldn't sleep
« Reply #9, on December 10th, 2011, 10:59 PM »
Gaps is the 'generic' name for Addiction Solitaire on Noisen ;) Took me years to find it out...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: I couldn't sleep
« Reply #10, on December 10th, 2011, 11:07 PM »
Odd, I've never heard it called Gaps before. Various other things, but not Gaps. Makes sense, though.

And yes, it would work pretty well done in jQuery.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: I couldn't sleep
« Reply #11, on December 10th, 2011, 11:16 PM »
Well, that's what I'll be making sure of ;)

Of course I can't even get started on this before I'm done with Wedge 1.0... In my opinion. I know how... perfectionist I can be when it comes to any of my projects. And this would be a 'side project' and thus I'd devote time to it. Hopefully not too long but once I'm onto something... :P

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: I couldn't sleep
« Reply #12, on December 10th, 2011, 11:19 PM »
That's the thing, I'm finding that it's actually quite nice to have a side project that just isn't too demanding, perfectionist or otherwise. It makes a change from the multi-thousand-line things I end up working on.

Aaron

  • Posts: 356
"The entire British Empire was built on cups of tea … and if you think I'm going to war without one, mate, you're mistaken."

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278