FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Author Topic: FifeRPG Entity-Based Terrain  (Read 1806 times)

Chris3606

  • Newbie
  • Posts: 6
    • View Profile
FifeRPG Entity-Based Terrain
« on: February 14, 2014, 11:57:27 pm »

Hello,
I'm doing an experiment and trying to design/use a dynamic tile system with FifeRPG.  Basically, instead of using the regular (static) system for elements of a map, I'm trying to use the entity system from fife for ALL entities and terrain tiles (because it's either that or i go and build a component-based tile system of my own on top of the existing static one).  The problem I'm running into right now is if i try to render an entity as, say, the grass of a map, a player rendered appears "inside" the "grass entity" when it's on the square of that "grass entity".  Essentially I need one entity to be on "top" of the other one, and that doesn't seem to be working, even though they are in layers shifted on the appropriate axis.  Is there some sort of way to set the render "priority", for lack of a better term, that I'm missing?  I also realize the component system of FifeRPG wasn't exactly designed for use with map tiles like this, so feel free also to say something if you think what I'm trying to do is ludicrous.

Thank in advance,
Chris
Logged

Beliar

  • Newbie
  • Posts: 25
    • View Profile
Re: FifeRPG Entity-Based Terrain
« Reply #1 on: February 15, 2014, 05:33:24 am »

Hi,

I have not tried such a thing, but if you use the "Agent" component then it should suffice to set the layer value to the correct name. And have the layers ordered correctly, of course.
Logged

Chris3606

  • Newbie
  • Posts: 6
    • View Profile
Re: FifeRPG Entity-Based Terrain
« Reply #2 on: February 15, 2014, 10:52:49 am »

And have the layers ordered correctly, of course.

And such layer ordering works the same way it does in regular fife, correct?

Edit: Got around the problem, thanks.  It had to do with the layer I created for terrain I didn't set as walkable, and apparently that messes with rendering in FifeRPG.  Another issue with this idea is I need to be able to place these "entities" as tiles from WITHIN the game entirely, as random generation is going to be a big part of this.  Is such a thing even possible with the system, as it now exists, or will I have to build that part from scratch?
« Last Edit: February 15, 2014, 12:33:54 pm by Chris3606 »
Logged

Beliar

  • Newbie
  • Posts: 25
    • View Profile
Re: FifeRPG Entity-Based Terrain
« Reply #3 on: February 16, 2014, 09:13:12 am »

Well, if you mean dynamic creation of entities then, yes, it should be possible. It is actually pretty much the reason behind it.
Logged