Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Making tetrominos
Post: RE: Making tetrominos

See, to me tetrominoes and minos should only know how to rotate and shift position. Neither of them should know about the field. import math import random from pyglet.shapes import Rectangle from py...
ragoo Game Development 11 2,792 Sep-26-2023, 07:13 PM
    Thread: Making tetrominos
Post: RE: Making tetrominos

Hold on, it's probably better to post the whole code structure at this point. This is main.py: import pyglet import settings from colored_window import ColoredWindow from fixed_resolution import Fi...
ragoo Game Development 11 2,792 Sep-19-2023, 11:49 AM
    Thread: Making tetrominos
Post: RE: Making tetrominos

Okay, thanks, it works perfectly. I've made a few changes: import math import random from pyglet.shapes import Rectangle from pyglet.math import Vec2 import settings class Mino(Rectangle): ...
ragoo Game Development 11 2,792 Sep-18-2023, 10:09 AM
    Thread: Making tetrominos
Post: RE: Making tetrominos

But where do I store the data? In the shape module? What if I use the simple factory pattern instead? from pyglet.math import Vec2 from mino import Mino standard_wall_kick_data = { 0: { ...
ragoo Game Development 11 2,792 Sep-16-2023, 01:09 PM
    Thread: Making tetrominos
Post: RE: Making tetrominos

The thing is I'm more of a fan of modern Tetris, which means the Standard Rotation System, or Super Rotation System (SRS). https://tetris.fandom.com/wiki/SRS The SRS has pretty strict rules when it ...
ragoo Game Development 11 2,792 Sep-15-2023, 06:28 PM
    Thread: Making tetrominos
Post: Making tetrominos

Hi. I don't think this is really a game development problem, it's more of a design problem best I can tell. I've written a base Tetromino class that is functional for every possible shape: class Tet...
ragoo Game Development 11 2,792 Sep-15-2023, 11:00 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020