TileSet loading

Đang mở
#131 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@mcgivrer đang làm issue này rồi.

Từ ngày 21/12/2021.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

documentation enhancement

Load a TileSet from the level map file to create corresponding Tile's and mapping.

TileSet = Tiles définition picked from an image

A SAmple TileSet class to understand what the challenge is:

class TileSet {
  Map <Code,Tile> tiles
  Image pixelsImage
}

In the level file test-level-tileset.lvl:

{
'name':'test-level-tileset',
'tileSets': [
  { 'id':'t01',
    'name':'myTileSet',
    'pixelsImage':'images/tiles/tiles01.png',
    'tiles':[
      {'code':'b','pos':(0,32),'size':(16,16),attributes:{'block':true}},
      {'code':'o','pos':(32,32),'size':(16,16),attributes:{'collectible':true,'money':5}},
      {'code':'n','pos':(64,0),'size':(16,16),attributes:{'collectible':true,'energy':20}}
    ]
 }]
}

The Use Case is:

Feature: Loading a Level

  The `LevelLoader` service is dedicated to load objects from a level file and initialize all corresponding entities.

  Scenario: 01- loading a TileSet
    Given the LevelLoader is instanciated
    And the level file "test-level-tileset.lvl" is loaded
    Then a level named 'test-level-tileset' is defined
    And a TileSet with 3 Tiles is created
    And the Tile with code 'b' has a 'block' attribute
    And the Tile with code 'o' has a 'collectible' attribute
    And the Tile with code 'n' has a 'collectible' attribute
Ngôn ngữ chính
Java
Star
1
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của mcgivrer/fromClassToGame

Tất cả issue của mcgivrer/fromClassToGame

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.