Minor code error on the wiki

chapp007

New Member
Contributor
I apologize if you guys already know about this but I was following along with the wiki tutorial on Facet Production for 1.x and hit a compiler error in the SurfaceProvider class. The wiki states the following code snippet:

Code:
   // loop through every position on our 2d array
        Rect2i processRegion = facet.getWorldRegion();
        for(Vector2i position : processRegion) {
            facet.setWorld(position, 10f);
        }
I changed my code to the following which seems correct:
Code:
        for(BaseVector2i position : processRegion.contents()){
            facet.setWorld(position, 10f);
        }
Apparently Rect2i used to implement Iterable<Vector2i> but doesn't any longer. Not a big deal but beginners may stumble.

The wiki page I'm referring to is at https://github.com/Terasology/TutorialWorldGeneration/wiki/1.x-Facet Production.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Thanks for finding that, was unaware. So long as you have a GitHub user account you should be able to edit in the fix, please go ahead :)

In fact it is probably about time to clean up that wiki a bit and delete the pages for outdated versions of the engine, simplifying the names for the current pages (1.x-Facet Production -> Facet Production). Up for doing that? We could always use the assistance, especially if you'd like to work with the world gen framework itself (could update the wiki and tutorial module as you go along). Let me know if you'd like full access to the module.
 

chapp007

New Member
Contributor
Sure. I just made the one change. I'll get the other things you mentioned done as well.

Yes I would like access. My github account is https://github.com/jchappelle.

By full access do you mean no pull requests will be necessary and I'll be able to commit to master for that module? I'm not a Git expert so I'm just trying to make sure I understand.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Thanks! :) And fully agreed on documentation!

I just added you to a team under the https://github.com/Terasology org on GitHub, you should be able to accept the invite at that URL. Then you should indeed have commit rights directory to that module. Small stuff can be shoved straight into master, more controversial stuff can be put in a separate branch. For anything needing review you can still use PRs since they're neat and handy (either from a branch inside the repo or even a fork if you want - no real need when you can just make branches)

Let me know if that works!
 

oniatus

Member
Contributor
Architecture
We could also add an introduction about the basic concepts to the wiki. For example, the 2D-Facets can be very tricky (see #2458).

This was one issue I had, when starting to play with world-generation: I had no idea what a rasterizer, facet or or generating region was :D
 

chapp007

New Member
Contributor
@Cervator, Thanks I just joined.

@oniatus, I totally agree. I think my interest in the project really grew when the light bulb came on for me. I think a high level description the interaction between Facet, FacetProvider and WorldRasterizer would be very helpful for newcomers. It's really a cool architecture. I may submit some PRs with some added javadoc as well. Some(like me) may dig into the code before the wiki.
 
Top