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

First Person Rendering without OpenGL #2141

Merged
merged 4 commits into from Feb 6, 2016

Conversation

Projects
None yet
4 participants
@Josharias
Contributor

Josharias commented Jan 21, 2016

Part 2 of the mission to slim down the logic bits in the engine that will result in a more maintainable engine codebase.

  • Rework hand animation to use timestamps that can be replicated to other clients.
  • Introduce a cooldown time on items to provide more item customization.
  • Default meshing of items is triggered by the presence of a component. This also allows for easy rendering in the world as adding a location to an item will cause it to be rendered in the world.
  • Add missing location linking parameter for scaling children with their parent.
  • Add the Held Item Mount Point components to aid in attaching held items in front of the player's camera.
  • Animate the Held Item Mount Point on item use.
  • Add a component to control the rotation, location, and scale of an item as it is displayed in the first person view.
  • Add a hand entity for when a character is holding Entity.NULL.
  • Add commonly used code to add or save a component.

Things to look out for:

  • Loading from save game revives the rendered item
  • Seeing the top of the hand mesh
  • Thrown items not rendering
  • Any weird states in multiplayer

Todo Before Merging:

  • Fix loading from save game, the initial held item does not display until you switch held item back and forth.
  • Identify the problems with items in MOO and LightAndShadow
  • Reduce the chance of "machine-gun speed digging"
  • Throwing items from a stack are still displayed at the held item mount point.
  • Fix the mount point commands to appropriately set the description
  • Investigate and fix sandboxing error
  • Investigate problem with throwing aces in LaS.
  • Identify and fix anything related to "Some stuff was rendered while thrown, not other stuff"
  • Blocks do not get meshes when reloading the game (specially odd in multiplayer)
Rework hand animation to use timestamps that can be replicated to oth…
…er clients.

Introduce a cooldown time on items to provide more item customization.
Default meshing of items is triggered by the presence of a component.  This also allows for easy rendering in the world as adding a location to an item will cause it to be rendered in the world.
Add missing location linking parameter for scaling children with their parent.
Add the Held Item Mount Point components to aid in attaching held items in front of the player's camera.
Animate the Held Item Mount Point on item use.
Add a component to control the rotation, location, and scale of an item as it is displayed in the first person view.
Add a hand entity for when a character is holding Entity.NULL.
Add commonly used code to add or save a component.
@GooeyHub

This comment has been minimized.

Show comment
Hide comment
@GooeyHub

GooeyHub Jan 21, 2016

Member

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/407/
Hooray Jenkins reported success with all tests good!

Member

GooeyHub commented Jan 21, 2016

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/407/
Hooray Jenkins reported success with all tests good!

@Josharias

This comment has been minimized.

Show comment
Hide comment
@Josharias

Josharias Jan 21, 2016

Contributor

Hrm, I did not yet fix the reloading world scenario. The selected item does not show up as expected. Ill fix this issue in the next couple days.

Contributor

Josharias commented Jan 21, 2016

Hrm, I did not yet fix the reloading world scenario. The selected item does not show up as expected. Ill fix this issue in the next couple days.

@Cervator Cervator added this to the v1.0.0 milestone Jan 22, 2016

@Cervator

This comment has been minimized.

Show comment
Hide comment
@Cervator

Cervator Jan 22, 2016

Member

Checked out the branch. Module breakage in WoodAndStone (uses itemComp.renderWithIcon in ItemSlotIngredientRenderer) but that looks to be it for compilation issues :-)

Runtime is another question. I got a weird and big error that looks like a change now runs afoul of the sandboxing somehow. Didn't crash the game though. And I ran with a mildly unusual combo of City World + MasterOfOreon which starts you with an unusual item. Item wasn't visible and for some reason I was getting machine-gun block breakage speed (huh). Actually kinda amusing to see how fast you can tunnel down!

