Author Topic: Thinking about some RPG..Android version.  (Read 111606 times)

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Thinking about some RPG..Android version.
« Reply #375 on: May 05, 2013, 01:40:10 pm »
Vainly trying to figure out why everyone are using normal mapping in tangent space instead of object space. Object space is faster and less memory-intensive. Or what is main differences?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Thinking about some RPG..Android version.
« Reply #376 on: May 05, 2013, 06:56:37 pm »
Object space normal maps can't be reused on different objects and you can't create (...fake) them simply based on a texture. In addition, using them on deforming objects can be an issue.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Thinking about some RPG..Android version.
« Reply #377 on: May 26, 2013, 09:58:53 pm »
This is how the AI sees the world:


Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Thinking about some RPG..Android version.
« Reply #378 on: May 26, 2013, 10:42:13 pm »
Every red point is obstacle? I see monastery and houses :) Do you want these models? They are from my old and probably dead project...


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Thinking about some RPG..Android version.
« Reply #379 on: May 27, 2013, 07:40:29 am »
Yes, they are obstacles. The smaller dots are mostly trees and rocks. I've you've some models to spare, i would be very grateful.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Thinking about some RPG..Android version.
« Reply #380 on: June 10, 2013, 09:45:34 pm »
Hunted by a pack of goblins...


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Thinking about some RPG..Android version.
« Reply #381 on: June 11, 2013, 07:31:18 pm »
The NPCs now may have a (very subtle) blob shadow. I wanted to add this for ages, but i hadn't figured out how to do it efficiently on Android. After all, a simple flat shadow plane that moves with the character won't work in this terrain. It has to adopt to the terrain to a degree but i couldn't use a projective texture either. So i had to look for a way to make a plane roughly follow the terrain without impacting performance...and this is it:


Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Thinking about some RPG..Android version.
« Reply #382 on: June 11, 2013, 07:43:45 pm »
Nice, did you have any problems with depth buffer accuracy?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Thinking about some RPG..Android version.
« Reply #383 on: June 11, 2013, 10:38:24 pm »
Nothing noticable. The plane is shifted a few units up, which you usually can't see. I tested it on desktop, Adreno and Tegra so far and it works fine on them. I'll try on PowerVR once the damn slow Nexus S has finished all updates that it thinks it has to install (haven't turned it on for some weeks). The Mali device is on holiday together with my wife, so i can't try that ATM... ;)
« Last Edit: June 27, 2013, 11:47:07 pm by EgonOlsen »

Offline raft

  • quad
  • ******
  • Posts: 1973
    • View Profile
    • http://www.aptalkarga.com
Re: Thinking about some RPG..Android version.
« Reply #384 on: June 12, 2013, 12:05:01 pm »
looks nice  :) how do you make shadow plane fit to terrain? using collisions similar to car sample? ie: 4 collisions for 4 corners of plane?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Thinking about some RPG..Android version.
« Reply #385 on: June 12, 2013, 01:38:33 pm »
... using collisions similar to car sample? ie: 4 collisions for 4 corners of plane?
No, not exactly. That was my first idea but it had the problem that it was much too slow on Android to do it that way. But i already have this height map that i'm using for npc movement anyway and i have a method that returns the current height at any point based on this height map and a strange linear interpolation. I'm using this to take three samples around the enemies position and calculate the normal vector of the plane that these three points span. I'm then using a linear interpolation between this vector and the former one and rotate the shadow plane to match the resulting vector.
So...it's a linear interpolation of a linear interpolation of some height map values...sounds strange but works pretty well.

Offline IZACIZAC

  • byte
  • *
  • Posts: 19
    • View Profile
Re: Thinking about some RPG..Android version.
« Reply #386 on: June 17, 2013, 05:53:12 am »
Are you streaming in map data, or pre-loading it all? Just curious because I am trying to stream map data and have no idea how to do it efficiently, any pointers would be awesome :)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Thinking about some RPG..Android version.
« Reply #387 on: June 17, 2013, 09:53:16 pm »
Nope, no streaming. It's loaded as one large lump of geometry. It's not that large, so that's not a problem. I'm not trying to create something in the range of Skyrim here.

Offline Irony

  • long
  • ***
  • Posts: 151
    • View Profile
Re: Thinking about some RPG..Android version.
« Reply #388 on: June 23, 2013, 02:17:23 pm »
Looks definitely better with the shadows. Can you already shoot those bastards?  ;D

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Thinking about some RPG..Android version.
« Reply #389 on: June 23, 2013, 09:20:15 pm »
Can you already shoot those bastards?  ;D
Yes, in the latest version, you can shoot them with the bow.