A relatively sophisticated game for the Numwroks calculator inspired by those arcade space invader games.
Go to https://my.numworks.com/python/ccsio/cosmic_raiders Make sure your calculator is plugged in Click the "Load to Calculator" button
All levels have to be appended to the 'levels' variable. A level is a tuple with two sub-tuples, each containing 8 items. An item is either a tuple containing data for that ship, or 'dead' indicating no ship. Structure of the data for the ship: (ship name,class data,movement data)
- ship name: 'basic'
- class data: None
- ship name: 'tank'
- class data: None
- ship name: 'shooter'
- class data: 3-item tuple
- mode: 'r' for random interval or 'f' for fixed interval
- param: for r: shoot chance (1/x, default: 115), for f: interval in seconds
- bullet speed: speed of the bullet (px/update, default: 5)
- ship name: 'ram'
- class data: 2-item tuple
- mode: r: random, f: fixed interval
- param: for r: ram chance, for f: interval
- movement data: mandatory
- axis: y
- distance: 180 for top row, 140 for bottom row
- px/update: multiple of distance (default: 12)
- loop?: True
- wait_time: time waiting before coming back up (in seconds)
- ship name: 'shield'
- class data: 3-item tuple
- shield chance: chance to shield/update (deafult: 200)
- shield time: time of active shield (in seconds)
- ships: # of ships shielded (max 5 if in backrow)
- any ship can move
- last atribute in ship tuple ship name,class data,movement data)
- axis: x or y
- distance: distance covered in px, (Note: no ship colliding prevention!)
- px/update: px per update, should be a mulitple of distance
- loop?: True or False
- _wait time: time spent waiting before going back (if applicable) in seconds