Author Topic: Engine building. If we make it, will they come?  (Read 39784 times)

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Engine building. If we make it, will they come?
« on: 2005-01-13 22:51:25 »
First, lets get everyone up to speed. This was ripped from another thread I started...


Quote

There have been lotsa engines that have been rebuilt and updated for newer computers.

xu4 for Ultima 4, Exult for Ultima 7, Sarian for Sierra AGI games, FreeSCI for Sierra SCI games, ScummVM for Lucasarts games.

I really don't see any reason why a new FF7 engine can't be written. Of course, you would have to start small. I mean, loading and parseing "STARTMAP" can be a start. It's not like it's expected to play the movies and do video overlays right out of the gammit.

I mean, we can load the little SD entities, and animate them. We can load the backgrounds, we can sort of load the walkmesh and sort of set the camera angle. Qhimm's workingon the field script, I'll plug along at the rounding out the data. It's really trvial to alter FF7 in a PSX emulator once you know where the data is.


All these engines have a lot in common, and, dare I say might even be a precursor, to the FF7 engine.

To build an engine like FF7, you need to start small. Basic libaries need to be created. Basic memory management needs to be done. We can cover the basics. I would be happy with a program that just loaded "STARTMAP" or some arbitrty field file for now.

 Truefully, I would be happy with a program that just loaded Kernel.bin, created a savemap, and incremented the system clock every second.

So who would like help with some idea tossing. I'm not expeting you guys to drop everything and start coding on my behalf.

I come from a Linux background, so cross-platfrom would be nice. Also, the PSX version of the game is much more previlent than the PC version, but both media should be able to be used. (PC's menu system with PSX's movies ^_^) Also, we should support an "uncompressed" data tree

Should we set up a sourceforge account? Can you guys use CVS? Should we set up a mailing list?

You guys know right now I suck at programming, but I can give it a good shot. I can at least build Linux makefiles and maintain linux code. Most of the beginning stuff will be console apps anyway.

Let's toss out some ideas.

Almighty_gir

  • *
  • Posts: 242
    • View Profile
Engine building. If we make it, will they come?
« Reply #1 on: 2005-01-14 02:52:44 »
im all for modeling for you guys should the need arise...

theres no point having a nice shiney new engine with no graphical enhancements to show it right?


*ducks*

Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
Engine building. If we make it, will they come?
« Reply #2 on: 2005-01-14 03:02:14 »
Well, first of all we should clearly state which language to use (C++ would be good since it's easier to "port" the information we got from the original FF7). CVS is a good idea, although since the people here are spread out and, dare I say it, rarely communitate, we should clearly define who does what. This brings the added benefit of a high degree of modularization, since each person needs to write code that integrates well with someone else's (details of which currently unknown).

I agree on the cross-platform, which basically means ANSI-only C++. I have a nasty habit of exploting MS-specific compiler extensions, but I'm keeping the field script module "pure". :P Oh yes, makefiles. Hrm well I'm building my code with the MS compiler, but if the code is standard I guess it should be easy enough to write a few makefiles for it later.

Though I'm still a bit unsure about the legalities of the whole thing (especially since anything FF7-related might draw extra attention now with AC, BC, CC and DC around). These things have been done before I see, but were they legal or just ignored? Since setting up on sourceforge would mean a relatively public display, I think this is a relevant issue.

Well anyway, an update on the field script module: Since many commands directly utilize various other aspects of the engine, a lot of stuff is being replaced by simple stubs for now. I should soon have a prototype ready that will parse the scripts OK though, even if it won't execute the game-specific commands.

For structure's sake, I'm proposing heavily using namespaces within our code. We should start from halkun's basic modularization of the engine (field, menu, battle, etc), and create a more specific structure tree. This will also help us distribute the work. For example, my script module might reside in the namespace Field::Script, but access the save map in the namespace Global. Suggestions on this?

Sephiroth 3D

  • *
  • Posts: 1679
    • View Profile
    • ModCitizen 42
Engine building. If we make it, will they come?
« Reply #3 on: 2005-01-14 05:36:09 »
Quote from: Almighty_gir
im all for modeling for you guys should the need arise...

theres no point having a nice shiney new engine with no graphical enhancements to show it right?

*ducks*

The problem is, it needs to be a seperate download, unrelated to this, for legal reasons. If we were to do new graphics, and a new engine, people could download the movies, and not even NEED the FF7 discs. (This would break copyrights and stuff.)

You can be responsible for new models... They're gonna do a new engine. But the less you need the FF7 game discs, the less legal it is.

I support the new engine concept, and I look forwards to it, despite the lack of a graphical upgrade, in terms of models and such.

Almighty_gir

  • *
  • Posts: 242
    • View Profile
Engine building. If we make it, will they come?
« Reply #4 on: 2005-01-14 05:53:35 »
hmm well if you guys find a way to legally build a new engine, ill find a way to release a small fan built model pack >_>

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Engine building. If we make it, will they come?
« Reply #5 on: 2005-01-14 06:10:57 »
I think we are putting the cart a little before the horse...

I want to use Sierra's AGI interpriter as a source of answers to engine questions.

AGI was reversed by looking at the machine code that made it up. It's new engine Sarien, is just a winner of a program, with new extentions, (such as 256 colors and mouse support, 320x480 mode) It's a really neat toy and with AGIStudio, people make  make new content for it all the time. Sarien even comes with it's own fan-made game.

There is even a GBA port...

Sarien is not owned by Sierra, either is the custom content. However Sarien can play and dissasemble the old Sierra AGI games.

Anyway Graphics and other 3d stuffs can wait. Engines are actually borning little things that are worthless without content. I'm not really intrested in anyone "making 3d models" or new menus or fonts right now becuase I have Square's, thank you very much. I'm much more intrested in getting a new engine to load the FF7 models than some abstract fan model right now.

Actually, I'm more intrested in loading kernel.bin right now. I am absolutely stoked to see how I can use zlib to access the file, and allocate little memory spaces for each of the data sets! Wow! I'm sitting here, in almost a state of deamfull bliss, imagining the routine for allocateing memory for the savemap! And look out! I might even uncompress section 3 into it and have the bare bones of something the field script could access in about a year when it's written. ^_^

Making new content is step number 743, I'm on step 1, deciding if C++ is a good programing language to use, (It is), if CVS is a good idea, (It is, but not until I snake Qhimm's code and place it in my own privite repository, and contine to post diffs until everyone else gets the idea that I'm not going to be downloading zipped incremental chanages to a source tree.) I'm also wondering if zlib supports gzip formatted data within a file.

Using .dlls (which in Linux speak is an .so file) is not a very good idea right now. Not only do .dlls and .so files link differently, and I understand you are looking ahead for future module management, we won't writing this for a 2 meg computer with no MMU. The point is to *update* the engine to new systems while keeping it compatible with old data. Keep in mind, I would also like it to accept "raw" uncompressed data too, but that's step number #345.

Anyways, square was able to make the FF7.exe program about 4 megs with lotsa cruft inside. That's not that big on the grand scheme of things.

I'm going to be making a DIA map of the dumped source filenames using UML and guessing what classes might of been inside. I'm sure that could be a cool roadmap to go by.

It should already be legal to build a new engine, it will be ours!

Sephiroth 3D

  • *
  • Posts: 1679
    • View Profile
    • ModCitizen 42
Engine building. If we make it, will they come?
« Reply #6 on: 2005-01-14 07:23:35 »
Quote from: halkun
I'm much more intrested in getting a new engine to load the FF7 models than some abstract fan model right now.

Agreed.

Akari

  • *
  • Posts: 766
    • View Profile
Engine building. If we make it, will they come?
« Reply #7 on: 2005-01-14 07:50:29 »
Ow! great! I just started working with ff7 raw data, because I found this place not so many time ago. But already wanted to remake FFIIV engine. So this is just in time. You can count on me.

And CVS would be great!

*sorry. My English is really baaad*

Almighty_gir

  • *
  • Posts: 242
    • View Profile
Engine building. If we make it, will they come?
« Reply #8 on: 2005-01-14 09:42:50 »
although i agree with you for the most part... please dont call my models abstract >_>


in the end were both interested in the same thing, just from different angles. to make the game better. now, i know im not the best in my field, but i also know im better than the current standard for the FF7 in game graphics, both texture, and model wise.

while as a graphic designer ive always wanted to see this game shine through, you, as a coder/programmer have always been more interested in the inner workings.

so we both really want the same thing.

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
Engine building. If we make it, will they come?
« Reply #9 on: 2005-01-14 11:17:25 »
Uh I wont be able to directly contribute with writing the code, because I have a few projects on my hands, and I dont have enough free time even to work on them. But I could contribute with code that i've already written ... its all about 3d models and textures. Mostly written in portable and insertable way.

Using CVS or any other versioning system is cool idea, but be sure that everyone can use it, even dialup-users.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Engine building. If we make it, will they come?
« Reply #10 on: 2005-01-14 12:15:52 »
I did have a shot of writing my own engine for FF7 for the Remake project, after all, but with far less of the field format decoded it was obviously of limited use. Although if I had time it'd be interesting to update it based on what's now known about the field files.

That said, if any new development is in C++ and CVS it counts me out.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Learning C++ in your sleep
« Reply #11 on: 2005-01-14 20:04:25 »
ANSI C++ - that's good
Well I've told people many times in game programing forums that your basic game needs to be thought out before you make it look cool.

Halkun - your perspective of DLL's I think is rather limited.  You can use DLL's with Linux and or Windows quite fluidly. The difference is in the interface usage but that is something you can abstract with a standard interface for both OS's I don't see it as a difficult or added bit of work.  Using DLL's you should realize has absolutely NOTHING TO DO WITH MEMORY.  It's called divide and conquer. I am very adverse of piling the whole thing together in a code hodge podge. Especially with so many diverse hands potentially in the pot.  I suppose for the initial developement cycle it will be fine however.  Perhaps < 0.XXX.XXX.XXXXX will be pre developement. Then after there is enough understand 1.XXX.XXX.XXXXX can be defined developement.  I can guess the initial code will have to be a potpori of mods.  Doesn't mean I like it :)

I think the first order of business would be to define the interface, what section does what.  The FIELD module is loaded by the kernel right?  What files are used by the kernel? I think kernel.bin might be a good start point for looking at how the system boots.

Obviously creating custom substitute content might be something desireable in the future.  That will require a database and method of handling alternate loading methods for enhanced models.  This means it will have to wait tell the existing system is defined.  I suppose things can be made with the idea in mind it would be added later.

CVS is fine. I'll have to brush up on it's use.  I believe there are better tools these days for managing such projects.  My biggest issue with not using DLL's is too many fingers in the pie syndrom.  This is why DLL's save your bacon.  It creates multiple CVS tree's instead of one big mosh pit.  I hate the mosh pit problems :)

CVS - fine

Title we can call it FF-Engine.   with no definition of what F and F stands for.  It doesn't use any trademarkable names.  As for a description of the project.  I would say 'engine to run original Final Fantasy content for 7.'  Sufficiently vague that people won't be anoying and it's obfuscated enough that scan searchers won't find them and play 'alert the legal department'. Remember this is not a remake it's an engine to run there content. There is a BIG BIG difference.

Title - Make one that divorces itself from trademarked names and lawyers
Suggestion: FF-Engine

Description state what it is only nothing more.  Engine for running FF content. No Final  -- Fantasy etc in there.  No 'We want to run FF7 with this engine and add custom content'.  Bare bones.  Those working on it will know what it's about.  If someone joins because they understand what it is (and are bright enough to realize what it ISN'T), good.  :)
Suggestion: Engine for running FF content.

