Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radioactive Game Object onto Map #236

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

khalludi
Copy link

It should be adding the Radioactive Obstacle onto the map from the World Creation Listener event. I don't think the Radioactive Obstacle has artwork, so it doesn't actually display on the map. Makes progress on issue #135.

Questions I have:

  • Where can I look to see artwork being displayed on the map?
  • How do I decipher the world in the logs? For example, the RadioactiveObstacle has a MAP_INFO of 0x0A01 and it should be currently displayed. How can I tell if it is there in the following log?
F8 41 00 01 F8 09 00 04 F8 41 00 02 F8 8C 00 57 F8
0E 02 2B F8 8C 00 53 F8 0E 02 31 F8 8C 00 41 F8 0E
02 3D F8 8C 00 44 F8 0E 02 37 F8 8C 00 45 F8 0E 02
43 F8 8C 00 49 F8 0E 02 49 F8 8C 00 43 F8 0E 02 53
F8 8C 00 46 F8 0E 02 59 F8 41 00 00 F8 09 00 04 00
00 F8 81 00 00 F8 09 00 01 F8 0A 02 26 F8 81 00 02
F8 09 00 01 F8 0A 02 26 F8 81 00 01 F8 09 00 01 F8
0A 02 26 F8 81 00 03 F8 09 00 01 F8 0A 02 26 F8 41
00 02 F8 09 00 05 F8 0A 02 26 F8 41 00 01 F8 09 00
06 F8 41 00 01 F8 09 00 09 F8 0A 02 26 F8 41 00 00
F8 09 00 06 F8 0A 02 26 F8 81 00 01 F8 41 00 01 F8
09 00 02 F8 0A 02 26

@khalludi
Copy link
Author

Sorry, it seems to have included the commits from the other branch. I don't know how to not include the previous commits on this new branch. Hopefully it'll remove the redundant ones when the other PR is merged.

@simon987
Copy link
Owner

 Hopefully it'll remove the redundant ones when the other PR is merged.

Yes don't worry this will get sorted out

Where can I look to see artwork being displayed on the map?

Right now there are no sprites associated with the object, I will need to create those before you can see them on the map. For now you can login and type DEBUG=true in your browser console, you should be able to see the new objects

How can I tell if it is there in the following log

Take a look at the lidar specs: https://github.com/simon987/Much-Assembly-Required/wiki/(Hardware)-LiDAR, IIRC you should be able to see a '0A' if the obstacle is there (the '01' means the tile is blocked)

// of radioactive objects, set the desired amount of radioactive objects to the
// plain tile count
TileMap m = world.getTileMap();
int plainCount = 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This exact code block is used twice, we should extract it into its own function (e.g. WorldUtils.countTiles(int tileId))

public class RadioactiveWorldUtils {

/**
* Generate a list of biomass blobs for a world
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RadioactiveObstacle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants