Project Ran!
Project Ran is a javascript project. I’m learning js this summer because my previous web projects (like Project HTIC) rely on jumping to other pages to respond to any user action, which makes user experience not responsive.
Javascript has many interesting features. It is not typed (you can assign a variable with a string then an integer, like in Python). Functions can be defined directly into a variable and that variable can be called. Function can be used to create objects using the new operator. And JSON is native here.
Project Ran aims to implement a STG game similar to Touhou Project in javascript. In Touhou Eiyashou ~ Imperishable Night (東方永夜抄 ~ Imperishable Night), Yakumo Ran (八雲藍, blue) is the shikigami of Yakumo Yukari (八雲紫, purple). Ran is used as project name here because Ran is relatively like a computer.
I think the basic features of a STG game have been implemented, including entrance/game interfaces, bullet drawing and shooting, judge of player and enemy damage, high/low speed change, life/bomb counting, so at least it is runnable. But many things should be improved, including better art, game story, enemy characters, and better animations, like player start or bombing effect in 東方永夜抄. The animations look primitive now. It takes me many time and code to draw simple animation like circle animations at speedchange event.
The basic object for drawing things is shape. Then a bullet_array helps manage an array of shapes (bullets) shoot by player and enemy. A player or enemy has-a shape to represent themselves and a bullet_array to represent the bullets they shoot. A arena_game maintains currently active enemies, invoke player and enemy to draw and judge bullet damage. A game either has-a arena_game or a arena_text (which displays text on screen) depending on the story.