Implementation Cities

SuperSnark

Lore Master
Contributor
Design
Art
This is really cool stuff! We are on our way to cities and kingdoms! If nothing else, this is exactly the kind of thing we need for the enemy towers and home base castle for L&S Phase 1.
 

msteiger

Active Member
Contributor
World
Architecture
Logistics
glasz: Above all, I need bright color blocks for debugging - bright orange, bright blue, black - easily distinguishable ... what other colors are there?

What I would like to have is more medieval kingdom blocks such as different stone and wood types
* dark/bright stone wall,
* wooden planks / roof tiles
* doors, windows
* other material types you need for building a kick-ass castle with walls and towers around it ...

Cervator just gave me the hint that the Signalling project contains some nice assets (fences for example) ..
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Well, fences are in Fences, but yeah, there are some assets and assorted shaped blocks all over the modules, yeah :D
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
For simple colors, just put a 16x16 or whatever texture of that color into a blockTiles/auto folder and you will get a simple block of the same name.

Also feel free to make use of the various shapes we have like slopes - mostly just need to create a block uri with the correct shape uri at the end (e.g. "core:stone:engine:stair").
 

msteiger

Active Member
Contributor
World
Architecture
Logistics
Thanks, I will try that out ...

The latest screenshot shows a small village consisting of simple housings with three different roof types (saddle, hip and dome).
Floor levels are flattened, where necessary.



Next thing I will try is to add a fence around the buildings. Can you guys tell me how to get rotated blocks? Through the BlockFamily class maybe?
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Very nice!

I'm not sure we've ever placed blocks with specific facing through generation before - other than maybe with the generated buildings Skaldarnar did, I don't remember if those had doors (but am thinking no?)

When placed by a player the facing is determined based on how the player is facing. With no player ... I dunno! Immortius ?

Fences might be affected likewise since normally the particular shape being used is updated after an adjacent piece of fence is placed by a player (triggering an event)
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
In theory fences and such should automatically connect up as "placed", but don't know if that works at the moment through generation. If I or someone else ever get around to improving this to happen during chunk tessellation where possible then it certainly would be the case.

Otherwise... yes, through BlockFamily, or else through knowing the exact uri of the block (would end with .left and so forth, kind of messy to work that way though).

The getBlockForPlacement() method allows you to get a rotation of a block, given some hints and the current state of the world. The current state bit may be problematic during world generation though. Might need to have a second version of this. Other than that the two pieces of information used are:
* Side attachmentSide - The side of a block the new block is being attached to. Typically the ground, I would imagine. For a torch it would be the side of a wall. This corresponds to the surface the player is targeting.
* Side direction - A secondary direction hint for where the block should face. This corresponds to the primary direction the player is facing.

How these hints are used depends on the block family, but for slopes and stairs attachment side determines rotation if it is a wall, and the facing direction is used otherwise.
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
I did not use slopes, stairs, doors, ... yet for building generation, mainly because I don't wanted to hit this rotation issues ;)
 

msteiger

Active Member
Contributor
World
Architecture
Logistics
I fought my way through and did the placement myself. This is what it looks like right now:


It was quite cumbersome to get the placement direction right for all block types (corner and straight - glasz are there gates yet?). I will try to create a general class based on the fence-placement code to make things easier in the future.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
I thought we had a fence gate, but on looking I cannot actually find one or any code to allow the user to trigger it open/close with 'e'

It should be fairly simple to do though, it is just a combination of the door functionality (with only one block so easier) and the fence-connecting system (adjust to adjacent blocks). We might need a new shape or two for open/closed fence gates though.
 

msteiger

Active Member
Contributor
World
Architecture
Logistics
Say hello to Mr. Bresenham!!



This was created using javaGeom which is not (yet?) part of the TS dependency tree. It needs some brushing here and there, but I think we're getting somewhere ...
 

msteiger

Active Member
Contributor
World
Architecture
Logistics
Thanks for the motivation @all! I've added gates to the town walls:

Towers are placed close to intersecting roads and gates bridge the gap across the road. The placement is fine, they just don't look very good in the 3D view - this is why I post the debug renderer picture here :p
If anyone is interested in tweaking the code, you can find it in GateWallSegmentRasterizer.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Very nice! I'm still amazed at how fast this topic has advanced, seeing the city wall in-game in a screenshot and now that cool map makes me very happy! If we can get this far this fast I wonder how it'll look in another month or two :D
 

msteiger

Active Member
Contributor
World
Architecture
Logistics
Glad to hear that! Unfortunately, I have to go back to work on Jan 2nd - not sure how fast progress will be after that. Maybe this explain why I'm working that fast at the moment :)
 

msteiger

Active Member
Contributor
World
Architecture
Logistics
Adding infrastructure to support more details to individual buildings such as windows, etc.

 

msteiger

Active Member
Contributor
World
Architecture
Logistics
More details for SimpleChurch: aisles at the sides of the nave with different roof types and windows in the bell tower:

 
Top