It took a few hours and I had to rewrite the code for doors, but I've got keys and locks working. A major part of any metroidvania is exploring new areas and finding some kind of impassable barrier - a wide pit, a wall of metal blocks, a force field, etc. It's only later when you find some new ability or item - double jump, rocket launcher, field disabler, etc - that you can go past the barrier to a new region. You can abstract this idea of obstacles and items as "locks" and matching "keys". In one game the "red locks" and "red key" might represent actual locked doors and a key, in another game they might be security cameras and a disguise, and in another game they might be tall walls and the ability to climb walls.
You can see the locks and keys in my latest update. The icons are ugly and hard to distinguish, but it's just for example and will be redone many times before the project is over. Consider this the "alpha version" artwork.
[I just noticed that sometimes the first room in a region doesn't connect to the other rooms. A bug I just fixed when I redid that code for my latest work.]
when visiting a region for locks and keys:
place an unused key
put the matching lock on one door to each unvisited adjacent region
any unlocked doors to adjacent regions are added to a "to do" list
visit each unvisited adjacent region
after visiting all regions for locks and keys:
for each unlocked door on the "to do" list, put a random used lock
This ensures that each region has a key that you need to proceed to the neighboring regions. Although; since each region can connect with its neighboring regions multiple times, it's theoretically possible that getting the first key would be enough to explore all regions.
Compile and Execute Java Online - Try and experience the best cloud computing where you can edit, compile, ... Compile Preview | Execute | Share Code.
Sunday, October 30, 2011
Randomized metroidvania 04: map keys and locks
Subscribe to:
Post Comments (Atom)
Popular Posts
-
This tutorial will be written in Java since I'm familiar with it and it's a decent enough language, has many tools and libraries, a ...
-
Announcing hspec - BDD for Haskell I've long been interested in Behavior Driven Design and it's something that is strangely missing ...
-
Pro form comment for blogger [FD's BlOg] - Chúng ta có lẽ khá quen với form comment của blogger , với tính năng hiển thị thời gian comm...
-
Related Posts Widget for Blogger / Blogspot (using CSS + Java) [FD's BlOg] - Tiện ích cho phép hiển thị các bài viết liên quan (có cùng...
-
[FD's BlOg] - Đây là một trong những thủ thuật cơ bản để trang trí cho blog của bạn. Ví dụ như chèn banner flash cho header hoặc cho fo...
-
Widget Recent Posts Using jQuery [FD's BlOg] - Sau một lần lục lọi, tìm kiếm trên mạng được một hiệu ứng từ jQuery , mình đã quyết định...
-
Add emoticons to comment form and Show/Hide tab emoticon [FD's BlOg] - Thủ thuật này có lẽ khá quen thuộc với nhiều người, tuy nhiên một...
-
Đáp ứng yêu cầu của giáo xứ phú giáo , trong nhưng ngày đầu năm này có lẽ anh Dũng cũng bận cho việc ... Va lung tung .. Không có thời gian...
-
Khi khai báo các tham số hình thức bên trong hàm. Nếu các tham số đó được gán giá trị mặc định, thì khi gọi hàm, chúng ta sẽ có một vài các...
-
www.fandung.com [FD's BlOg] - Sau gần 1 năm khởi tạo, và gần nửa năm chính thức hoạt động với nội dung chính là viết về thủ thuật cho b...
No comments:
Post a Comment