Code Monkey home page Code Monkey logo

pxt-arcade's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pxt-arcade's Issues

1x1 sprite can't be edited

create 1x1 sprite by hand in JS and try to edit it in blocks - the color palette is super-tiny. Probably similar effect with other small sprites

add .toFixed()

enable.toFixed() in JavaScript _ (optional for Blocks)

less important is .toPrecision() - just a nice to have

"hang-man" style game request

Create a game that

  • uses an array of words or phrases to randomly build a game
  • show boxes or under lines for missing letters, and leave spaces for spaces between words (if needed)
  • show list of previously picked letters (always or with a button)
  • Build the image (hangman or a creative alternative image build like robot, bike...) for misses
  • nice to have: keyboard input although it doesn't translate to device
  • Must have: on screen letter/number input that can work on game device

Sprite editor todos

Tracking further todos

  • select a non-transparent color by default when opening
  • shrink to avoid resizing block
  • display background otherwise block looks empty
  • touch support.
  • cursor
  • height/width display
  • shape support
  • "full screen" mode

`setFlag` doesn't decompile

try using sprite.setFlag(...), editing it in JS, and switching back to blocks - it complains about custom field editor (the switch I guess) not supporting literals.

Stop and Wait Network Protocol game

Game Request

Scenario: stop and wait protocol simulation

We can code as below or reverse the automated side which may be easier for students not having to type words but having the fun of timeout pressure.

Receiver

create an automated receiver that

  • randomly drops incoming msg and outgoing received msg acknowledgement
  • can randomly send Ack msg after the sender timeout duration

Message

  • message could contain msg_num, ver_num, text
  • Ack could contain msg_num, ver_num

Sender

player is the sender

  • The sender sends words 1 at a time ex. sentence "Clear messages follow rules"
  • sender is tasked with following the send, wait and resend rules semi-manually within the game.
    • enter the msg number 0-9
    • enter the version number 0-9
    • enter the text payload

Game Play

Game ends and displays current msg on receiver side

  • After msg is sent successfully and acknowledged
  • After 10 replies from automated receiver
  • When sender chooses to end

crazy deluxe

would be cool to show sending animation and showing when fails

example of the scenarios

https://www.youtube.com/watch?time_continue=3&v=XLEBBBYnE8U

prompt api

We need a way to get inputs from the user. I guess various prompt for number, string, boolean?

Snake broken

This is an interaction with trying to raster directly to screen and sprite engine. Snake called "control.screenRefresh". We should provide a frame handler for rastering operations instead.

Encryption Password simulator or game

Need a game that would demo encryption implementation that student can update the encryption to be more complex

  • could be hash generation
  • some non-clear text storage (some guess the password game but code obscures the solution)

AI Game Request - with adjustible parameters

Game Request

AI game

demonstrate basic "AI" behavior that a student can adjust, such as using events to update parameters that influence the AI behavior

More-better

  • Several games that implement different complexities of algorithm so beginner can understand simplest implementation
  • fundamental functions/classes students can leverage to build own games or simulations

TODO

Simulator

  • add SVG around the screen
  • add buttons in SVG, especially for usage on a mobile phone
  • scale the screen - need to first print on 128x128 canvas and then print this canvas scaled on the actual canvas - there's example in EV3 @samelhusseini
  • gray out the simulator and display big play button over it, when it has no focus - otherwise it cannot get key events

APIs

  • implement dx in scroll()
  • add splash-screen and instruction functions
  • some menu system?
  • high score storage support (per-script in localStorage)
  • add ellipse drawing (filled and empty)
  • add empty rectangle drawing (using lines)
  • think about frame handler order (see sprite.ts for a list)
  • think if we want to support devices with very low memory (eg SAMD21 has 32k and one screen is 8k; we need double buffering, and also some other random memory which leaves around 1 screen worth of memory for the user)
  • nice design for GAME OVER - probably should avoid text - localization
  • nice design for splash
  • better animations for sprites
  • some rigid-body physics - make it easy for players to stop on platforms
  • come up with a better color palette (we at least need gray)
  • make palette swappable
  • game loop (frame.ts) should use requestAnimationFrame()

Sharing

  • save screenshots during game play
  • encode LZMA compressed program sources in the screenshot and have it download on "Download" button
  • implement loading of such PNG files
  • [ ] show simulator in sharing page

Unsorted

  • split game into HUD vs sprites, hud should be a scene
  • shape drawing
  • collisition detection
  • simple physics
  • sprite animations
  • scenes
  • "menu scene" -> start menu, game over
  • sounds
  • music (background)
  • templates for specific types of games: runner, platformer, schmup, etc...
  • skinning @samelhusseini
  • add SVG around the screen
  • add buttons in simulator SVG, especially for usage on a mobile phone; see http://arcade.readyplayeronemovie.com/
  • gray out the simulator and display big play button over it, when it has no focus - otherwise it cannot get key events

Simulator pixel-sampling issue

If you view the simulator in desktop mode you get what I assume are weird pixel sub-sampling issues.

For example, if I draw this sprite:

sprite_real_sampling

This is what it looks like in the simulator:

sprite_simulator_sampling

For smaller renderings of the screen we may need to lock the simulator size into a multiple of 128x128 (the simulator on my screen is 320x320). I tried both 256x256 and 384x384 and both of those don't have this issue but also don't fit the simulator pane (too small and too large respectively). The fullscreen view of the simulator looks great.

There is a similar issue in the preview of sprites from the sprite editor but I feel like that's less important of a scenario.

Failed to decompile `No instances of Image found`

Try decompiling the snake game back to blocks

no instances of Image found (anonymous) @ pxtblocks.js:2867 (anonymous) @ pxtblocks.js:2830 buildBlockFromDef @ pxtblocks.js:2825 initBlock @ pxtblocks.js:2720 init @ pxtblocks.js:2647 Blockly.Block @ blockly_compressed.js:1584 Blockly.BlockSvg @ blockly_compressed.js:1649 Blockly.WorkspaceSvg.newBlock @ blockly_compressed.js:1482 Blockly.Xml.domToBlockHeadless_ @ blockly_compressed.js:1455 Blockly.Xml.domToBlock @ blockly_compressed.js:1453 Blockly.Flyout.show @ blockly_compressed.js:1915 Blockly.Toolbox.TreeControl.setSelectedItem @ blockly_compressed.js:1965 Blockly.Toolbox.TreeControl.setSelectedItem @ pxtblocks.js:4156 goog.ui.tree.BaseNode.select @ blockly_compressed.js:1073 Blockly.Toolbox.TreeNode.onClick_ @ pxtblocks.js:4142 goog.ui.tree.TreeControl.handleMouseEvent_ @ blockly_compressed.js:1131 goog.events.fireListener @ blockly_compressed.js:271 goog.events.handleBrowserEvent_ @ blockly_compressed.js:274 b @ blockly_compressed.js:263

String methods support

Support common string methods in JavaScript (nice to have for Blocks but not required)

  • .toUpperCase()
  • .toLowerCase()
  • .replace()
  • endsWith()
  • startswith()
  • .search()
  • .trim()
  • .parseFloat()

See the following exist already: .charAt(), .concat(), charCodeAt(), substr(), .length, .compare(), parseInt()

server should not be connection to serial device

[run] cd C:\gh\pxt-32\node_modules\pxt-common-packages\sim; node ../node_modules/typescript/bin/tsc
serial: connecting to COM3 by Intel (PCI\VEN_8086&DEV_9D3D&SUBSYS_224E17AA&REV_21\3&11583659&0&B3)
serial: connected to COM3 by Intel (PCI\VEN_8086&DEV_9D3D&SUBSYS_224E17AA&REV_21\3&11583659&0&B3)
log strings: 8 files; 0 strings -> sim-strings.json

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.