基本的にこちらの資料に従います https://siv3d.github.io/ja-jp/download/windows/
基本的にこちらの資料に従います https://siv3d.github.io/ja-jp/download/macos/
examples/empty/empty.xcodeproj
をXCodeで開く以下の2ファイルを作りましょう
index.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>game</title>
</head>
<body>
<canvas id="main" width="640" height="480" style="border: 1px solid;"></canvas>
<script src="./script.js"></script>
</body>
</html>
script.js
const canvas = document.getElementById("main");
const ctx = canvas.getContext("2d");
function update() {
window.requestAnimationFrame(update);
}
window.requestAnimationFrame(update);
pip install pygame
でPyGameをインストール以下のソースコードをgame.py
など適当な名前で保存
import pygame
import sys
pygame.init()
screen = pygame.display.set_mode((640, 480))
while (1):
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
python (ファイル名).py
として実行、何もないウィンドウが出ればOK以下のソースコードを入力し、左上のボタンをクリックして実行
void setup() {
size(640, 480);
}
void draw() {
}
何もないウィンドウが出ればOK