Skip to content

JDN89/my-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 

Repository files navigation

steps to LEARN WASM + LEPTOS

read docs (BORING, but what can you do?)

PROJECTS:

  • make snake in JS and then in Leptos

    • steps:
      • Set up the game canvas: Create a canvas element in your HTML file and use JavaScript to get its context, set its width and height, and clear it before each frame.

        • Set up the game loop: Use requestAnimationFrame to create a loop that updates the game state and redraws the canvas every frame.

        • Create the snake: Define the initial position and size of the snake, and create an array to store its body segments. Move the snake by updating the position of its head and adding a new body segment at the front.

        • Add food: Generate a random position for the food and check for collisions with the snake. If the snake eats the food, increase its size and generate a new food.

        • Handle user input: Use the keyboard or touch events to allow the user to control the snake's direction.

        • Detect collisions: Check for collisions between the snake and the walls or its own body. If the snake collides with something, end the game.

        • Update the score: Keep track of the player's score based on the number of food items eaten.

        • Add game over screen: When the game ends, display a message to the user and allow them to restart the game.

  • make I love Hue in JS and then in Leptos

    • VUE 3 and Leptos?

#DONZO

About

trying out languages and frameworks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published