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!

Pages: [1] 2

Author Topic: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?  (Read 17296 times)

KeldorKatarn

  • Newbie
  • Posts: 3
    • View Profile

Hello,

as some of you might know the source code of Jagged Alliance 2 was released quite some time ago to the public. Since then a team of modders and coder has been working on improving the game. The result so far is  JA2 1.13, which you can read about here:

http://ja2v113.pbwiki.com/

On the developer board - http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=cfrm&c=11 - there is right now a discussion about improving the looks of the game. FIFE has been mentioned as a possible new rendering engine.

After some discussion I thought it would be a good idea to finally ask the developers about this. Would FIFE be well suited for such a thing and how easy or hard would it be to use it in JA2's existing code base.

You are also welcome to comment about this on the developer's board of JA2 1.13 in this thread:

http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=163777&page=1#Post163777
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #1 on: April 07, 2008, 08:35:23 am »

Hello KeldornKatarn :-)

Recently a user called "darear" showed up at the FIFE irc channel and asked similar questions. I'm not sure if you're the same person but if that's the case I would suggest to publish the IRC log of the conversation here so everyone got access to this kind of informatiom.

Greetings,
Martin

EDIT: just compared your ips and it looks like you're not the same person. Here is a censored channel log as attachment that just contains our questions and answers but not darear's questions. If darear agrees to it we could publish the full channel log later.

EDIT #2: uncensored channel log as darear has agreed to publishing it.
« Last Edit: April 07, 2008, 10:25:38 am by mvBarracuda »
Logged

KeldorKatarn

  • Newbie
  • Posts: 3
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #2 on: April 07, 2008, 11:00:34 am »

Thank you for this information. As you already guessed I am not the same person that asked these questions, so thank you for this log and your feedback.
I'm sure the JA2 1.13 team will get back to you :)
Logged

Lt.Havoc

  • Newbie
  • Posts: 6
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #3 on: April 07, 2008, 11:57:43 am »

So, from the chat log, its possible to use the engine to improve the graphics, is that correct?`That would be aswome.
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #4 on: April 07, 2008, 12:30:21 pm »

So, from the chat log, its possible to use the engine to improve the graphics, is that correct?`That would be aswome.
To say if FIFE could improve the ja2 1.13 graphics you should tell us how these improvements are hindered by the currently used engine. It's not possible to say engine1 offers a better graphics engine than engine2 if you don't know both engines.
Logged

Lt.Havoc

  • Newbie
  • Posts: 6
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #5 on: April 07, 2008, 01:47:22 pm »

Well, I hope you know JA2 and we also discussed the idea of improving the given graphics, but thing is, JA2 uses STI and JSD file formats for the Graphics and maps and they are currently hard to change. Also, the current JA2 graphic dosent even use 16 or 32 bit colors, nor does it have any high details ala FIFE.

We finally want to see the gun the Merc carries along with what armor he wears and a overall graphically improvment with 16 or even better 32 bit colors that are are done in a format that can be eaisly changed and modded.

The current graphic isnt bad, but its really old and redoing the this graphic will take as much as replacing it, so in the end, switching to another engine is the better option, so we can also remove all types of restriction engine wise.

I know, its a lot of work, but is worth a try. FIFE seems to be the most suitable for this job.
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #6 on: April 07, 2008, 03:48:32 pm »

In the end some ja2 1.13 programmer would need to take a look into the FIFE code to judge if it would be suited for your plans.

Concerning the image overlay / layered animations functionality: the Keys of Naand team created a patch for it to add this functionality to FIFE. The patch hasn't been merged with FIFE trunk yet as our programmers are busy with other tasks ATM and this functionality is not needed for our example game at the moment. For details see:
http://mirror1.cvsdude.com/trac/fife/engine/ticket/201
Logged

KeldorKatarn

  • Newbie
  • Posts: 3
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #7 on: April 08, 2008, 02:56:36 am »

Some questions have arised about whether FIFE supports the following features:

Multiple height levels and the possibility to make trenches.

Destroyable and movable lights (searchlights spring to mind)
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #8 on: April 08, 2008, 05:28:52 pm »

Multiple height are possible but nobody tested this feature in combination with pathfinding yet. Advanced lighting hasn't been integrated into the engine yet. Jasoka and the other programmers can hopefully comment on these topics in detail when they read the thread.
Logged

BirdFlu

  • Newbie
  • Posts: 2
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #9 on: April 12, 2008, 06:29:55 am »

Ok, i have a couple of questions. First, i haven't compile the FIFE code, but have taken a look into some parts of it.

