Nice physics platformer, like the vision cones on the cameras. Really wanted to shoot those big guys though!
Arthur Scott
Creator of
Recent community posts
@pouleyKetchoupp I did consider making it totally mouse controlled, but yes, I thought it would make it too easy. If I do a mobile version I'll have to rethink it I reckon.
@Grayt Apps Glad you liked it ! I had real problems with the cursor, I uploaded a new version a little while ago which just uses the default mouse cursor, as the cross hair graphic wouldn't work on Windows.
Thanks for looking at my game!
For me the mouse cursor is actually pretty big, it's a 32x32 sprite, not sure what's happened there. May be a Windows thing as I haven't tested it at all on there (will do though).
The gun speed increases as you collect powerups for it with the astronaut.
Instructions are on the game page, I did intend to have them in game but ran out of time...
Right I reckon that's it. I'm away at the weekend so I won't be able to do any more work then.
One last test of everything and then I'll release.
I'm relatively pleased with it, learnt a lot of new stuff, had fun taking part, so all good. Fingers crossed it doesn't just crash on other peoples machines!
Right, reckon I'm functionally complete now, time for a function freeze!
Should still have time to tidy up some of the graphics a bit more, and then balance gameplay.
The only thing I'm still not sure about is control, at the minute the turret/firing is keyboard controlled, the astronaut is mouse controlled. Which makes it a bit awkward...I was thinking of moving firing to the mouse, but I'd have to track the cursor with the turret which would probably make things too easy...will try and find a willing victim to try it out for me...
Probably won't have time to add in music though, not to worry, that was always last on the list.
Been a while since I posted an update here....
Haven't been able to work on my game as much as I would have liked over the last week or so, life type things getting in the way I guess. Anyway, I'm still going, focusing on trying to get all the functionality in this weekend, then spend next week bug fixing and polishing, hopefully tidying up some of the crappy graphics.
It's gotten to the point now where the code is starting to get a bit crufty, started out with great intentions as always but along the way little hacks and things creep in. Have a few unused components and systems, guess they aren't really doing any harm though.
I have had to do some refactoring though, my poor astronaut just wasn't behaving himself.I'm pretty new to Ashley and ECS systems in general, one of the things I don't think I've got right yet is interaction between different entities, mostly in response to events.
So I have a great big 'World' class which is the actual play screen, which has the listeners for keys (but not mouse, that ended up somewhere else??), and sets up the state, adding in entities etc. This is where I've been putting callbacks when things happen, but I'm never sure where to direct those callbacks...I don't have Entity classes as such, I just create them as and when needed...and it doesn't seem right to put that logic into the System classes...so it all ends up in this big (and getting bigger) class...I managed to take some of it out and create a Station class for the space station and its different entities and have been moving some of the functionality into here, but it still doesn't seem quite right.
Once I'm finished I'll have to go and check out everyone elses source code and see how they're doing it...
Been playing around with things a bit, before adding new features.
I've always wanted to make a game which had really big text scrolling along in the background, probably influenced by Jeff Minter or someone I think.
So I added a new system to do just that:
class BigTextSystem(i:Float) : IntervalSystem(i) { override fun updateInterval() { if (MathUtils.random(1,100) < 25) { engine.addEntity(Entity().apply { add(PositionComponent(Assets.VIEWPORT_WIDTH, 500f)) add(MovementComponent(-850f, 0f)) var msg = Assets.SOME_TEXT.get(MathUtils.random(0, Assets.SOME_TEXT.size - 1)) add(TextComponent(msg).apply { scale = 16.0f colour = Color(223 / 255f, 113 / 255f, 38 / 255f, 0.75f) front = false }) add(BoundsCheckComponent(8000f)) }) } } }
Also I've just discovered Kotlin's 'apply' function, as you can probably tell...
Here's a screenshot (it looks better in motion)
So after a good initial start, I'm now at the point where everything is broken and horrible....yack...
I've been having problems with animation, and graphics. I'm not great at graphics work, but I'm giving it a go.
I'd decided to use Spriter Pro for animations, as I have a license for it and it gives me an excuse to try it, but I'm finding it a bit...dodgy...
I use Inkscape for all my graphic work, export as separate png's, import into Spriter, animate, export as sprite sheet png, import into libGDX and create an Animation. However Spriter seems to really mess up the image quality. I'm now exporting from Inkscape at 4 times the resolution I need, then scaling the final sprite sheet down in Gimp before importing into libGDX.
The other thing that bugs me is that Spriter doesn't seem to allow for any snapping/alignment, so everything is done by eye.
I only need pretty simple stuff, here's an example gif:
Either I'm missing something in Spriter, or I'm going about this the wrong way...
What does anyone else use for creating animations? Especially using graphics created in Inkscape ?
Sometimes I find the interop between Kotlin and libGDX (Java really) a bit odd, but when it comes together, it really does make for a lot less boilerplate:
var firing = Texture(Assets.TURRET_ANIMATION)
var tmp = TextureRegion.split(firing, firing.width, firing.height/10)
var firingFrames = Array<TextureRegion>(10, { i -> tmp[i][0] })
var firingAnimation = Animation(0.02f, *firingFrames)
testAnim.add(AnimationComponent(firingAnimation))
Here I'm trying out animations using a sprite sheet. This works in this instance because I only have one column in the sheet, hence mapping it straight into a 1 dimensional array.
I struggled a little with the Animation constructor because I thought I needed a badlogic.Array, I had a Kotlin array and couldn't get them to play nice together. Turns out Animation will take a varargs TextureRegion as argument which Kotlin's spread (*) operator will let us do from an Array.
Neato!
Ah thanks!
The starfield is a single star image, added every x seconds with random scale and velocity :
package org.sturgeon.sweeper.systems import com.badlogic.ashley.core.Entity import com.badlogic.ashley.systems.IntervalSystem import com.badlogic.gdx.graphics.Texture import com.badlogic.gdx.math.MathUtils import org.sturgeon.sweeper.Assets import org.sturgeon.sweeper.components.BoundsCheckComponent import org.sturgeon.sweeper.components.MovementComponent import org.sturgeon.sweeper.components.PositionComponent import org.sturgeon.sweeper.components.VisualComponent class StarfieldSystem(var i:Float) : IntervalSystem(i) { override fun updateInterval() { var star = Entity() var t = Texture(Assets.STAR) var pc = PositionComponent(Assets.VIEWPORT_WIDTH+100, MathUtils.random(0f, Assets.VIEWPORT_HEIGHT), t.width.toFloat(), t.height.toFloat()) var scale = MathUtils.random(0.1f, 1.2f) pc.scaleX = scale pc.scaleY = scale star.add(pc) star.add(VisualComponent(t, 0)) star.add(MovementComponent(MathUtils.random(-300f, -100f), 0f)) star.add(BoundsCheckComponent()) engine.addEntity(star) } }
Spent a bit more time pottering with yon jam entry.
I now have a pretty good vertical slice of a game:
Start screen -> playing screen (with score and health) -> Game over screen
While all the parts are relatively basic, it means that even if I were to release now, there's kind of a game in there (albeit not a very good one). A minimum viable product if you will.
Now it's a case of adding features, and polishing what's currently there.
Applying Agile software principles to game development, oh yes.
Had a good bit of time to spend on my jam entry today, made some decent progress.
Now have basic collisions, plus a title screen, and a star field!
Really enjoying working with Ashley, once there are a few systems in adding new entities is really easy!
Also added in Aurelien Ribon's Universal Tween Engine, time to get Easing!
Also must work out how to embed images/gifs into a post!