• Welcome to Final Fantasy Hacktics. Please login or sign up.
 

Maps

Started by Xifanie, September 29, 2007, 10:23:24 am

Xifanie

February 07, 2008, 07:23:29 am #20 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
Had to download pkg_resources & install it but it still doesn't work. :/

C:\Documents and Settings\Mikaël Blais>"D:\Program Files\Python\python.exe" "C:\
Documents and Settings\Mikaël Blais\Bureau\map2gl09\map2gl.py" G:\MAP\ 25
Hit ESC key to quit.
Traceback (most recent call last):
  File "C:\Documents and Settings\MikaÙl Blais\Bureau\map2gl09\map2gl.py", line
580, in <module>
    main()
  File "C:\Documents and Settings\MikaÙl Blais\Bureau\map2gl09\map2gl.py", line
528, in main
    glutInit(sys.argv)
  File "d:\Program Files\Python\Lib\site-packages\OpenGL\GLUT\special.py", line
309, in glutInit
    _base_glutInit( ctypes.byref(count), holder )
  File "d:\Program Files\Python\Lib\site-packages\OpenGL\GLUT\special.py", line
56, in _base_glutInit
    return __glutInitWithExit(pargc, argv, _exitfunc)
  File "D:\Program Files\Python\lib\site-packages\OpenGL\platform\baseplatform.p
y", line 258, in __call__
    self.__name__, self.__name__,
OpenGL.error.NullFunctionError: Attempt to call an undefined function __glutInit
WithExit, check for bool(__glutInitWithExit) before calling
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

gomtuu

February 07, 2008, 12:04:59 pm #21 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Karsten,

Thanks! :)


Cheetah,

According to the file creation dates on my computer here, I wrote map2gl about a year and a half ago. Hard to believe it's been so long!

Back then, I couldn't find a community out there for FFT hacking, so I just had my own interest in the subject to keep me going. That only went on for a couple of months. I haven't worked on it much since then, but finding this website has sparked my interest in the subject again, I must admit. I might just pick up where I left off...

By the way, I've never tried map2gl in OS X, but there's no good reason why it shouldn't work as long as you've got the Python stuff I listed installed. Would you mind giving it a try? I'd like to see if we can get it working.


Zodiac,

Sorry! I think you're getting that error because you're missing a DLL file that I forgot to mention. Download GLUT for Win32 here:

http://www.xmission.com/~nate/glut.html

Copy the glut32.dll file into your \WINDOWS\system32 directory and then try running it again. Let me know if that helps.

-Don

Cheetah

February 07, 2008, 12:14:20 pm #22 Last Edit: December 31, 1969, 07:00:00 pm by Cheetah
I can actually get this working on my computer?!?! Yeah no worries, I will definitely give this a real good attempt. I will just pm you any questions I have about installing and the like.

There have been a lot of advances here in hacking this game real recently Gomtuu, so now is the time.
Current Projects:

Xifanie

February 07, 2008, 05:09:05 pm #23 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
Nah, you included glut in your archive. I only tried to put it in Python's dll folder.
I just didn't try system32.

I... can't say what's wrong myself in all of this but doesn't look like OpenGL likes the format of the GLized map.

OpenGL.error.GLError: GLError(
        err = 1281,
        description = 'unvalid value',
        baseOperation = glTexImage2D,
        pyArgs = [
                GL_TEXTURE_2D,
                0,
                GL_RGBA,
                2048,
                2048,
                0,
                GL_RGBA,
                GL_UNSIGNED_BYTE,
                '\x10\x10\x10\xff\x10\x10\x10\xff\x10...
        ],
        cArgs = [
                GL_TEXTURE_2D,
                0,
                GL_RGBA,
                2048,
                2048,
                0,
                GL_RGBA,
                GL_UNSIGNED_BYTE,
                '\x10\x10\x10\xff\x10\x10\x10\xff\x10...
        ],
        cArguments = (
                GL_TEXTURE_2D,
                0,
                GL_RGBA,
                2048,
                2048,
                0,
                GL_RGBA,
                GL_UNSIGNED_BYTE,
                c_void_p(148570164),
        )
)
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

gomtuu

February 07, 2008, 08:16:02 pm #24 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Zodiac,

Argh. I get a similar error on some maps and I've never known the cause. Have you tried multiple maps? It's possible some will work and some won't, if it's an error similar to mine. Mine doesn't work on maps 53 and 55, but all the other maps work AFAIK.

From Googling the error message a little, it sounds like I should be using display lists instead of vertex/texture/normal arrays. They're more compatible, I guess. Maybe faster, too. Unfortunately, I wrote map2gl before I knew about display lists. :roll:

Anyone else having any success with it?

-Don

Xifanie

February 07, 2008, 09:23:27 pm #25 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
from greega's page, 43 is Warjilis port like the one you posted.

