This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

davmac
davmac presents ...

2010/8/29

Skulls in space

Not very interesting in the moment, but it does demo the upcoming Greenfoot 2.0's "unbounded" world feature (actors that can move outside the bounds of the world).

I might try and continue to develop this into a proper game.

6846 views / 19 in the last 7 days

4 votes | 0 in the last 7 days

Tags: space game

This scenario is a member of: Grand Designs


Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Sun Aug 29 03:55:10 UTC 2010 Added the ability to shoot the skulls. (Press space bar to shoot).
Jamit4meJamit4me

2010/12/3

I love the depth of field on this!
davmacdavmac

2010/12/4

Thanks. It wasn't too hard, the stars have a vector magnitude which is multiplied by the (inverted) ship direction, to give them a velocity. It's a shame though, I've lost the source code for this and I forgot to upload it.
grumpagrumpa

2010/12/26

I like that, it`s really funny =)
GameCodeGameCode

2011/7/15

Just did a similar game. You could have the source code for the stars =) http://greenfootgallery.org/scenarios/3295
I like the game and thank you for your comments on mine too.
mark.hayesmark.hayes

2012/4/17

trying to understand the concept behind unbounded world. if you had a super-mario type of "landscape", and the viewport can see just a portion of the larger world, how to create the effect of moving the viewport about the larger world. the dimensions supplied to the World constructor for an unbounded world seem to define the dimensions of the view port. how to specify the bounds of the larger world?
davmacdavmac

2012/4/17

Mark, there are no bounds for the larger world - that is what makes it unbounded. The dimensions supplied to the World constructor do indeed specify the viewport size; the difference between a bounded and an unbounded world is just that the position of the actors within a bounded world is constrained to be within the viewport. To create the effect of moving the viewport around, you need to move all the actors within (and figure out some way to move the background, if you are using one. The easiest way is to draw the background with actors, rather than use a background image). There should be a few examples of that here on the greenfoot.org website, try a search or post in the forum.
SPowerSPower

2012/8/23

@mark.hayes If you want the world to have a limited size, look at this scenario: http://www.greenfoot.org/scenarios/5806 This also contains the scrolling background.

Want to leave a comment? You must first log in.

Who likes this?

thegreencoolerman drhorriblejr grumpa Jamit4me