Code Monkey home page Code Monkey logo

teaser's Introduction

#teaser


##Intro: it's just a half-done game

teaser is a game I made with Apple's SpriteKit. Basically, it's similar to a barrage game.

Before a stage starts you have a short time to adjust your position and see where enemies are, during which you're invulnerable. Then let's rocks.

It only contains 5 stages. I was to make music to suit it, but now the music should only stay in my mind.

Due to some nasty bugs of SpriteKit as well as my lacking of experience in the field of coding, I decided to open its source code and ask for suggestions.

Maybe I should put effort on stuying WebGL & OpenGL?

##Problem 1: Messy Stage Messy Script

Behind the seems-beautiful appearence is but a mess, which I can't handle. teaser is written in swift and I was too inpatient to write this game out.

You can easily find out how I write the script in StageScript.swift. I just nastily put 5 stages in a huge tuple and blah blah blah. How should I do to avoid such a stupid doing?

##Problem 2: Maybe it is SpriteKit's fault

This one is quite simple. Just after registering the SKPhysicsContactDelegate, and implementing the collide method, I've found that sometimes the contact bodyA or bodyB would get a nil. At this case though, if you were to do some method on them such as

bodyA.removeFromParent()

, that node works fine. But when it gets to

bodyA as! Player //Which is just an Example

, then Xcode will say it unexpectedly found a nil.


Maybe more problem will be added into this readme soon.

But if you are to make suggestions, thanks a lot.

teaser's People

Contributors

acculivia avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.