I tried 1, 2 , 3, 25, 43 and all resulted the same.  :?

And it takes about 3-7mins for my computer to process the whole thing for a map just to end up with an error.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

gomtuu

February 07, 2008, 10:08:28 pm #26 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Wow, that long? On my computer--even on my previous one which was a few years old--it only takes a few seconds. Is your computer relatively new?

Well I think I have some good news. I've adapted the code to use display lists instead of vertex arrays, because I read they were more compatible. Indeed, on my computer this fixes the maps I was having trouble loading. And it seems to have fixed a little texture glitch I was having on most maps, too.

Plus, I threw away some old code that was looping through the polygons eight times to sort them various ways. This was a measure I was taking to try to get transparent textures working, but then later on I found out I didn't actually need to do it, but I never removed the code. So loading a map should be considerably faster now.

Let me know if this new version helps any.

Xifanie

February 07, 2008, 10:29:51 pm #27 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
Still no luck. I'll try downloading the alpha version you posted of OpenGL instead of the latest beta I downloaded. I presume it should fix it.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Cheetah

February 08, 2008, 04:10:37 am #28 Last Edit: December 31, 1969, 07:00:00 pm by Cheetah
I believe I have all the stuff I need that you listed and now it is just a matter of how to get it all installed. It will be a little bit before I figure it out because I have no experience with this stuff and not enough time.

I'm glad that you are continuing work on it though. What are the limits and requirements for the size of the maps?
Current Projects:

Xifanie

February 08, 2008, 07:38:00 am #29 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
Well, I don't know what to do anymore... the process still always stops at glTexImage2D.

MAN... :/
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

gomtuu

February 08, 2008, 12:19:19 pm #30 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Zodiac,

I've prepared a version that tries to detect the error you're getting and continue in textureless mode if it occurs. (It'll still work normally if it can, so this isn't a fork or anything.) Seeing the maps without textures isn't great, but it's better than nothing, right?  :? Let me know if it works.

If it has to use textureless mode it'll print an error that looks like this:

QuoteError: Unable to define texture. Continuing with textures disabled.

It may also say something like:
QuoteThe texture is too big for the video card. Max size supported: 1024

If it does, I'd be interested to know the number that it gives you.

map2gl does load a rather large texture (2048x2048x24bpp, which works out to 12MB), and I guess not all video cards support textures that large. That's the best explanation I can think of. What kind of video card do you have?

The texture should really only be 256x1024 since that's the actual size of the textures on the CD. The problem is that the game applies any one of 16 palettes to the texture before using it on a particular polygon in the scene. Since I don't know if/how I can do this in OpenGL, what I did was just put 16 copies of the texture in memory all at once: one copy for each palette. Lame, I know, but it always worked for me.

What I'll do next is make a version that, if it's unable to define the whole 2048x2048 texture, falls back on using a single copy of the 256x1024 texture without any palettes applied (just grayscale or something). That way, you'll at least be able to see something other than gray polygons with lighting and shading.

-Don

Pixy

February 08, 2008, 05:41:38 pm #31 Last Edit: December 31, 1969, 07:00:00 pm by Pixy
:shock:

*takes off glasses*

*smashes glasses into the wall*

My God... This is probably one of the biggest developments I've seen. Absolutely amazing. I'll give it a try, as well.
*is FFTRamza*
no, I mean what I said. Perhaps if I said it in Japanese it'd become magically better for you. - philsov

Kuraudo Sutoraifu

February 08, 2008, 05:58:18 pm #32 Last Edit: December 31, 1969, 07:00:00 pm by Kuraudo Sutoraifu
Welcome back, Pixy.

Pixy

February 08, 2008, 06:22:48 pm #33 Last Edit: December 31, 1969, 07:00:00 pm by Pixy
Good to be back.  :)

The FFT hacking scene is truly turning into something bigger than I had imagined. The biggest ROM hacking scene I can remember is the Sonic ROM Hacking scene, and it was enjoyable. However, I see infinite possibilities for FFT now. I recently saw the battle sprites that were decompressed, and the Red Mage edits, which look wonderful. I stumbled upon this, too, and my jaw dropped for a quick 3 seconds. I can't say I'm big on programming or artwork, but I'm extremely impressed by and thankful for the big heads here that just keep surprising me.

I wonder what could be next?
*is FFTRamza*
no, I mean what I said. Perhaps if I said it in Japanese it'd become magically better for you. - philsov

Xifanie

February 08, 2008, 06:29:04 pm #34 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
... I have a 8mb.

Don't laugh >_>

I can't even change it since there isn't a graphic card slot.

Fucking IBM computer.

I'll just use this computer I'm on right now if that the problem (500mHz, 128mb Graph card, 320mb RAM).
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

gomtuu

February 08, 2008, 10:10:28 pm #35 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Zodiac,

