This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcade | |
import math | |
from dataclasses import dataclass | |
from typing import Callable | |
from typing import Tuple | |
SPRITE_SCALING = 0.5 | |
SCREEN_WIDTH = 800 | |
SCREEN_HEIGHT = 600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
""" | |
import arcade | |
WIDTH = 800 | |
HEIGHT = 600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Sprite Collect Coins | |
Simple program to show basic sprite usage. | |
Artwork from http://kenney.nl | |
If Python and Arcade are installed, this example can be run from the command line with: | |
python -m arcade.examples.sprite_collect_coins | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import arcade | |
import os | |
import pyglet | |
import pyglet.gl as gl | |
# --- Constants --- | |
SPRITE_SCALING_PLAYER = 0.5 | |
SPRITE_SCALING_COIN = .25 | |
COIN_COUNT = 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import moderngl | |
from moderngl_window import geometry | |
from ported._example import Example | |
from pathlib import Path | |
import os | |
class SimpleColorTriangle(Example): | |
gl_version = (3, 3) | |
aspect_ratio = 16 / 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
import time | |
import ctypes | |
LIST_SIZE = 100_000 | |
CYCLE_COUNT = 100 | |
def test_native(): | |
my_list = [0 for i in range(LIST_SIZE)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
from typing import TypeVar | |
import time | |
import collections | |
import math | |
import random | |
from PIL import Image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
from typing import TypeVar | |
import time | |
import collections | |
import math | |
import random | |
from PIL import Image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
from typing import TypeVar | |
import time | |
import collections | |
import math | |
import random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Iterable | |
from typing import TypeVar | |
from typing import Generic | |
""" | |
This is the API section. | |
The user should not be changing this part of the code. | |
""" | |
NewerOlder