Blocks

metouto

Active Member
Contributor
Art
Here are the images Cerator....

And a small question .... I have redone the tnt block .... but have added one image for bottom .... and another image for the top ... but we have not had those images before ... so, I need to know how to put them in ... if it is a different way than we do blocks we now have???

And I guess that leads me to another question ... is there a need to have a bottom ... I made it because of some of the other texture packs I have been looking at have this ... and I thought it might be of need sometime down the road :)

And this leads me to a 3rd question ... have images that have more than 4 sides to them images to them are they made differently than reg. blocks??? I have see where water and lava have 7 images to them :?
 

Attachments

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Hmm, so now the question is why they don't show up in a local world when replacing normal files by the exact same name.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Got em to work :)

Looks quite distinct, but may also illustrate the issue with repeating patterns when many blocks are next to each other.

Reminds me about the idea of including multiple versions of each texture to "shake it up" a bit to help break up patterns like that.
 

Attachments

Exile

New Member
Contributor
Art
You want seamless textures! There's a couple programs out there that will re-sample and generate multiple versions of your textures, so that they seamlessly integrate when put next to each other.
 

metouto

Active Member
Contributor
Art
I had thought about making 3 different dirt block while making that one and now with that picture I see that the very top band of my block does not match up with the grass top every well :( may need to re do that a little ??? Maybe take the grass top green and add it to my top band where the lightest green is ????

If Exile thinks seamless textures would make it look better I would be willing to try that if I could learn how ...maybe we could use a combination of both to make things look really distinct ???

Yes I would like to see Linkies also please :)
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
Wang Tiles?

I implemented this for Goblin Camp, but it requires quite a few tiles to really work.

And a small question .... I have redone the tnt block .... but have added one image for bottom .... and another image for the top ... but we have not had those images before ... so, I need to know how to put them in ... if it is a different way than we do blocks we now have???
Which textures are used by each block for which sides is defined in the block's definition - these are the files that appear in src\org\terasology\data\blocks\definitions. If you look at Grass.groovy, for instance, it has a section like so:

Code:
    // Graphics
    faces {                     // "faces" being present means we'll override some
        sides = "GrassSide"     // sides means all four (not top/bottom)
        bottom = "Dirt"
    }
The top will use an image with the same name the block ("Grass") as it hasn't otherwise been overridden.
 

Kai Kratz

Witch Doctor
Contributor
Architecture
Logistics
Immortius said:
Wang Tiles?

I implemented this for Goblin Camp, but it requires quite a few tiles to really work.

And a small question .... I have redone the tnt block .... but have added one image for bottom .... and another image for the top ... but we have not had those images before ... so, I need to know how to put them in ... if it is a different way than we do blocks we now have???
Which textures are used by each block for which sides is defined in the block's definition - these are the files that appear in src\org\terasology\data\blocks\definitions. If you look at Grass.groovy, for instance, it has a section like so:

Code:
    // Graphics
    faces {                     // "faces" being present means we'll override some
        sides = "GrassSide"     // sides means all four (not top/bottom)
        bottom = "Dirt"
    }
The top will use an image with the same name the block ("Grass") as it hasn't otherwise been overridden.
Hmm aren't Wang-Tiles only working for planar surfaces?
 

metouto

Active Member
Contributor
Art
Cervator said:
Got em to work :)
Could you explain so I know how and was it something I did wrong in making them :oops:


Cervator said:
Looks quite distinct, but may also illustrate the issue with repeating patterns when many blocks are next to each other.
Yes, I understand about repeating patterns a little better now.

@ Immortius .... what I understand from your post is .....


And a small question .... I have redone the tnt block .... but have added one image for bottom .... and another image for the top ... but we have not had those images before ... so, I need to know how to put them in ... if it is a different way than we do blocks we now have???
Which textures are used by each block for which sides is defined in the block's definition - these are the files that appear in src\org\terasology\data\blocks\definitions. If you look at Grass.groovy, for instance, it has a section like so:

Code:
    // Graphics
    faces {                     // "faces" being present means we'll override some
        sides = "GrassSide"     // sides means all four (not top/bottom)
        bottom = "Dirt"
    }
The top will use an image with the same name the block ("Grass") as it hasn't otherwise been overridden.[/quote]

..... that I should look here src\org\terasology\data\blocks\definitions and what is in there are the only faces I need to be worried about in my making of blocks right?


So, then if I use these for TnT the only ones that the game (as it stands now) would use is the last one and to use the other two you would have to rewrite it's file here src\org\terasology\data\blocks\definitions and then that is add to ever ones work load because I can't code ????


EDIT ... I went to .... src\org\terasology\data\blocks\definitions .... and found no definition for TnT :?
 

Attachments

Kai Kratz

Witch Doctor
Contributor
Architecture
Logistics
Well you are actually quoting Immortius post ^^
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
We actually have a few more textures than we have actual blocks, heh, sort of went on a copy paste rampage with Stuthulhu a while back, just arbitrarily copying out textures from the terrain.png without making block objects for all of them... :)

Making a TNT block would be extremely easy.

1) Find an existing block that seems similar - for TNT I'd recommend Snow at /org/terasology/data/blocks/definitions/Snow.groovy as it has custom faces but is still a plain boring block at the right path (unlike Grass, which is a Plant)
2) Clone the file within IntelliJ - super easy. Right click Snow.groovy -> Refactor -> Copy, enter new name (stays at the same path)
3) Update the comment at the top of the file
4) Change the faces - Tnt.groovy would automatically use Tnt.png for everything, so you only need to override top and bottom
4a) Change sides = "SnowSide" to top = "TntTop"
4b) Change bottom = "Dirt" to bottom = "TntBottom"