Plain Cities alone didn't cause any issues, so it should be the item from MOO. JoshariasSurvival is fine. LightAndShadow also has custom items and got the stacktrace below with the first item not loading. The other items were OK and worked normally. Then the big double-block aces had icons in the toolbar, but not while held, and again caused the machine-gun speed digging. Kinda like they manage to escape the delay built into block breaking.

Eerie but kinda cool to have the disembodied held items.

Hit the reload game -> held item not rendered for just the two spawn blocks in L&S. Some stuff was rendered while thrown, not other stuff.

22:25:16.156 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered Block core:RedShroom with id 74
Unexpected exception
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.reflect")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457)
    at java.security.AccessController.checkPermission(AccessController.java:884)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    at org.terasology.module.sandbox.ModuleSecurityManager.checkPermission(ModuleSecurityManager.java:49)
    at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1564)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:311)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at ch.qos.logback.classic.spi.PackagingDataCalculator.<clinit>(PackagingDataCalculator.java:43)
    at ch.qos.logback.classic.spi.ThrowableProxy.getPackagingDataCalculator(ThrowableProxy.java:135)
    at ch.qos.logback.classic.spi.ThrowableProxy.calculatePackagingData(ThrowableProxy.java:144)
    at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:124)
    at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440)
    at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396)
    at ch.qos.logback.classic.Logger.error(Logger.java:559)
    at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:513)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.sendStandardEvent(EventSystemImpl.java:269)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:260)
    at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:145)
    at org.terasology.logic.characters.CharacterHeldItemSystem.onChangeHeldItemRequest(CharacterHeldItemSystem.java:42)
    at org.terasology.logic.characters.CharacterHeldItemSystemMethodAccess.invoke(Unknown Source)
    at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:506)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.sendStandardEvent(EventSystemImpl.java:269)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:260)
    at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:145)
    at org.terasology.logic.inventory.CharacterInventorySystem.syncSelectedSlotWithHeldItem(CharacterInventorySystem.java:63)
    at org.terasology.logic.inventory.CharacterInventorySystemMethodAccess.invoke(Unknown Source)
    at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:506)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.sendStandardEvent(EventSystemImpl.java:269)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:260)
    at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:145)
    at org.terasology.logic.inventory.InventoryUtils.putItemIntoSlot(InventoryUtils.java:395)
    at org.terasology.logic.inventory.InventoryAuthoritySystem.giveItemToSlots(InventoryAuthoritySystem.java:213)
    at org.terasology.logic.inventory.InventoryAuthoritySystem.giveItem(InventoryAuthoritySystem.java:321)
    at org.terasology.logic.inventory.InventoryAuthoritySystem.giveItem(InventoryAuthoritySystem.java:154)
    at org.terasology.logic.inventory.InventoryAuthoritySystemMethodAccess.invoke(Unknown Source)
    at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:506)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.sendConsumableEvent(EventSystemImpl.java:279)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:258)
    at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:145)
    at org.terasology.managerInterface.ManagerInterfaceSystem.createAndGiveItemToPlayerIfPossible(ManagerInterfaceSystem.java:80)
    at org.terasology.managerInterface.ManagerInterfaceSystem.onPlayerSpawn(ManagerInterfaceSystem.java:74)
    at org.terasology.managerInterface.ManagerInterfaceSystemMethodAccess.invoke(Unknown Source)
    at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:506)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.sendStandardEvent(EventSystemImpl.java:269)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:260)
    at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:145)
    at org.terasology.logic.players.PlayerSystem.spawnPlayer(PlayerSystem.java:250)
    at org.terasology.logic.players.PlayerSystem.update(PlayerSystem.java:93)
    at org.terasology.engine.modes.loadProcesses.AwaitCharacterSpawn.step(AwaitCharacterSpawn.java:47)
    at org.terasology.engine.modes.StateLoading.update(StateLoading.java:242)
    at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:414)
    at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:369)
    at org.terasology.engine.Terasology.main(Terasology.java:154)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.reflect")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457)
Member

Cervator commented Jan 22, 2016