FIFE uses SDL surfaces or OpenGL textures. Is there a performance difference between these modes?
I suppose the SDL surfaces are in software mode. Have you experienced any trouble switching from
software mode (SDL) to hardware mode (OpenGL), like running out of video memory (on smaller graphics boards)?

I suppose the SDL and OpenGL implementations are supposed to be interchangeable. Thus you use only the very basic
capabilities of OpenGL (i refer especially to OpenGL's immediate mode). Have you thought about using newer stuff
that may increase performance (if there is a performance issue at all), or is it impossible, because you would
give up compatibility between SDL and OpenGL?

You always use rgba textures, right? Do you support palettes or is it something that the user code has to deal with?

I'm asking this, because JA2 uses only palettized images. There is a huge amount of these images and they are usually
very small. So, using OpenGL, we would have a LOT of textures and always switching between them (binding) could
have a negative impact on performance.
In your example projects/techdemos, how many object are you drawing (in average) per frame? How large are
these objects/images in average?

A way to get out of this binding hell is to use texture atlases, but FIFE doesn't support textures atlases, right?
Looking into the code, i suppose it would be possible if there were some access to texture coordinates from
outside the GLImage::render method.

Does FIFE support any kind of lighting or shading, or is it again somthing for the user code?
FIFE does not support multitexturing (shader programs). Is it planned to support multitexturing (shader programs)
anytime in the future?

How is visibility/draw order of objects determined? Does the user has to do it? Is there any kind of Z-Buffer support?
Logged

Lt.Havoc

  • Newbie
  • Posts: 6
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #10 on: April 12, 2008, 12:30:27 pm »

Well, I would like to know if FIFE has destructable enviorment, like blowing up walls and trees and such.
« Last Edit: April 12, 2008, 01:13:53 pm by Lt.Havoc »
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #11 on: April 12, 2008, 12:43:16 pm »

Well, I would like to know if FIFE has destructable enviorm,ent, like blowing up walls and trees and such.

That depends on your scripts...

You can either remove / add mapobjects or create a animation dataset for the walls you want to blast away.

jwt

  • Developer
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #12 on: April 12, 2008, 10:12:06 pm »

Ok, longest forum post ever: is FIFE is suitable for JA2.

The most important question--and one that I can't answer--is whether FIFE could be reasonably integrated with the JA2 codebase. I suspect this might be very complicated. If you're looking for a few "quick fixes" to make JA2 look better, then it would almost certainly be easier to just hack the existing JA2 code.

As those of you who have browsed FIFE's code have probably realized, FIFE is not just a rendering engine. It also does audio, events, scene management, pathfinding, provides a scripting environment, xml resource formats, editing tools, and much, much more. In short, it aims to be a complete toolset for making games.

As near as I can tell, you are looking for just a rendering engine that can be plugged into the backend of JA2. FIFE's rendering engine is housed in the Video and View modules.

The good news is that FIFE is very modular, and these 2 modules can certainly be separated from the rest of FIFE (you would need to make some adjustments to View, since it "views" our Model module, and you would need to make it View JA2's internal representation of game data).

But FIFE doesn't have a particularly "fancy" rendering engine. Our renderer is a flexible, extensible, adequate platform on which the rest of FIFE can rest. It's certainly better than JA2's current engine, but based on some of the questions that have been asked, it seems that your looking for something really "cutting edge" in the graphics department. Creating a cutting-edge rendering engine is not FIFE's goal. I don't know if such a cutting edge 2d rendering engine exists. If it does, it might be a better fit for you than FIFE.

As to the technical questions:

Quote
FIFE uses SDL surfaces or OpenGL textures. Is there a performance difference between these modes? I suppose the SDL surfaces are in software mode. Have you experienced any trouble switching from software mode (SDL) to hardware mode (OpenGL), like running out of video memory (on smaller graphics boards)?

In an accelerated environment, OpenGL will typically give much better performance than SDL. Both implementations currently support an identical feature set, so switching between the two is purely a matter of performance. The renderer must be chosen at launch; it cannot be changed "on the fly" during game play.

Quote
I suppose the SDL and OpenGL implementations are supposed to be interchangeable. Thus you use only the very basic capabilities of OpenGL (i refer especially to OpenGL's immediate mode). Have you thought about using newer stuff
that may increase performance (if there is a performance issue at all), or is it impossible, because you would give up compatibility between SDL and OpenGL?

OpenGL optimization would desirable, but we don't have an OpenGL guru on the team. The OpenGL backend hasn't been worked on much since it was first written (a couple years ago). A new guy recently joined the team who expressed some interest in the OpenGL code though, so we might see more work on that front soon.

Quote
You always use rgba textures, right? Do you support palettes or is it something that the user code has to deal with?

Palettes aren't in yet, but they're on my personal short list of tasks. A game currently being developed with FIFE has requested this, and it's clearly a very important feature for many games.

Quote
I'm asking this, because JA2 uses only palettized images. There is a huge amount of these images and they are usually very small. So, using OpenGL, we would have a LOT of textures and always switching between them (binding) could have a negative impact on performance. In your example projects/techdemos, how many object are you drawing (in average) per frame? How large are these objects/images in average?

Probably the best way to answer these questions is to fire up FIFE and test it out for yourself. FIFE has fine performance in the situations we have encountered so far. I have no doubt that if performance becomes a problem, we can find ways to substantially improve it.

Quote
A way to get out of this binding hell is to use texture atlases, but FIFE doesn't support textures atlases, right? Looking into the code, i suppose it would be possible if there were some access to texture coordinates from outside the GLImage::render method.

Texture atlas behavior may be possible using our SubImage code. I'd have to take a closer look.

Quote
Does FIFE support any kind of lighting or shading, or is it again somthing for the user code? FIFE does not support multitexturing (shader programs). Is it planned to support multitexturing (shader programs) anytime in the future?

Not at this time. This might change if a developer joins the team who's interested in working on OpenGL magic, but is not part of any current plans.

Quote
How is visibility/draw order of objects determined? Does the user has to do it? Is there any kind of Z-Buffer support?

Z-order is handled by the engine, and is determined by the location of instances in relation to the Camera. It fails for pathologically shaped objects, but I think this is true for most 2d engines. Such objects can be handled by judicious splitting into multiple smaller ones. I don't know how pathological JA2 objects can be, but I doubt the JA2 team had more sophisticated z-ordering algorithms than us, so existing JA2 data should be ok.

Let me know if you have any more questions.
« Last Edit: April 12, 2008, 10:15:05 pm by jwt »
Logged

Lt.Havoc

  • Newbie
  • Posts: 6
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #13 on: April 13, 2008, 03:35:31 am »

Well, maybe we wernt clear enough: we dont want a "cutting edge" 2D engine, what we want is a 2D engine that has better graphics and that can eaiser modded then the current one. As I said, the amount of work hacking the JA2 engine is almost the same or equally to the amount of work and time you need to replace the graphics engine totally.

What FIFE currently offers is more then enough for the 1.13 mod needs. Switching to the FIFE graphic engine would remove a lot of limitations the mod team currently has to deal with, like the limited space in the Laptop screen and the fact that we have no scroll bars and that they are hard to code in, not to forget that they cant use 16 or 32 bit graphics etc. etc.

All the things like lightning and OpenGL are mostly optional, but not really needed at the very moment.  Also, the 1.13 mod is bascially a platform for other people to make JA2 mods and currently, adding new weapons or graphics is very complicated. You need and STI tool, the fitting graphics and then an XML tool just to add a new gun to the game.

Custom graphics like Cars or Choppers and Tanks are also not easy to add, even if it was done. Another point is animations: adding new ones is a pain in the ass. Some new animations would also help gameplay wise, like firing rocket launchers from a prone or chrougin position, instead of standing up. Or what about jumping through windows? What if we want to add a animation where Mercs climb ladders?

As you see, there are many things that would slove iiself wehn we would use FIFE, because its more flesxible and adding new contents isnt that much of a problem.

So, no "cutting edge" just something that looks better and has more functionality and fexbility then we currently have.
Logged

BirdFlu

  • Newbie
  • Posts: 2
    • View Profile
Re: FIFE suitable to modernize Jagged Alliance 2 - 1.13 open source?
« Reply #14 on: April 13, 2008, 04:21:47 pm »

Well, it is not so much about having a cutting edge engine. I am looking through the JA2 rendering code and trying to determine
what has to be done and how it could be done and which bottlenecks a given approach could have. I am especially interested in
being able to render big maps with lot of objects. The current map size is 160x160 tiles, but there are people who work on bigger maps,
1600x1600 tiles if i remember correctly (maybe its even 3200x3200). In this case performance really matters, and if we have to
use some cutting edge technology to achieve this goal, then, well, we should at least think about it.

A general question, that not necessarily affects only JA2, is about using parts of the engine. Some developers may consider
their engine as complete works and don't want it to be "ripped apart" or "salvaged" for useful parts. What is your opinion
(or that of the team) on others using ("stealing") modules, classes, functions or even parts of a function of the FIFE engine?
« Last Edit: April 13, 2008, 04:24:05 pm by BirdFlu »
Logged
Pages: [1] 2