On creating a new world now the re-generated block + image manifest should now contain a TNT block. Since it doesn't occur naturally you'd have to use the console to grant yourself some example blocks, but it should work otherwise :)

To get the dirt/grass blocks working I simply saved them straight from the post to my dev directory, the images turned blue in IntelliJ, I ran the game with no SAVED_WORLDS and it worked. Not sure what is keeping yours from working, but try to see if you can make the TNT block work
 

metouto

Active Member
Contributor
Art
I will let you know how it goes ;)

As a side note ....

metouto said:
I had thought about making 3 different dirt block while making that one and now with that picture I see that the very top band of my block does not match up with the grass top every well :( may need to re do that a little ??? Maybe take the grass top green and add it to my top band where the lightest green is ????

If Exile thinks seamless textures would make it look better I would be willing to try that if I could learn how ...maybe we could use a combination of both to make things look really distinct ???

Yes I would like to see Linkies also please :)
Would you want to go with creating 2 more dirt.png blocks to brake up the ground look or do you want to try Exile's suggestion on seamless textures when he gives some links ??? I would be will to try but at the moment know nothing about seamless textures :oops:

Also what about that top row of colors what is everybody's thought on the way they look ... should I change them to maybe look more like top grass by changing the lighter green colors in that row to top grass colors ???
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
I actually like the "richer" green in the edge grass blocks. You might try tweaking the Grass.png to a more emerald green to see how that looks.

Texture variants are probably a "down the road" kind of item since we don't have any sort of system to support that yet. The link on Wang Tiles (awesome name, btw - link from earlier goes to http://http.developer.nvidia.com/GPUGem ... ter12.html and is pretty informative) is very informative, but takes work to implement :)

So I'd just focus on replacing existing textures and making new ones (like TNT) :)
 

metouto

Active Member
Contributor
Art
OK ....

I have put in the Tnt blocks and ran intellij clicked on green button to get it to run and I got to the black screen coming up and then it went away with no game start :(


This is what I put in scr/org.terasology/data/block/definitions/plant/Tnt.groovy .....

/*
* Copyright 2011 Benjamin Glatzel <benjamin.glatzel@me.com>.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.terasology.data.blocks.definitions

/**
* Snow is a Dirt block covered by Snow, just like grass.
* Unlike Grass, it might be possible to have a SnowBlock as well
*/
block {
version = 1
shape = "cube"

faces {
sides = "TntSide"
bottom = "TntBottom"
}
}


And in scr/org.terasology/data/block/image ....

Tnt.png

TntBottom.png

TntTop.png

and all have images when clicked on



So, what have I done wrong or maybe not do that I should have ???
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Files look fine. Did you delete SAVED_WORLDS? You can hit crash issues when a saved world goes out of whack with the block definitions.

The exact reason should hopefully be logged in the IntelliJ console window at the bottom after the crash. Look for something that says error or otherwise looks out of place (doesn't occur on a normal execution)
 

metouto

Active Member
Contributor
Art
I am so :oops: :oops: :oops: :oops: I know to delete that saved world but I did forget to do it :oops: :oops: :oops:

But that did not help me any yet .... and it will not let me make an attachment of what the IntelliJ console window said and it is 20 pg. long and ALL greek to me :(

are red lines bad ????
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Yes and no, a lot of the output logs red normally. If you can just copy paste the last 10-20 lines or so from the console to here that might do it :)
 

metouto

Active Member
Contributor
Art
This is the only thing that I saw that might give a clue ...

groovy.lang.MissingMethodException: No signature of method: org.terasology.model.blocks.management.SimpleBlockLoader.calcAtlasPositionForId() is applicable for argument types: (null) values: [null]
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:78)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.terasology.model.blocks.management.SimpleBlockLoader$this$2$calcAtlasPositionForId.callCurrent(Unknown Source)
at org.terasology.model.blocks.management.SimpleBlockLoader.configureBlock(SimpleBlockLoader.groovy:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:267)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
at org.terasology.model.blocks.management.SimpleBlockLoader.loadBlock(SimpleBlockLoader.groovy:28)
at org.terasology.model.blocks.management.BlockLoader$loadBlock.call(Unknown Source)
at org.terasology.model.blocks.management.BlockManifestor$_loadBlockDefinitions_closure2.doCall(BlockManifestor.groovy:185)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1392)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349)
at org.codehaus.groovy.runtime.dgm$142.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.terasology.model.blocks.management.BlockManifestor.loadBlockDefinitions(BlockManifestor.groovy:176)
at org.terasology.model.blocks.management.BlockManifestor$loadBlockDefinitions.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
at org.terasology.model.blocks.management.BlockManifestor.loadConfig(BlockManifestor.groovy:141)
at org.terasology.model.blocks.management.BlockManager.loadBlocks(BlockManager.java:62)
at org.terasology.model.blocks.management.BlockManager.<init>(BlockManager.java:57)
at org.terasology.model.blocks.management.BlockManager.getInstance(BlockManager.java:50)
at org.terasology.game.Terasology.initManagers(Terasology.java:214)
at org.terasology.game.Terasology.init(Terasology.java:102)
at org.terasology.game.Terasology.main(Terasology.java:465)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Process finished with exit code -1
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Ah-hah! That's actually exactly what we need. I'll probably need to try tinkering with it at home tonight though.

Could you also paste in the few lines from right above that? Might also be helpful :)
 
Top