Checked out the branch. Module breakage in WoodAndStone (uses itemComp.renderWithIcon in ItemSlotIngredientRenderer) but that looks to be it for compilation issues :-)

Runtime is another question. I got a weird and big error that looks like a change now runs afoul of the sandboxing somehow. Didn't crash the game though. And I ran with a mildly unusual combo of City World + MasterOfOreon which starts you with an unusual item. Item wasn't visible and for some reason I was getting machine-gun block breakage speed (huh). Actually kinda amusing to see how fast you can tunnel down!

Plain Cities alone didn't cause any issues, so it should be the item from MOO. JoshariasSurvival is fine. LightAndShadow also has custom items and got the stacktrace below with the first item not loading. The other items were OK and worked normally. Then the big double-block aces had icons in the toolbar, but not while held, and again caused the machine-gun speed digging. Kinda like they manage to escape the delay built into block breaking.

Eerie but kinda cool to have the disembodied held items.

Hit the reload game -> held item not rendered for just the two spawn blocks in L&S. Some stuff was rendered while thrown, not other stuff.

22:25:16.156 [main] INFO  o.t.w.b.internal.BlockManagerImpl - Registered Block core:RedShroom with id 74
Unexpected exception
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.reflect")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457)
    at java.security.AccessController.checkPermission(AccessController.java:884)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    at org.terasology.module.sandbox.ModuleSecurityManager.checkPermission(ModuleSecurityManager.java:49)
    at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1564)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:311)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at ch.qos.logback.classic.spi.PackagingDataCalculator.<clinit>(PackagingDataCalculator.java:43)
    at ch.qos.logback.classic.spi.ThrowableProxy.getPackagingDataCalculator(ThrowableProxy.java:135)
    at ch.qos.logback.classic.spi.ThrowableProxy.calculatePackagingData(ThrowableProxy.java:144)
    at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:124)
    at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440)
    at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396)
    at ch.qos.logback.classic.Logger.error(Logger.java:559)
    at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:513)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.sendStandardEvent(EventSystemImpl.java:269)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:260)
    at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:145)
    at org.terasology.logic.characters.CharacterHeldItemSystem.onChangeHeldItemRequest(CharacterHeldItemSystem.java:42)
    at org.terasology.logic.characters.CharacterHeldItemSystemMethodAccess.invoke(Unknown Source)
    at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:506)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.sendStandardEvent(EventSystemImpl.java:269)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:260)
    at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:145)
    at org.terasology.logic.inventory.CharacterInventorySystem.syncSelectedSlotWithHeldItem(CharacterInventorySystem.java:63)
    at org.terasology.logic.inventory.CharacterInventorySystemMethodAccess.invoke(Unknown Source)
    at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:506)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.sendStandardEvent(EventSystemImpl.java:269)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:260)
    at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:145)
    at org.terasology.logic.inventory.InventoryUtils.putItemIntoSlot(InventoryUtils.java:395)
    at org.terasology.logic.inventory.InventoryAuthoritySystem.giveItemToSlots(InventoryAuthoritySystem.java:213)
    at org.terasology.logic.inventory.InventoryAuthoritySystem.giveItem(InventoryAuthoritySystem.java:321)
    at org.terasology.logic.inventory.InventoryAuthoritySystem.giveItem(InventoryAuthoritySystem.java:154)
    at org.terasology.logic.inventory.InventoryAuthoritySystemMethodAccess.invoke(Unknown Source)
    at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:506)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.sendConsumableEvent(EventSystemImpl.java:279)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:258)
    at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:145)
    at org.terasology.managerInterface.ManagerInterfaceSystem.createAndGiveItemToPlayerIfPossible(ManagerInterfaceSystem.java:80)
    at org.terasology.managerInterface.ManagerInterfaceSystem.onPlayerSpawn(ManagerInterfaceSystem.java:74)
    at org.terasology.managerInterface.ManagerInterfaceSystemMethodAccess.invoke(Unknown Source)
    at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:506)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.sendStandardEvent(EventSystemImpl.java:269)
    at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:260)
    at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:145)
    at org.terasology.logic.players.PlayerSystem.spawnPlayer(PlayerSystem.java:250)
    at org.terasology.logic.players.PlayerSystem.update(PlayerSystem.java:93)
    at org.terasology.engine.modes.loadProcesses.AwaitCharacterSpawn.step(AwaitCharacterSpawn.java:47)
    at org.terasology.engine.modes.StateLoading.update(StateLoading.java:242)
    at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:414)
    at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:369)
    at org.terasology.engine.Terasology.main(Terasology.java:154)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.reflect")
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457)
@Cervator

