Skip to main content

pygame framework

Project description

pygamefwk

pygame physics의 물리 계산없고 Scene 저장 능력이 상승된 버전.

초기 맵 JSON 예시

기본 구조

{
  "setting": {
    "tile": [
      ["tileset", false, ["assets/tile1.png", "assets/tile2.png", "assets/tile3.png"], 48]
    ],
    "surface": [
      ["surfaces", false, ["assets/surface1.png", "assets/surface2.png"], 1.0]
    ],
    "sprite_sheet": [
      ["player_sprites", true, "assets/player_sheet.png", 32, 16, 32],
      ["enemy_sprites", false, "assets/enemy_sheet.png", 64, 6, 64]
    ]
  },
  "objs": [
    {
      "GameObject": [
        {
          "name": "main_cam",
          "layer": 0,
          "tag": "camera",
          "visible": true,
          "position": [0, 0],
          "rotation": 0,
          "parent_name": "parent",
          "scale": 1.0
        }
      ]
    }
  ]
}

완전한 예시 (복사 붙여넣기용)

{
  "setting": {
    "tile": [
      ["tileset", false, ["assets/tiles/grass.png", "assets/tiles/stone.png", "assets/tiles/water.png"], 1.0]
    ],
    "surface": [
      ["surfaces", false, ["assets/surfaces/player.png", "assets/surfaces/enemy.png"], 1.0]
    ],
    "sprite_sheet": [
      ["player_sprites", true, "assets/sprites/player_sheet.png", 32, 16, 1.0],
      ["enemy_sprites", false, "assets/sprites/enemy_sheet.png", 64, 6, 0.5]
    ]
  },
  "objs": [
    {
      "GameObject": [
        {
          "name": "main_cam",
          "layer": 0,
          "tag": "camera",
          "visible": true,
          "position": [0, 0],
          "rotation": 0,
          "parent_name": "parent",
          "scale": 1.0
        }
      ]
    },
    {
      "Player": [
        {
          "name": "player",
          "layer": 1,
          "tag": "player",
          "visible": true,
          "position": [400, 300],
          "rotation": 0,
          "parent_name": "parent",
          "scale": 1.0
        }
      ]
    },
    {
      "Enemy": [
        {
          "name": "enemy1",
          "layer": 1,
          "tag": "enemy",
          "visible": true,
          "position": [200, 200],
          "rotation": 0,
          "parent_name": "parent",
          "scale": 1.0
        },
        {
          "name": "enemy2",
          "layer": 1,
          "tag": "enemy",
          "visible": true,
          "position": [600, 400],
          "rotation": 0,
          "parent_name": "parent",
          "scale": 1.0
        }
      ]
    }
  ]
}

JSON 구조 설명

setting 섹션

  • tile: 타일 이미지들 (개별 파일)
    • [name, is_hits, [paths...], scale]
  • surface: 서피스 이미지들 (개별 파일)
    • [name, is_hits, [paths...], scale]
  • sprite_sheet: 스프라이트 시트 (하나의 파일에서 분할)
    • [name, is_hits, path, tile_size, count, scale]

objs 섹션

  • 각 객체 타입별로 그룹화
  • 각 객체는 다음 속성을 가짐:
    • name: 객체 이름 (고유해야 함)
    • layer: 레이어 번호 (0-9)
    • tag: 태그
    • visible: 보이기 여부
    • position: 위치 [x, y]
    • rotation: 회전 각도 360 degree
    • parent_name: 부모 객체 이름 (없으면 "parent")
    • scale: 크기 배율 [x, y]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygamefwk-1.1.1.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygamefwk-1.1.1-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file pygamefwk-1.1.1.tar.gz.

File metadata

  • Download URL: pygamefwk-1.1.1.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for pygamefwk-1.1.1.tar.gz
Algorithm Hash digest
SHA256 331265acca690fe484370bd04a5b9af8c6c9a22f30a4730d3d43d022da57a557
MD5 4f14a7d588185e0f664bd426ab683251
BLAKE2b-256 9128fe664b868fdb778063cbafa8c5ee2a17ba96f82d82a81300b1549d8830a6

See more details on using hashes here.

File details

Details for the file pygamefwk-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: pygamefwk-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 38.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for pygamefwk-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 849053dbea1fa42b8d925115318e1e449ae6f95e82384696de3e72d140bc79c6
MD5 38639d8e209177825f991bb8eecfa884
BLAKE2b-256 6b36737cf420f45f02bd37e45a1f42049ba1991bb617a6cca8ed209b401af6dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page