Arcade2D allows users to create their own 2D games with Source ยง3 and above variants.
This module will simplify the features available in Phaser 3 to make it more accessible
to CS1101S students. Some examples have been included below.
How to use Arcade2D:
Create gameobjects: create gameobjects using any of the create functions, such as create_rectangle.
Create update function: call update_loop with your update function as an argument.
Your update function should take in an array as an argument, which you can use for maintaining
your game state. The logic of your game is contained within your update function.
Build the game: call build_game as the last statement.
constaudio = create_audio("https://labs.phaser.io/assets/audio/SoundEffects/key.wav", 1); update_loop(game_state=> { // Press space to play audio if (input_key_down(" ")) { play_audio(audio); } }); build_game();
Arcade2D allows users to create their own 2D games with Source ยง3 and above variants. This module will simplify the features available in Phaser 3 to make it more accessible to CS1101S students. Some examples have been included below.
How to use Arcade2D:
create_rectangle.update_loopwith your update function as an argument. Your update function should take in an array as an argument, which you can use for maintaining your game state. The logic of your game is contained within your update function.build_gameas the last statement.WASD input example
Draggable objects example
Playing audio example
Grid colouring example
Snake game example
Author
Titus Chew Xuan Jun
Author
Xenos Fiorenzo Anong