This comment has been minimized.

Show comment
Hide comment
@Cervator

Cervator Jan 22, 2016

Member

Oh, worth mentioning is that throwing the big aces in L&S actually doesn't work normally and provoke an NPE. Not sure I've ever tried before :-) Maybe something to look at in connection with this, seems a similar area.

Member

Cervator commented Jan 22, 2016

Oh, worth mentioning is that throwing the big aces in L&S actually doesn't work normally and provoke an NPE. Not sure I've ever tried before :-) Maybe something to look at in connection with this, seems a similar area.

@Josharias

This comment has been minimized.

Show comment
Hide comment
@Josharias

Josharias Jan 23, 2016

Contributor

Thanks Cervator for being a second pair of eyes looking for issues. I'll make a checklist of stuff that still needs to be done and start looking at the issues this weekend.

Contributor

Josharias commented Jan 23, 2016

Thanks Cervator for being a second pair of eyes looking for issues. I'll make a checklist of stuff that still needs to be done and start looking at the issues this weekend.

@Josharias

This comment has been minimized.

Show comment
Hide comment
@Josharias

Josharias Jan 23, 2016

Contributor

@Cervator, what do you mean with disembodied held items? While in development, I experienced this when the location linking got messed up, and an item had a static location that did not move with the player. Is that what you are talking about?

Contributor

Josharias commented Jan 23, 2016

@Cervator, what do you mean with disembodied held items? While in development, I experienced this when the location linking got messed up, and an item had a static location that did not move with the player. Is that what you are talking about?

@Cervator

This comment has been minimized.

Show comment
Hide comment
@Cervator

Cervator Jan 23, 2016

Member

Nothing fancy or worrisome, just that if the player is "holding" a chest it appears near the bottom right but entirely surrounded by world whereas before the objects were always sort of embedded in the corner of the screen so you could imagine the player's hand holding the object.

Member

Cervator commented Jan 23, 2016

Nothing fancy or worrisome, just that if the player is "holding" a chest it appears near the bottom right but entirely surrounded by world whereas before the objects were always sort of embedded in the corner of the screen so you could imagine the player's hand holding the object.

@Josharias

This comment has been minimized.

Show comment
Hide comment
@Josharias

Josharias Jan 23, 2016

Contributor

Luckily the placement of a block in the viewport is configurable. Do you have a good suggestion of values?

Use this command to move the mount point to a better location and then we can apply the difference to the block config.

setFirstPersonheldItemMountPointTranslation -0.25 0 0.5

Dang it.. apparently I need to learn how to make commands. The latest commit will fix that.

Contributor

Josharias commented Jan 23, 2016

Luckily the placement of a block in the viewport is configurable. Do you have a good suggestion of values?

Use this command to move the mount point to a better location and then we can apply the difference to the block config.

setFirstPersonheldItemMountPointTranslation -0.25 0 0.5

Dang it.. apparently I need to learn how to make commands. The latest commit will fix that.

Fixing issues with the entity based first person camera:
- Fix loading from save game, the initial held item does not display until you switch held item back and forth.
- Reduce the chance of "machine-gun speed digging".
- Throwing items from a stack are still displayed at the held item mount point.
@Josharias

This comment has been minimized.

Show comment
Hide comment
@Josharias

Josharias Jan 23, 2016

Contributor

One more thing about blocks being disembodied... I am curious of the vision for camera bobbing and how it relates to held items. The openGL version of this did some extra stuff to compensate for bobbing. Should held items stay more fixed to the camera with less movement than they have in this PR? Or is the amount of bob a normal amount of bob?

Contributor

Josharias commented Jan 23, 2016

One more thing about blocks being disembodied... I am curious of the vision for camera bobbing and how it relates to held items. The openGL version of this did some extra stuff to compensate for bobbing. Should held items stay more fixed to the camera with less movement than they have in this PR? Or is the amount of bob a normal amount of bob?

@GooeyHub

This comment has been minimized.

Show comment
Hide comment
@GooeyHub

GooeyHub Jan 23, 2016

Member

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/409/
Hooray Jenkins reported success with all tests good!

Member

GooeyHub commented Jan 23, 2016

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/409/
Hooray Jenkins reported success with all tests good!

@Josharias

This comment has been minimized.

Show comment
Hide comment
@Josharias

Josharias Jan 24, 2016

Contributor

Ah. And one more thing I missed communicating, the items in MOO and LaS that do not throw do not inherit from the engine: itemicon so they are missing some goo. These items likely would not work on multiplayer either.

Contributor

Josharias commented Jan 24, 2016

Ah. And one more thing I missed communicating, the items in MOO and LaS that do not throw do not inherit from the engine: itemicon so they are missing some goo. These items likely would not work on multiplayer either.

@Cervator

This comment has been minimized.

Show comment
Hide comment
@Cervator

Cervator Jan 24, 2016

Member

Yeah items still have some other bugs unrelated to this :-)

#1690 for instance might be similar, but certainly separate from this.

I am not sure about bobbing or corner placement. Brain a little wobbly past 2 am having stared at and editing documentation all day. Will give it another look tomorrow :-)

Member

Cervator commented Jan 24, 2016

Yeah items still have some other bugs unrelated to this :-)

#1690 for instance might be similar, but certainly separate from this.

I am not sure about bobbing or corner placement. Brain a little wobbly past 2 am having stared at and editing documentation all day. Will give it another look tomorrow :-)

Remove HeldItemChangedEvent, it was not serving any useful purpose.
Explicitly mark netFilters on some event receivers that are side by side with client side and server side concerns for understandability.
Better copying of components to the dropped item entity.
Avoid the warning for adding meshes to entities that do not have a location.
@Josharias

This comment has been minimized.

Show comment
Hide comment
@Josharias

Josharias Jan 28, 2016

Contributor

Rabbit trailing a bit... Simplifying the item pickup system as well so that monkeying with local client item meshes and locations works better on a single player game. (multiplayer worked better than single player because some stuff didnt get sent over the wire). All that to say that it is coming along. A little more polish and should have a easier to work with item dropping system as well as the rest of the bugs fixed.

Contributor

Josharias commented Jan 28, 2016

Rabbit trailing a bit... Simplifying the item pickup system as well so that monkeying with local client item meshes and locations works better on a single player game. (multiplayer worked better than single player because some stuff didnt get sent over the wire). All that to say that it is coming along. A little more polish and should have a easier to work with item dropping system as well as the rest of the bugs fixed.

@Cervator

This comment has been minimized.

Show comment
Hide comment
@Cervator

Cervator Jan 28, 2016

Member

Sounds fine. Plenty of improvements to do all over, great to hear some are happening :-)

I've thought about bobbing/viewpoint stuff on occasion but nothing really comes to mind. It is one of those topics where it is probably just play with it till you like it - nobody has any perfect ideas to apply, so just make it work for you! :D

Member

Cervator commented Jan 28, 2016

Sounds fine. Plenty of improvements to do all over, great to hear some are happening :-)

I've thought about bobbing/viewpoint stuff on occasion but nothing really comes to mind. It is one of those topics where it is probably just play with it till you like it - nobody has any perfect ideas to apply, so just make it work for you! :D

@Josharias