As for Halkun's excitment hehehe that's fine if you enjoy that stuff. Sadly I think I would like the thing to just get to the point of the game start, no actual graphics given.  So I suppose we are pretty much agreed on get the basics of the 'kernel' working before one worries of 'how do we draw that line!'

Cyb

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Engine building. If we make it, will they come?
« Reply #12 on: 2005-01-14 23:16:28 »
Quote from: ficedula

That said, if any new development is in C++ and CVS it counts me out.


You know, I was thinking about this at work....
I admit, I once upon a time used pascal to teach myself programming, and as you use delphi, you are the odd one out.

Actually I am too.

You see, after three days of fighting with C++, I'm just having a bear of a time with it. It's not that I don't understand the tools, but I just can't figure out *when* to use them. Not only this, I'm getting really frustrated with having to follow the "rules" of C++. Especally when it breaks how I'm used to coding. You see "class", I see "struct with a function in it". You see "inheritence", I see "obscuring". You see "new", and I see "Fancy malloc()" It just seems redundent for things I know how to do to get things working.

Let me get some things off my chest... I know I'm gonna seem like I'm flip-plopping and it's natural to have an idea and quickly abandon it. The sad thing is I see everyone agree with me, and then I'm forced say "Oops, I'm sorry, I changed my mind"

I'm not really keen on any type of plugin system. I know there is a lot of "thinking ahead". (Can't we exted the engine to also handle FF8? What about PE?) This is something ScummVM does, but also doesn't use a plugin system. Square doen't use a plugin system either, they simply grab code from thier repository and reuse it. I'm sure there are bunches of FF6 code in FF7. I'm sure there is bunches of FF7 code in PE. (It's direct decendant, not FF8), but I'm leary of the complexity and am not confortable with it. I *bearly* know how to generate an .so file.  (read: I've seen the insructions before) I'm not intrested in trying to catch a moving target right now. I do enough of that in WINE ^_^
 
Here's another issue. When I started drawing out my UML template in DIA based on the source filename dump from ff7.exe. I coudn't help but to feel that I was, in effect, ripping off thier system. I placed myself in the shoes of a Square employee who came across this infomation and showed it to his boss. I'm pretty sure if he saw the source filename dump, all kinds of bells and whistles would go off. I'm also sure an audit will get shot to edios to see who leaked thier code. (This is why I have a *ONE LINE* command in gears  at the top showing it's tivial to gain the same information.)

Creating something so close I feel is a little warm for me. Heck, SCO is calling infringement on 5 lines of preprosser code.

I feel more comfortable doing it in a different language, and one that fits me like a warm glove that I haven't worn in a while. I'm also confident that my very unique module management will show it's a reimplemtation, and not a ripoff.

Here's what I'm going to do....

This weekend I'm pulling Naru (my server) offline for a much needed hardware/software uograde. I'll be diverting my webserver to, of all things, an old win98 box running apachie. (I found this on a hard drive I had lying around.  ^_^)

After that I'm going to code up a really basic framework in the form of a console app. However, it will be in C, the way I feel confortable coding in. I'm just getting way too frustrated with C++ I have my own very unique way of coding and handeling modules. Even though it's C, I have methods to write manageable modules and orginazed code.. I'll post what I have and you all can gasp at it, point, roll your eyes, what have you.

It's gonna have a Unix-type makefile and depend on zlib. It should compile on win32 using Cygwin

We can have a code battle. The worst things that's going to happen is we learn something, even if it goes nowhere.

Anyways, I want to see somone say "Hal, that is the most insane looking code I've ever seen."

And I will smile quietly to myself...

^_^

### EDIT ###
Goddangit, I *REFUSE* to have C++ kick my ass! I'm gonna learn this language even if it kills me.

I bought a new C++ book, this one is ISO Standard compliant. It also has some other goodies.

-Design patterns
-Standard Template Library
-Whole chapter dedictaed to namespaces
--OO analyisis and using UML for proper code devolopment

This was not in my last book. The other on was written like "C and a bunch of new junk". This starts me out right I think.. Don't mind me, I'm just going crazy... ^_^

Cyberman

  • *
  • Posts: 1572
    • View Profile
Engine building. If we make it, will they come?
« Reply #13 on: 2005-01-15 04:39:53 »
Ummm Halkun C is easy stuff. I learned in this order.
BASIC which I dumped for asembly and BASIC
then assembly then OS9 and assembly then BASIC09 then pascal then C then several languages then finally C++.  I knew small talk before I used C++ in fact I used prolog before I used C++.  So I had a lot of monkeying around done already.  

You can use DLL's in C just nicely too ;)
I think you are just hung up on the mechanics Halkun once you understand the mechanics iit becomes more like "DUH why the hecked didn't I do it this way to begin with' type thing.
Delphi I can do it's just not overly portable to Linux :)

DLL's can work in Delphi and Delphi DLL's can work in C or C++.  I think you are stuck with the fact its a DLL and it looks 'complicated'.  It's not actually. You don't even need to use a SO notation on Linux DLL's just do some browsing and thinking.

Thinking will get you further along.

Now as for the original language I believe Square used C and Asembly with the PSYQ developement dohuckey. :)

I suggest Halkun you are killing brain cells unnecessarily on the C++ spectrum. Essentially C++ is an extension of C.  Work from that point and things will make more sense.  Deal with each aspect of OOP as you think abou tit. That's how I learned it. Took a while but it's like second nature now.

Cyb

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Engine building. If we make it, will they come?
« Reply #14 on: 2005-01-15 05:02:04 »
Square used C++, look at Gears, I have a partial source code file name listing of the original code in the back. I always wanted to write a shell script to recreate the original source tree on linux with the "touch" command, but you can't touch a file in a subdirectory without making the subdirectory first.

This new book is cool. It's a revsion of the same book I was reading before, but all the WTF parts are now explained properly. That and the example code is all fixed. There are also, "Oh for you C coders...." that explains methods behind the madness of polymorphism and other C++ intrensics. They show example code in C and then in C++ to acheive the same thing. I can see why they put functions in stucts now.

dog.times_to_bark==5;
dog.bark();

or mre usefully,

file.type=="bin";
file.open(filename);

I'm getting it.

EDIT
Is it me, or when my book says that C++ is "strongly typed" I see a programmer slamming the keys when he's coding?

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Engine building. If we make it, will they come?
« Reply #15 on: 2005-01-15 07:06:10 »
Well this topic just exploded while I was in the hospital.


A lot for me to cover, so I will miss a lot.


Okay, firstly, we might all know some about my project and if we don’t, well let’s not go into too much detail about its intent.
I can, however, go into full detail about its current capabilities, since they all fall within the “Model Viewer” category for now.


Firstly, I should mention that my project has been in the works for over 2 or 3 years now and when I started it I wasn’t solid at programming, and was looking for a fun way into DirectX®.
But because of my lack of experience when I started the project I did not modularize everything, or create .dll’s for any specific part of my engine.
In other words, most of it is written to work only within itself.  Some things depend on other things, which are somewhat hard coded (though very rarely).

The things my engine can do:
Code: [Select]
Load .tex files and convert them into .bmp files for use with DirectX® (modular).
Load all 3-D model files, attaching colors and textures to them correctly (modular).
Load hierarchy files.  Both on over world models and battle models (mostly modular).
Load over world animation files.
Load the first frame of most battle animation files.
Load Kernel.bin and/or Kernel2.bin, minus the save information because my engine will not use it (modular).
This information includes all weapon, armor, item, attack, command, accessory, Materia, and character names, data, and descriptions.
Load battle scenes.
This includes the battle world (3-D entities) and placing enemies in the correct positions on the scene (but not always the correct direction).
Enemy information both per enemy type and per enemy instance is loaded during the loading of a battle scene.
80% functional menu system.  Buttons, images, bars, icons, text, etc., are done.  But new controls and unique controls are not.  These include sliding bar controls and text-input boxes.
Unpack LZS and GZ files as well as extract files from LGP archives.


However, my engine does not:
Code: [Select]
Show transparency in 3-D models (yet).
Load the 2-D field files.
Load the over world 3-D map tree.
Animate battle models.
Load any walk meshes.
Run battles or provide any engine for proceeding through the course of a battle, imaginary or real-time.



I already have C++ with DirectX® code for loading the 3-D model files, and ALL of my code is 100% stable with one exception: the maximum path length for Windows® is 260 characters, which means if you copy my executable into a folder tree with over 250 characters, it will not be able to create some of the files it needs to run.  Okay, so that is a stupid problem which is easy to fix but other than that, it’s stable and runs with 0 memory leaks.
I often leave it on as a screensaver over night.  During that time it will load a new map scene (3-D battle world, all monsters in the fight, all data for the monsters, etc.) about 1,560 times.  Checks reveal no memory losses or crashes.

So, although the early code is a little sloppy, it is stable.



However, I do not use the same menu system as in the original.
I have made my own menu engine and my menus are reconstructed that way.  This is for speed and size.  My menus are extremely faster than theirs and at extremely high resolutions.
In their menus, for example, the text redrawn to the screen each frame.
In my menus, the menu is drawn once and saved as an image.  Then the image is drawn.  The downside to this is that some menus are huge and some video cards do not support that size of bitmaps.





So now to the point.
I’ve already got a lot done on an engine remake, although mine is not geared in the same direction as the one proposed here.
However, mine is geared similarly enough that it can be of use to this project as well, should everyone get organized and decide on a language and specifications.
I know that OpenGL® is favored here and my code is DirectX® (for compatibility), but the rest of my code, in C++, should be useable directly.
I imagine that my coding to load the 3-D models and texture files will work after a simple copy/paste and change from DirectX® to OpenGL®.

I can help in many ways, but I am afraid I can do no direct coding on the project, or little to say the most.
I am overrun by my job and my projects, and I am still working on the battle animation file format, all while searching for a female companion and sitting alone in dark loud pubs while my Japanese friends dance and hang out with rich kids who don’t know how to drive.

At the same time, I would like to ask for your assistance when your engine does something mine does not.


L. Spiro




P. S.: halkun, err, I can show you how to use zlib with this project if you would like.  My engine uses those libraries already to get everything out of BATTLE.BIN and Kernel.bin.
And, as for Almighty_gir, well, in another topic I have mentioned that I would be willing to give my project to SquareEnix Co., Ltd., just to ensure that it sees the light of day, however, under the condition that they keep the original’s graphics throughout all of it.
The problem I have is with companies thinking every detail about games is in graphics, causing them to forget the game play.  Well, that isn’t quite the case here, since we already know Final Fantasy® VII has game play, and we aren’t talking only about graphics.
However, Final Fantasy® VII, in any form, in any future release, MUST have the same graphics it has now in order to be worth mentioning at all.
These are the graphics people loved.
These are the graphics people remembered.
The corny square-armed creatures with tiny elbows are exactly what gave the game its graphic appeal, and now it is more about nostalgia than anything else.
If the graphics are changed, just forget the project.  Consider it a flop before you even bother to release it.
Well, that’s where my project stands anyway.
You guys can do as you like with yours.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Engine building. If we make it, will they come?
« Reply #16 on: 2005-01-15 12:40:52 »
Wow, I'm impressed.

Sadly, I don't think square will ever accept your engine, even if it was 100 polished with all the bells and whistles, simply for legal reasons alone.

Most of the companies I know either see such a project as benign (Sierra AGI) or with a degree of legal trepidation. (With ScummVM, LucasArts kept saying "We like it, but we have Lawyers" when the project hit critical mass. This caused new versions to be delayed with things were "negotialted", in the end ScummVM started releasing updated versions to the silence to LucasArts.) Many original creaters have come forth and said "good job" to all these engines, but have long been stripped of power to do anything. I have seen more than my share of programmers say "I wish I could give you the rights to the game, but I don't own them, XXXMegacorp does when my company was bought by them."

--- WILL POST MORE WHEN I GET TO WORK --- ^_^

I took a little look at how C++ does files (I skipped to chaper 19) and I'm not very happy with it. I'll have to burn that bridge when I get to it. I brought my laptop into work so I can work on C++ programming. I'm going to take it day-by-day for a month to get everything down.

Did you use streams to open kernel.bin? In that case at my current level, I won't know what it does. I'm figureing out what constructers and destruters are right now. (Heck, I'm not even in pointers yet, and really stron math based systems like recursion I don't understand as I'm innumerate.

Why don't you create a savemap? Is it that online thingy you are trying to make?

Here's omething you should read written by a guy who was in chagre of the "Utima Online" launch and the "Sims Online" launch.

http://archive.gamespy.com/gdc2003/top10mmog/

I would like to see the code on how you loaded kernel/2.bin

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Engine building. If we make it, will they come?
« Reply #17 on: 2005-01-15 14:08:12 »
I don’t think they will either, which is why I stay low.

As for how C++ does files, well-
There are several libraries available that handle files, and most likely your books goes through <iostream.h>.
Of course you would be looking at cout and cin (oh God how terrible) in that case.
Some people prefer streaming with stdio.h’s file streams.

FILE * fIn = fopen( "C:\\Kernel.bin", "rb" );
for ( int I = 0; I < iTotal; I++ ) {
   fread( &iChunkSize, 4, 1, fIn );
}
fclose( fIn );


I prefer using Windows® own CreateFile() and ReadFile(); they are lower level and thread-safe.
I had a major threading problem with my project when I gave maps the ability to load on seperate threads in the background caused by fread().  I converted my entire project to use CreateFile()/ReadFile().

So, the answer would be that I do not use streams to load the file.

Yes, it is the online project.


Kernel.bin:
First I read into the file to get the starting offset and size of the chunk (section) I want to get.
Then I call a function with those parameters to take that area of the file and save it to hard disk as a seperate file.
On the new file, I use the GZip library to read the bytes as a decompressed stream.
This stream works in exactly the same way as fread (as mentioned above) except that it is “gzread( gzFile, byte *, int )”.

The way the GZip library works-
You never have to call anything to decompress the files.
Once you open the file, it is fed into a memory stream as a decompressed data automatically, from which you read the bytes you need without worrying about whether or not they are decompressed.

I can supply hairy coding to this but it relies on a lot of other areas of my project, which may in turn rely on others.
If you want it, I can send it somewhere.


L. Spiro

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Engine building. If we make it, will they come?
« Reply #18 on: 2005-01-15 14:20:12 »
That's fine, I can use fopen(). It's nice you can mix C and C++ sometimes.

Can you do me a favor, it's a request, not a demand, but could you please drop the "®" at the end of trademarked names? It makes your posts a little painful to read. I think that everyone on this board can nod thier head and agree that "all trademarks are property of thier respective owners." This information is kind of a given. We all know that Final Fantasy is a registerd trademark of SquareEnix. One of the cool things about free speech is that you dont have to legally check yourself when simply talking.

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Engine building. If we make it, will they come?
« Reply #19 on: 2005-01-15 14:29:15 »
Sure, sure, we don’t have to legally check ourselves when we talk regularly.
But when I regularly talk in person I say “Final Fantasy registered trademark Seven”.  You know it’s proper.

Actually you see I jest.  Hahaha.  It’s humor in the form of sarcasm.


Well, ever since my severe beatings as a child I have had to type as properly and punctually as possible.  That’s why I spell-check everything before I post (except my last post, because I had to call a girl so I fell short on time) and use proper characters (for instance character 133 instead of “...”).


I am not doing it to be annoying or because I feel I must legally guard my back.
I do it because it is proper.  It’s part of the name of the game.
I’ve been banned from chat rooms for the same thing.
I’m not lazy.  I don’t slack on my typing.  Appearance, punctuality, and properness are important.

Anyway, I will try to avoid it on this forum but no guarantees.
It’s more than habit.
It actually hurts me to not type all names in their full and proper.


L. Spiro

Qhimm

  • Founder
  • *
  • Posts: 1996
    • View Profile
    • Qhimm.com
Engine building. If we make it, will they come?
« Reply #20 on: 2005-01-15 14:29:50 »
Comment: It would definitely be handy if we had a more real-time way to communicate for this project to work. Particularly at this early stage we need discussion meetings, which in all honesty is a bit hard if you have to wait 24 hours for everyone to nod their head. Of course everyone can't attend the meetings (silly time zones), but at least some person-to-person discussion needs to take place (preferably logged for future reference). For example, I'd like to have a talk with halkun about the guidelines for the kernel and surrounding framework, as well as any source formatting / file naming rules, before any serious coding work is started (to prevent unnecessary work later). Now I've heard you have a Yahoo IM account, but never seen you online, so perhaps you can suggest a better means... ^^

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Engine building. If we make it, will they come?
« Reply #21 on: 2005-01-15 14:43:11 »
I know there are buttons along each of my posts which will allow anyone access to my Yahoo! Messenger, MSN Messenger, and ICQ account names, but in case some do not want to hold the mouse over the button an jot down the little text at the bottom of the screen, I will post.


ICQ: 36242040, named “L. Spiro”.  I do not use ICQ because it is nothing but fucking porn bots.
Yahoo! Messenger: shyamarakeensunderjayaramenen. On daily.
MSN Messenger: [email protected].  On daily.
IRC: irc.dynamix.com, #FF7.  On daily.
Skype: L-Spiro.  On daily.

My IRC server is very good.  I am not the owner but it has good IRC services and I know the owner/operator.  It is an official server operated through Vivendi for game purposes, but it is not overrun as are Enter The Game, EFnet, DALnet, etc., so it is very fast.
IRC of course is a way we can all be there as we are available and have a backbuffer to check on things we missed, as well as logging, and of course it is capable of group meetings.

It is definitely the best I have seen, and I have seen a lot.

If we want to set up there I can arrange a private locked room without problem.  I know everyone on the server so if we ever need anything, well, we have 800 resources.


L. Spiro

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Engine building. If we make it, will they come?
« Reply #22 on: 2005-01-15 14:59:06 »
All this talking about doing stuff made me actually break out my FF7 data again ;)

I don't know whether it would be of any use to any new project but for what it's worth, I recompiled the Remake engine and fixed a few display bugs in it, so get it while it's hot.

In terms of what's done ... the menu system is essentially complete of course (and that includes equipment, materia, and items affecting your command list, stats, resistances and so on). The field system ... somewhat. The backend is all there - scrollable layered 2d backgrounds, 3d characters, collisions between models, and so on.

The bad news, such as it is, is naturally that it doesn't read scripts or walkmaps etc. out of the field files because they weren't decoded 3 years ago ;)  That said, it reads the field backgrounds and the models from the original LGP's, so it's not entirely useless...just that a fair amount of information is written in the Remake engines own data formats (especially scripts, since for a remake, you wouldn't necessarily use the original ones anyway, so I never really looked at decoding them...)

If anyone wants to test it, download, unrar it, run the config to at a minimum set your FF7 data path, and then run it. The best thing to test would be to load game 3 from save slot 1 (Wall Market).

I do tend to use IRC myself more than other networks; I'm usually on irc.uwcs.co.uk / #anime, but I could join another network to talk about stuff, perhaps.

L. Spiro

  • *
  • Posts: 797
    • View Profile
    • http://www.memoryhacking.com/index.php
Engine building. If we make it, will they come?
« Reply #23 on: 2005-01-15 15:08:36 »
ficedula, I tried to make my engine load the overworld 2-D map files and so I went to your site, got your explaination of the file format, and started a quicky mIRC project to run through and see if I could load any of the 2-D field file images.

Well, no, I couldn’t, and I could’t follow your code either.
And I also know that your current version of LGP Tools is much further along than that document states.

I was wondering if you had any more recent or more full explanations of how to load the files.


L. Spiro

P. S.:  I am testing the remake now but it will not work for me.
I open remake_config.exe to be greeted by the following message:
Access violation at address 004768F4 in module 'remake_config.exe'. Read of address 00000000.
After this, all of the text boxes are empty, devoid of all options, except a few, and I am not able to select any languages, so it will not allow me to save my changes.

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
Engine building. If we make it, will they come?
« Reply #24 on: 2005-01-15 15:17:52 »
Yeah, the document isn't fully up to date.

However, for the walkmap and camera, you want Kero's explanation - I haven't really even tried his data yet.

Background wise, the description I posted is very nearly complete to what I know; all it's missing is that basically Sprite.Sfx != 0 indicates a transparent tile. I personally treat transparency as a third layer over the two normal background layers. There might be other meanings to Sfx, but so far, all I know is that treating the tile as transparent works pretty well (ie. looks good) ;)