GaryS

Shiftah - My first LD entry and indeed, my first game!

Recommended Posts

Gameplay.png

Shiftah is not only my first LD entry, but also my first ever game!

I've been messing about with Phaser for a few months now, loving every minute of it... so thought I'd enter Ludum Dare for the first time.
The theme was 'ShapeShift', which just basically screams 'Altered Beast' to me... however with my limited graphical acumen, what I've ended up with is an endless runner style game where you navigate your ship through an onslaught of blocks and shapes, trying not to get stuck.

The physics are a bit shonky, it has to be said - (I could do with a bit of help on that), but as it stands the game is playable.

All in, this was about 30 hours work and includes my first attempts at MOD tracker music too!

You can play the game directly or view my LD submission page.

Share this post


Link to post
Share on other sites

Thanks Matt!

Also, thanks for noticing that I've got local storage working on that! As it happens, local storage was really easy. No more difficult than writing a cookie... and if I'm honest, I already had the code to do it laying about.

I've been playing with Phaser for a while, using a basic game as a testbed for techniques and ideas. One of the things I always like to do is write code that can be reusable, and thus I wrote a 'GameData' prefab that handles keeping, updating and displaying stats... scores and the like.
I'd hoped that my prefabs could be dropped into any game I create, and so far that seems to be working well!

As for the blocks, you should be able to slide up and down them... I've had a bit of difficulty there with arcade physics.
As best I can tell, the issue is that the blocks the player collides with are constantly moving, and the collide function aims to move the player back outside of the collision range - this seems to override the velocity that the player happens to have and causes it to stop dead.
Someone suggested I make the collision boundry per row instead of per block, which might work - but will be fiddly to implement.

I've also had a bit of a problem with the movement of the ship... I was trying to be clever with my ship prefab - it has multiple ways of moving - and the best way I could find to allow switching between rotation style movement and basic 8-way movement was to use velocityFromAngle to propel it forward and backwards.
All seemed to work well in testing, but I've found when playing the game that for some reason when rotated to face backwards and moving 'forwards' (relatively, so, backwards), the ship can sometimes move much slower than I think it should.

No idea why that could be!!

Share this post


Link to post
Share on other sites

Ah, I see, you're sliding the blocks?

I assumed that the blocks would be static and then it is the camera that moves. I don't know anything about arcade physics but naturally you should be able to slide against a surface (which would take into account friction) and that is far easier when one of those objects is static, like sliding against a wall, it would be significantly harder to slide laterally if the wall was pushing back towards you. This reduces your physics logic too as static objects are far far cheaper to model.

Writing reliable and robust reusable code is key.

Yes local storage is very easy and its pretty much ubiquitous now so little reason not to use it, its certainly easier than faffing with cookies. I actually have a system going (not particularly useful for fast paced games) that uses a centralised state object (all of the state for you app is in one place), when there is an error it pings the entire state tree into local storage (if it can, there are limits on local storage), from there I can grab the state tree and use it to exactly replicate the state that caused the error. No more faffing with a complicated set of replication steps, just grab the state and reproduce the error. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.