This comment has been minimized.

Show comment
Hide comment
@Josharias

Josharias Jan 30, 2016

Contributor

Last bugs squashed related to sometimes having meshes not displayed or displayed too much.

I was unable to replicate the sandboxing error. I ran single player cities world with MOO. There was only one item, and it doesnt render itself because it is lacking the parent prefab.

I have decided to avoid putting the item refactoring in here so that it can be reviewed on its own. There are some hacky things in the latest commit dealing with the complexity of having items nest inside another entity when thrown. The hacks go away when one removes the nesting (for my next PR).

I feel this could be merged after another set of eyes takes it for a run through.

Contributor

Josharias commented Jan 30, 2016

Last bugs squashed related to sometimes having meshes not displayed or displayed too much.

I was unable to replicate the sandboxing error. I ran single player cities world with MOO. There was only one item, and it doesnt render itself because it is lacking the parent prefab.

I have decided to avoid putting the item refactoring in here so that it can be reviewed on its own. There are some hacky things in the latest commit dealing with the complexity of having items nest inside another entity when thrown. The hacks go away when one removes the nesting (for my next PR).

I feel this could be merged after another set of eyes takes it for a run through.

@GooeyHub

This comment has been minimized.

Show comment
Hide comment
@GooeyHub

GooeyHub Jan 30, 2016

Member

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/410/
Hooray Jenkins reported success with all tests good!

Member

GooeyHub commented Jan 30, 2016

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/410/
Hooray Jenkins reported success with all tests good!

Josharias added a commit to Terasology/WoodAndStone that referenced this pull request Jan 30, 2016

Josharias added a commit to Terasology/WoodAndStone that referenced this pull request Jan 30, 2016

@GooeyHub

This comment has been minimized.

Show comment
Hide comment
@GooeyHub

GooeyHub Jan 30, 2016

Member

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/411/
Hooray Jenkins reported success with all tests good!

Member

GooeyHub commented Jan 30, 2016

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/411/
Hooray Jenkins reported success with all tests good!

@@ -85,4 +79,5 @@
public Prefab pickupPrefab;
public int cooldownTime = 200;

This comment has been minimized.

@Josharias

Josharias Jan 31, 2016

Contributor

This prevents prefabs that do not specify a cooldown to get a better value than "machine gun"

@Josharias

Josharias Jan 31, 2016

Contributor

This prevents prefabs that do not specify a cooldown to get a better value than "machine gun"

@Cervator

This comment has been minimized.

Show comment
Hide comment
@Cervator

Cervator Jan 31, 2016

Member

Hooray! Changes and fixes oh my :-) No more machine gunning

Member

Cervator commented Jan 31, 2016

Hooray! Changes and fixes oh my :-) No more machine gunning

@msteiger

This comment has been minimized.

Show comment
Hide comment
@msteiger

msteiger Jan 31, 2016

Is renderWithIcon no longer used? If so, there are 192 more usages in modules:

https://github.com/search?q=renderWithIcon+user%3Aterasology&type=Code

msteiger commented on 6f33b4b Jan 31, 2016

Is renderWithIcon no longer used? If so, there are 192 more usages in modules:

https://github.com/search?q=renderWithIcon+user%3Aterasology&type=Code

@Cervator

This comment has been minimized.

Show comment
Hide comment
@Cervator

Cervator Jan 31, 2016

Member

I've got a single package change waiting for a moment of repo peace and quiet that has a similar amount of changes needed. I don't mind going through and grabbing the two sets at the same time.

Do either of you have any large changes pending beyond this one? If not maybe I could get that done later today.

Edit: The one change I plan to make it move the Assets class from org.terasology.asset to org.terasology.utilities as it is the only class left in that package after gestalt-asset was split out. Now it sounds confusingly close like the asset package from Gestalt, plus fun with names Asset vs Assets

Tiny change (swap asset to utilities in the import statement), just in use darn near everywhere.

Member

Cervator commented Jan 31, 2016