Mystery solved! Hehe. You should have better luck with the other computer. Meanwhile, I've updated the requirements on my original post to be more accurate and helpful.

http://auritech.byethost13.com/viewtopic.php?p=2111#2111

gomtuu

February 08, 2008, 10:18:55 pm #36 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Wow, I didn't know George Greer's page was still around. The old URL I had for his FFT:IP page didn't work anymore... Anyway, I feel I should give him some credit because the tools he made gave me a lot of good info when I was starting out with map2gl.

http://www.m-l.org/~greerga/fft/

Xifanie

February 09, 2008, 11:50:49 am #37 Last Edit: February 09, 2008, 12:22:21 pm by Xifanie
A.W.E.S.O.M.-O

Can you tell us about the commands?
I know that:
- Zoom Out
+ Zoom In
o Toggle RAW/Perspective view
x Toggle colored axes
i +Vertical
k -Vertical
s Toggle X-ray(dunno what else to call it :O)
b Toggle day/night

but not anything else.

I didn't think the Deep Dunjeon was completely black by default, what a shame.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Xifanie

February 09, 2008, 12:20:00 pm #38 Last Edit: December 31, 1969, 07:00:00 pm by Xifanie
May I suggest a few things?

- Wider window (about 1.5x this size); or even better, fits to screen by default.
- Add buttons to control X & Y too, that would allow me to easily rip the maps and put clean stuff for event editing/modifying starting locations.

Is the default background loaded from the map files? if not I'd rather have something lighter than complete black.

Entrance to Murond is completely black ;(
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

gomtuu

February 09, 2008, 02:43:13 pm #39 Last Edit: December 31, 1969, 07:00:00 pm by gomtuu
Zodiac,

Glad to hear you got it working!

The starting window size is 640x480, but it's not fixed at that size. You should be able to resize/maximize it.

You don't mean that all the maps have black backgrounds, do you? If so, there's something wrong. map2gl uses the background color information that's stored in the map files, so you should see a blue gradient on Map 85 (Mandalia Plains), for instance. Most interior maps have a black background in-game, though, so that's what map2gl shows. It'd be pretty easy for me to add a key that would override the background and set it to some other color, though. Suggestions? I'm thinking magenta would work well, since it's not used too often. But I wouldn't recommend spending a lot of time making screenshots yet, because several maps still have rendering glitches. 16, 21, 33, and 51 are just a few examples.

The Deep Dungeon maps have all their lights set to black by default, but IIRC, when lighting is disabled in OpenGL, the maps show up nicely. (If lighting is off in OpenGL, everything is effectively lit with 100% white light all the time.) I've been meaning to add a key to toggle lighting. Just haven't gotten around to it.

Map 53, Entrance to Death City, is a strange map. Its GNS file is kind of funny, and I'm still trying to figure out the details of the GNS format. The reason it's not rendering is because my program isn't finding any vertex data because it's looking in the wrong place. I still have to figure out how to make it look in the right place. :) Does anyone have a screenshot, by the way? I don't remember what the level looks like.

I'm not sure what you mean about "control X & Y." Do you mean control the rotation of the map? Here's a more detailed explanation of the keys. I'm putting it in a code block to make the letters easier to tell apart.

[: Select previous map
]: Select next map
k: Decrease camera's altitude angle by 2 degrees
i: Increase camera's altitude angle by 2 degrees
j: Decrease the speed of the camera's rotation around the Y axis
l: Increase the speed of the camera's rotation around the Y axis
J: Stop camera rotation. Set camera's azimuth angle to the next even multiple of 45 degress
L: Stop camera rotation. Set camera's azimuth angle to the previous even multiple of 45 degress
0: (zero): Stop camera rotation and set altitude angle to 0 and azimuth angle to 0.
-: Dolly the camera farther away from the map
=: Dolly the camera closer to the map
o: Toggle between orthographic (isometric) and perspective projection
_: Decrease the camera's focal length (in perspective projection only)
+: Increase the camera's focal length (in perspective projection only)
s: Toggle whether the black polygons around the edges of the map (which I call "skirt" polygons) are displayed
x: Toggle display of axes (X=red, Y=green, Z=blue)
b: Toggle "bright" mode (see below)

You can also click the mouse and drag to rotate the map arbitrarily.

"Bright" mode is a hack, and is not related to day or night weather conditions. Because of differences in the way the PSX and OpenGL implement lighting, the maps tend to look very dark in OpenGL. As a temporary solution, I've added this mode, which basically draws the polygons in two passes: once normally, then again using a blending mode that adds the two passes together. It's not very accurate, but it makes many maps look better, so it's on by default. Some maps look bad because the light and color get exaggerated, though, so I made a toggle for it.

I should really put a README file in the zip and put the requirements, installation instructions, command-line usage, and available keys in it. Maybe I'll include that in the next release.