I've got a single package change waiting for a moment of repo peace and quiet that has a similar amount of changes needed. I don't mind going through and grabbing the two sets at the same time.

Do either of you have any large changes pending beyond this one? If not maybe I could get that done later today.

Edit: The one change I plan to make it move the Assets class from org.terasology.asset to org.terasology.utilities as it is the only class left in that package after gestalt-asset was split out. Now it sounds confusingly close like the asset package from Gestalt, plus fun with names Asset vs Assets

Tiny change (swap asset to utilities in the import statement), just in use darn near everywhere.

@Josharias

This comment has been minimized.

Show comment
Hide comment
@Josharias

Josharias Feb 2, 2016

Contributor

Correct, renderWithIcon is no longer needed. There is now a component that is added to the base iconItem that triggers mesh creation. This is better because it reduces the amount of mechanisms that are tied to ItemComponent. Luckily these modules that still have this value defined do not break at all, they just cause some warning messages in the log. I have a PR ready for WoodAndStone with the only code change that was needed.

Cervator, sorry for the late reply. Real life and all that. I do not have any wide spread module changes in the works right now. Eventually I still want to move inventory and health out of the engine. But we could probably do that without causing mass renaming across all the modules.

Contributor

Josharias commented Feb 2, 2016

Correct, renderWithIcon is no longer needed. There is now a component that is added to the base iconItem that triggers mesh creation. This is better because it reduces the amount of mechanisms that are tied to ItemComponent. Luckily these modules that still have this value defined do not break at all, they just cause some warning messages in the log. I have a PR ready for WoodAndStone with the only code change that was needed.

Cervator, sorry for the late reply. Real life and all that. I do not have any wide spread module changes in the works right now. Eventually I still want to move inventory and health out of the engine. But we could probably do that without causing mass renaming across all the modules.

@Cervator

This comment has been minimized.

Show comment
Hide comment
@Cervator

Cervator Feb 2, 2016

Member

Thanks @Josharias and no worries about timing :-)

I don't mind wiping out all the old renderWithIcon references just to keep the code tidy. I'll do that when doing the asset rename after merging this, probably tonight or tomorrow.

Member

Cervator commented Feb 2, 2016

Thanks @Josharias and no worries about timing :-)

I don't mind wiping out all the old renderWithIcon references just to keep the code tidy. I'll do that when doing the asset rename after merging this, probably tonight or tomorrow.

@Cervator

This comment has been minimized.

Show comment
Hide comment
@Cervator

Cervator Feb 4, 2016

Member

Blargh, between work and a sudden fail from an HVAC contractor meaning I need to find a new one this looks like Saturday instead now :/

Member

Cervator commented Feb 4, 2016

Blargh, between work and a sudden fail from an HVAC contractor meaning I need to find a new one this looks like Saturday instead now :/

@Cervator

This comment has been minimized.

Show comment
Hide comment
@Cervator

Cervator Feb 6, 2016

Member

Alright, proper testing time! Will probably merge even with minor issues outstanding so we can continue :-)

Things noted (some pre-existing):

  • The axe icon now ends up with its blade facing the wrong way (toward the player) while being wielded as if you're hitting things with the back end of the head. Guessing rendering ends up mirroring the icon you see in the toolbar when we should probably render in the same direction so to say?
  • There is a weirdly visible green pixel on the edge of the axe, huh. Probably never noticed since it used to point the other way
  • Multiplayer started out weirdly laggy (headless server + two clients all local). Probably unrelated and I just haven't noticed lately. Lots of "too much input" which is pretty frequent in general (now and before)
  • Sometimes the first time I'd scroll to some items in the toolbar (mainly torch and chest) no held object would render. Actually use it in some fashion (like throwing a torch or placing the chest then picking it up again) and it gets rendered. Freshly picked up items like grass seem fine
  • First time actually placing a chest then could also fail to show the player's hand until switching away and back to that toolbar slot
  • A held item now tends to stick through and be covered by nearby blocks really easily (they should probably count as being closer to the player somehow, to avoid sticking through blocks like jumping did earlier)
  • First blast through a hillside with railgun oddly left all the dropped physics blocks invisible. Second try produced visible blocks just fine
  • On hopping down a railgun shaft to my death attempting a respawn I got a lighting merge crash after clicking respawn. Other client and server survived fine.
  • On the surviving client I started digging in the ground some and oddly the first two dropped blocks were invisible (but picked up just fine) - weird. Next several blocks were fine
  • Went to TNT some stuff and the first several explosions again made invisible blocks, then a 4th or so made visible ones.
  • Light & Shadow seemed pretty happy just with known issues like the crashes from the work system and inability to throw the two-block high playing cards

Lots of fun issues, lots unrelated to this, lots of more work to do, huzzah! :-)

Member

Cervator commented Feb 6, 2016

Alright, proper testing time! Will probably merge even with minor issues outstanding so we can continue :-)

Things noted (some pre-existing):

  • The axe icon now ends up with its blade facing the wrong way (toward the player) while being wielded as if you're hitting things with the back end of the head. Guessing rendering ends up mirroring the icon you see in the toolbar when we should probably render in the same direction so to say?
  • There is a weirdly visible green pixel on the edge of the axe, huh. Probably never noticed since it used to point the other way
  • Multiplayer started out weirdly laggy (headless server + two clients all local). Probably unrelated and I just haven't noticed lately. Lots of "too much input" which is pretty frequent in general (now and before)
  • Sometimes the first time I'd scroll to some items in the toolbar (mainly torch and chest) no held object would render. Actually use it in some fashion (like throwing a torch or placing the chest then picking it up again) and it gets rendered. Freshly picked up items like grass seem fine
  • First time actually placing a chest then could also fail to show the player's hand until switching away and back to that toolbar slot
  • A held item now tends to stick through and be covered by nearby blocks really easily (they should probably count as being closer to the player somehow, to avoid sticking through blocks like jumping did earlier)
  • First blast through a hillside with railgun oddly left all the dropped physics blocks invisible. Second try produced visible blocks just fine
  • On hopping down a railgun shaft to my death attempting a respawn I got a lighting merge crash after clicking respawn. Other client and server survived fine.
  • On the surviving client I started digging in the ground some and oddly the first two dropped blocks were invisible (but picked up just fine) - weird. Next several blocks were fine
  • Went to TNT some stuff and the first several explosions again made invisible blocks, then a 4th or so made visible ones.
  • Light & Shadow seemed pretty happy just with known issues like the crashes from the work system and inability to throw the two-block high playing cards

Lots of fun issues, lots unrelated to this, lots of more work to do, huzzah! :-)

@Cervator Cervator merged commit 6f33b4b into MovingBlocks:develop Feb 6, 2016

1 check passed

default Build finished. 473 tests run, 0 skipped, 0 failed.
Details

Cervator added a commit that referenced this pull request Feb 6, 2016

@Cervator Cervator removed the in progress label Feb 6, 2016

@Cervator

This comment has been minimized.

Show comment
Hide comment
@Cervator

Cervator Feb 7, 2016

Member

Btw all remaining hits for renderWithIcon now are from inactive modules. A lot of them are from TerraTech - @Josharias should we just delete that repo entirely since JoshariasSurvival took over?

Member

Cervator commented Feb 7, 2016

Btw all remaining hits for renderWithIcon now are from inactive modules. A lot of them are from TerraTech - @Josharias should we just delete that repo entirely since JoshariasSurvival took over?

@Josharias

This comment has been minimized.

Show comment
Hide comment
@Josharias

Josharias Feb 9, 2016

Contributor

Thanks for doing that, Cervator. Yes, I will delete TerraTech from the places, keeping a backup copy of my own.

Contributor

Josharias commented Feb 9, 2016

Thanks for doing that, Cervator. Yes, I will delete TerraTech from the places, keeping a backup copy of my own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment