PDA

View Full Version : Progress Report



Gleeok
12-11-2014, 12:13 AM
There's really not been a whole lot of activity here recently (partly my fault being busy with real life and all), so I thought I'd just post any and all updates in this thread for the time being just to let you all know how it's coming along.

Anyway I started working on this again last week (after a long hiatus for 6 months), so there's that. :P


First big thing:
The entire scripting engine was removes and replaced with an embedded .NET runtime with a new scripting engine that integrates with mono. This means that pretty much any c# code will work with the game, including the entire core lib etc. Script code will be jit compiled (or possibly aot-compiled) which will mean that scripts will run at speeds comparable to c++, especially since the engine does a lot of the heavy lifting and is implemented as internal calls, not Marshalling, for core functions. So yes, all the high-level game logic will be written in c# which means they can be modified or rewritten to make any type of jrpg.

I've also added a fairly large math library and the usual set of graphics and and exposed engine classes to the c# framework, and of course started writing scripts as more methods become available to access.

Updated graphics:
This one was bugging me, so I'm in the process of updating all the textures and generating all the maps, tilesets, and tiles. It's about 90% there. There's still some weird layer information that I can't quite get right. Example:

http://postimg.org/image/i3b3vnlwj/
http://postimg.org/image/uukoioc5x/

http://s29.postimg.org/i3b3vnlwj/ff1psptowntest.jpg (http://postimg.org/image/i3b3vnlwj/)
..
http://s10.postimg.org/uukoioc5x/ff1psptest.jpg (http://postimg.org/image/uukoioc5x/)

Tamamo
12-12-2014, 12:42 PM
Death to the purple stuff!
Let's see who get's that reference.

In all seriousness coding GUI is a bitch, hopefully your pass that part now. Looking forward to the C# implementation.
Dis gon be gud

Gleeok
12-16-2014, 01:45 AM
Added compression and binary serialization to maps and tilesets. With that done I was now able to generate all 123 Maps and 47 tilesets in the game! f.u.c.k. y.e.s.

Side note: If anyone can convert AT3 files to .ogg or .mp3s let me know, otherwise I think I'll just use midis.




In all seriousness coding GUI is a bitch, hopefully your pass that part now. Looking forward to the C# implementation.
Dis gon be gud

Sadly, editing tools are almost non-existent still. Flash Man disappeared and no one took over that part of it. c# or QT are probably good candidates for it but I just don't have the time to work on an editor at all.

Tamamo
12-16-2014, 10:49 AM
Man that sucks big time. Why not use the nsf?

ctrl-alt-delete
12-16-2014, 01:15 PM
Added compression and binary serialization to maps and tilesets. With that done I was now able to generate all 123 Maps and 47 tilesets in the game! f.u.c.k. y.e.s.

Side note: If anyone can convert AT3 files to .ogg or .mp3s let me know, otherwise I think I'll just use midis.




Sadly, editing tools are almost non-existent still. Flash Man disappeared and no one took over that part of it. c# or QT are probably good candidates for it but I just don't have the time to work on an editor at all.

http://www.marcnetsystem.co.uk/himdrenderer054.zip

Try that. If it doesn't work, I can use some PSP homebrew to do the job but you'll have to give me a couple of weeks.

Also, apparently this works.

http://kickass.so/usearch/goldwave/

TheDarkOne
03-20-2015, 03:27 PM
Is this project still going? I always loved the original Final Fantasy, so I'd be interested in a remake the way ZC was done.

ctrl-alt-delete
03-20-2015, 04:08 PM
Yeah, man, where we at?

Tamamo
05-02-2015, 01:26 PM
if I would get off my ass and learn C# and mono i could help. sigh.

War Lord
05-03-2015, 10:03 PM
This looks fantastic sir.
Hopefully you're still working on it.

Tamamo
05-04-2015, 05:40 PM
He is, talked to him on irc last night.

Binx
06-02-2015, 05:39 PM
Looks gorgeous. I can't wait to see what comes out, here.

Gleeok
06-22-2015, 04:47 AM
Hey guys. Yep, still working on it. I've had a RL project I've been working on that gets priority, but I've been slowly churning away on it.

If anyone is interested, here are about half the total sprites and graphics from the PSP version of FF1, along with the maps and tilesets. (The binary formats are all compressed but the source code will be available shortly, so it would be possible to convert the data to another format, say to RPG Maker or whatever, as long as you have a serializer or specification for that format.)

http://lodge.magesguild.net:11180/~gleeok/FF1_PSP_Assets.zip


Besides that I've been doing a lot of refactoring--there is no separate rpglib anymore, for example--and fixing a few design problems and bugs, along with some scripting.
There are now very few dependencies as everything is built-in to a core library; there are not even any c++ standard headers included, and it uses no c++ STL whatsoever. Compile times are also insanely fast.
Now that most of the major components are mostly done (except UI *cough*), I'm strongly leaning toward a "simpler is better" mentality, getting away from the (sometimes unproductive) default OOP mindset, and trying to write more data-oriented in general.

I also just realized I should take more screenshots. I am very bad about that. :/ ...I should just add a built-in screenshot function I guess. :P

Samer
06-22-2015, 12:28 PM
Gleeok

I've never done DOP before, yet I would believe OOP is simplier.
I can't think of a single decent game engine that uses DOP.

Edit: However, if you are the only one working on this, then do what's more simple for you yet things like this take teams with 100+ developers to get it done in a "reasonable" amount of time.

Just do what you think is best

Best screen capture tool ever
https://www.techsmith.com/download/jing/

Anarchy_Balsac
07-03-2015, 02:22 AM
Gleeok

I've never done DOP before, yet I would believe OOP is simplier.
I can't think of a single decent game engine that uses DOP.

Edit: However, if you are the only one working on this, then do what's more simple for you yet things like this take teams with 100+ developers to get it done in a "reasonable" amount of time.

Just do what you think is best

Best screen capture tool ever
https://www.techsmith.com/download/jing/

I think he's just saying he prefers to do what works, rather than stick established programming mindsets. OOP is efficient and mostly optimal, but there are times when you don't NEED to create an object for something in your program, and when doing so can actually overcomplicate a more simple procedure. This is not the case in general, but there are indeed situations.

Gleeok
07-03-2015, 04:53 AM
Hey, it's Anarchy_Balsac. What's up; you ever manage to get a hold of that quest?

Yeah. What I meant is that I got into a habit of just defaulting to Mr. OOP template wizard, instead of first thinking about the problem and finding the simplest solution. The simplest solution, as it turns out, is not what it seems if you just think in terms of OOP. What happened is that most of the mid level code is more of a pain to use/refactor than it should be. Instead of making some data reusable it should just be made usable instead. It took me about 5 years to figure it out but I'm getting on to you c++. :P

Anyway, got it compiled again today. Placeholders are being removed one by one and new things are getting done again. Put in a screenshot function today, and messed with fonts a bit, particularly generating shadowed foonts.

http://s29.postimg.org/kj011r61v/screenshot.jpg (http://postimg.org/image/kj011r61v/)
Caption: "It's not upside down!!"

2 things:
1) I'm not digging that resolution [480x280], it looks to tight in the Y direction--not enough tiles--although it is 16:9 aspect, but, the battle backgrounds height are only 312.
2) Can't get fonts to how I want them. I may just put new font stuff on hold until I have an artist helping.

Anarchy_Balsac
07-03-2015, 01:02 PM
No I sure didn't, I'm making its spiritual successor though. But yeah, focusing too much on OOP can be a hazard.

For the layman:

Good OOP:

- Makes RPG character as object
- Adds character stats and misc info into character object
- Makes one time character lines and other throwaway game elements into simple data since it will only be used once and/or has to be made unique to each circumstance anyway.

Bad OOP:
- Makes RPG character into object
- Makes each character stat into subobject
- Makes character lines and other one time use data into objects as well, only to just end up using the objects once.

It's a lot more complicated than that, but that's the general gist. OOP is good, but it's easy to get bogged down by it if you shoehorn your code into it. The code should serve the program, not the other way around.

Samer
07-03-2015, 05:00 PM
Yeah, I agree there are times when OOP does not work without serious planning.
Requirements in software change on a constant basis, data oriented is good if you are sure it is as good as you think it can be.
It is a lot more tedious to patch it up though. Software is always going to be complex no matter what approach you use, so whatever
the developer thinks is best is the best. Democracy does not work in development since nothing will get done. Discussing ideas is another matter entirely.

There are times in my own projects where I make my classes strictly as data instead of objects.
Sometimes my impulsiveness gets the best of me. I honestly try not to act superior, just letting people know what I know. Gleeok has a lot more experience than me (I am still a student) so I take his wisdom to heart.
I appreciate you too Anarchy_Balsac. I learn from stuff like this.

Thanks for all the wisdom.

Gleeok
07-03-2015, 08:10 PM
Well, to be fair most of the code was written in the last 2 1/2 years so it is almost all OO. It's not like I'll switch to c-style coding or anything since it won't be consistent with everything else already written. It'll still all be objects.

I'll try to post actual code when it comes up so you guys can get a context, then we can argue about it until we are foaming at the mouth. :P

Gleeok
07-05-2015, 06:24 AM
No I sure didn't, I'm making its spiritual successor though. But yeah, focusing too much on OOP can be a hazard.

For the layman:

Good OOP:

- Makes RPG character as object
- Adds character stats and misc info into character object
- Makes one time character lines and other throwaway game elements into simple data since it will only be used once and/or has to be made unique to each circumstance anyway.

Bad OOP:
- Makes RPG character into object
- Makes each character stat into subobject
- Makes character lines and other one time use data into objects as well, only to just end up using the objects once.

It's a lot more complicated than that, but that's the general gist. OOP is good, but it's easy to get bogged down by it if you shoehorn your code into it. The code should serve the program, not the other way around.

It's funny you mention this because I literally have a butt-load of different ways to put in stats, modifiers, states, auto-abilities, etc. that I haven't decided yet and have just pushed that off to the side until battles are fully script-able. it's just arrays right now. It's a tricky thing to get right. I'll even just go ahead and say that rpgmaker fails at this IMO.


Anyway. Today was get off your lazy ass and "finalize the dang tile specification already" day. So that's done. That might be a whole other post though.


Also refined map spritesets. This means full on map entities will be done in a jiff. [1]
http://s29.postimg.org/c7hhtejlf/screenshot.jpg (http://postimg.org/image/c7hhtejlf/)
"Rock on hero dude, rock on."

Those specs are easy:
-Animations are packed fixed point and have up to 0.0625-th of a frame speed (This equals roughly 1 millisecond accuracy). This is because anything higher is not perceptible to the human brain. If you are a fly then you can complain. :P
-Any map object spriteset can have any number of animations. They are not separated into 'directions', and they cannot be referenced by strings (I think strings are stupid for that because they are not type safe and just waste space, eg; spriteset.state = WalkingUpEnum is better than spriteset.state = "waklingup "<--oops, typo.). I don't like to be constrained to having direction arrays of animation arrays as well, so it's just wham bam single array easy with the small catch that you have to make sure every sprite is set up correctly to how it is handled logically. ...uhh, and that's it really. :P

So for example an octorock like in ZC would just have an animation for each dir[4], and that's it. ...although(!), each animation can be x or y flipped individually so it could just be 2 animations. ...err, actually(!) spritesets can be rotated too so /technically/ they can just be one animation... uhh... whatever is easiest to set up for you I guess. Whatever. It's late and I'm tired. x_x


[1] : Jiff. A unit of measurement. No idea what the heck it is though.

Tamamo
07-07-2015, 01:46 PM
If battles are fully scriptable that means we can do something like this right?
https://www.youtube.com/watch?v=MYnZbG-MXLw
Gleeok

Gleeok
11-14-2015, 11:28 PM
Spent about 12 hours this week on it; about 4 on misc stuff and 8 hours compiling and doing a damage report on the map editor. Yes, that's really how long it took to fix about 1200 errors and crashes in the editor code (It hasn't been touched in many years--I hate it). So yeah, not really sure what to do about it. Editor still seems to be too much of a time sink for me right now. Might hack something together with it. We'll see.

Tamamo
11-15-2015, 09:59 AM
Gleeok
Why not just rewrite the editor from scratch?

Gleeok
11-15-2015, 11:28 AM
Gleeok
Why not just rewrite the editor from scratch?

Well, that was the plan from the beginning. Problem is it just never happened and I don't have the time to just willy-nilly "write an editor from scratch." Hence the just hack something together for now approach. Not sure what it'll be, though. Maybe I'll think of something.

Anarchy_Balsac
11-15-2015, 08:14 PM
Gleeok

Code Jury-Rigging in other words.

Gleeok
12-26-2015, 07:52 AM
It's a Christmas miracle! : I compiled the editor and added in a file tree which gets populated at start--basically like loading a quest but there's only one quest, etc. So, all game assets are now stored with the project file--basically like a game header, if that makes sense. The good news is that the engine has been updated to load complete "games" which crosses off about 30 todo's off my list. The bad news is without one it doesn't do anything, really. :x Also deleted about 10,000 LOC which was overdue.

Added initial support for in-game editing as well. Currently there is only an 'active tileset' tile-mask mode, for solidity stuff, however, so now we have collisions and a debug draw:

http://s18.postimg.org/oowkldzn9/screenshot.jpg (http://postimg.org/image/oowkldzn9/)
I'll have to figure out the door situation after warp events I suppose....

Collision works the same way so far as just about any 2D game, including ALTTP and ZC. Each cell is split into 4 masks, which gives the option of diagonal or half-tile movement; although by default FF simply uses full tiles, so that's what I'll do.


Also, apparently we are at 774 assets so far. If anybody is wondering why it's taking so long it's probably because of that. (...or the 80,000 lines of code might have something to do with it. :P ) NPC spritesets are the next thing on my list. Every map is going to have bats on it... lots and lots of bats. :)

PS: I was profiling two different spriteset implementations I wrote (because I couldn't decide which one should get replaced), so I did a stress test while I was at it (You know, for fun) and had 1600 fully animated and scripted NPC's on screen and it was like 1% of the total frame time--I fucking kid you not. Of course the scripts don't do anything right now--collision and moving are nice, I know-- but that's still pretty absurd. I used to think we were about 80x faster than rpg maker but right now I'm thinking more like 400x is ballpark... That can't be right...

ZoriaRPG
12-26-2015, 03:25 PM
It's a Christmas miracle! : I compiled the editor and added in a file tree which gets populated at start--basically like loading a quest but there's only one quest, etc. So, all game assets are now stored with the project file--basically like a game header, if that makes sense. The good news is that the engine has been updated to load complete "games" which crosses off about 30 todo's off my list. The bad news is without one it doesn't do anything, really. :x Also deleted about 10,000 LOC which was overdue.

Added initial support for in-game editing as well. Currently there is only an 'active tileset' tile-mask mode, for solidity stuff, however, so now we have collisions and a debug draw:

http://s18.postimg.org/oowkldzn9/screenshot.jpg (http://postimg.org/image/oowkldzn9/)
I'll have to figure out the door situation after warp events I suppose....

Collision works the same way so far as just about any 2D game, including ALTTP and ZC. Each cell is split into 4 masks, which gives the option of diagonal or half-tile movement; although by default FF simply uses full tiles, so that's what I'll do.


Also, apparently we are at 774 assets so far. If anybody is wondering why it's taking so long it's probably because of that. (...or the 80,000 lines of code might have something to do with it. :P ) NPC spritesets are the next thing on my list. Every map is going to have bats on it... lots and lots of bats. :)

PS: I was profiling two different spriteset implementations I wrote (because I couldn't decide which one should get replaced), so I did a stress test while I was at it (You know, for fun) and had 1600 fully animated and scripted NPC's on screen and it was like 1% of the total frame time--I fucking kid you not. Of course the scripts don't do anything right now--collision and moving are nice, I know-- but that's still pretty absurd. I used to think we were about 80x faster than rpg maker but right now I'm thinking more like 400x is ballpark... That can't be right...



What routines were those 1600 NPCs running? Movement, walkability, collision, solidity detection, character detection, event preprocessing, string updating (based on triggers)?

It's fantastic, of course; and RPG Maker isn't exactly optimised in any way whatever. It was never meant to be, which is part of the problem. Clearly, you did something right; unless some existing components weren't running. So, where is our testing copy? :p

Gleeok
12-26-2015, 07:29 PM
What routines were those 1600 NPCs running? Movement, walkability, collision, solidity detection, character detection, event preprocessing, string updating (based on triggers)?


Like I said; none. Just an empty script.

Most of those things are all the same thing though. It's not like NPCs in RPGs are really complex until you add in messages with events, etc. But even those are only run when activated so I don't think it'll matter much.

The way rpg maker, game maker, et al. do it is everything is a "god object'. ex; an npc is an event is an sprite is an waypoint is a object is a battle character, etc. IMHO this is the worst kind of abuse of OOP design, and is just bad to do whenever performance is an issue. I'm not doing this at all. I'll be putting in small, specialized cases. If you want a warp event at location x,y, you don't put a particle system or NPC there, you put a warp there. It's just common sense. Only a player can interact with warps so that's instant "optimization" if you want to think about it like that. I just think of it as sane.

Speaking of god objects, here's a true story. I was looking at a platform layer for mobile a while back, came across cocos2d; apparently it's really popular, anyway--cutting to the end: The sprite class alone was like 1.5 kilobytes, allocated a bunch of stuff, had like 4 matrix4 transformations, and was virtual, and hierarchical. If you think I am full of shit when I say that everything is shit these days, just go take a look at that.

ZoriaRPG
12-27-2015, 08:59 AM
Like I said; none. Just an empty script.

Most of those things are all the same thing though. It's not like NPCs in RPGs are really complex until you add in messages with events, etc. But even those are only run when activated so I don't think it'll matter much.

The way rpg maker, game maker, et al. do it is everything is a "god object'. ex; an npc is an event is an sprite is an waypoint is a object is a battle character, etc. IMHO this is the worst kind of abuse of OOP design, and is just bad to do whenever performance is an issue. I'm not doing this at all. I'll be putting in small, specialized cases. If you want a warp event at location x,y, you don't put a particle system or NPC there, you put a warp there. It's just common sense. Only a player can interact with warps so that's instant "optimization" if you want to think about it like that. I just think of it as sane.

Speaking of god objects, here's a true story. I was looking at a platform layer for mobile a while back, came across cocos2d; apparently it's really popular, anyway--cutting to the end: The sprite class alone was like 1.5 kilobytes, allocated a bunch of stuff, had like 4 matrix4 transformations, and was virtual, and hierarchical. If you think I am full of shit when I say that everything is shit these days, just go take a look at that.



...but just about everything is shyte. That's just a fact.

People don't care if what they make has good performance. They just tell you to buy a faster, more powerful system, which is rubbish. I occasionally do that too, but it's very minimal, and only because when things I make demand something faster/better/newer, it's faster/better/newer than ten-plus years ol; and then only because whatever I'm using as a base requires it, with all my modifications pushing it to its limits.

I'm not about to go back to doing things in raw assembly though.

To clarify my earlier question: How many other objects do NPCs examine to gauge interaction, their movement, and such? Do they consider other NPCs as a factor, as that is something that I would expect to cause exponential performance hindrance.

Gleeok
12-27-2015, 09:48 AM
I'm not about to go back to doing things in raw assembly though.


I actually just realized that I could do generics in c or c++ without template crap, function pointers, or switch cases. For example:


inline void InvokeSomeFunction(void* obj, void* f, void* param0)
{
__asm
{
push param0
mov ecx, obj;
call f
}
}

Stupid crap like 'type safety' 'iso standards' is just getting in my way. haha :P ..Oh boy and think of all the MACROS ! :)



.
To clarify my earlier question: How many other objects do NPCs examine to gauge interaction, their movement, and such? Do they consider other NPCs as a factor, as that is something that I would expect to cause exponential performance hindrance.

I've actually never had collisions as a bottleneck so I am literally zero-worried about that. Since 2D rpgs probably have the least collisions of any game I'll probably just use brute force as a placeholder to be honest.

As for what can collide with what, you're welcome to request something. I was thinking of throwing in filter mask for now.

ZoriaRPG
12-28-2015, 11:06 AM
Suggestions/requests for NPCs:

Option to have NPCs treat one another as solid, and halt, turning in a walk pattern, if they try to collide.
Collision between NPC(npc), NPC(object), NPC(player), etc., generates event (e.g. planned encounter, special dialogue, and so forth).
NPCs take action on collision, with similar collision options (e.g. steal from player).

I presume some of these can be handled with scripts, but I don;t know how much you want to force the user to rely on scripts to do these types of effects.

Gleeok
12-31-2015, 09:53 AM
Put in some camera functionality, so I added related stuff for screen- flashing, tinting, shaking, and fading. A neat side-effect of this is now we truly have non-nullable textures. I'm guessing more things will become non-nullable later on as well.

Putting in various map collision stuff. See: http://armageddongames.net/showthread.php?97427-Gauntlet-Classic&p=909801#post909801
Performance is also not an issue. 800 NPCs was just about all that would fit on the map and cost just under 0.03 milliseconds on my old craptop.

It looks like the font, message box, dialog, and UI stuff is approaching. At some point I have to finish that I guess. >_>



Suggestions/requests for NPCs:

Option to have NPCs treat one another as solid, and halt, turning in a walk pattern, if they try to collide.
Collision between NPC(npc), NPC(object), NPC(player), etc., generates event (e.g. planned encounter, special dialogue, and so forth).
NPCs take action on collision, with similar collision options (e.g. steal from player).

I presume some of these can be handled with scripts, but I don;t know how much you want to force the user to rely on scripts to do these types of effects.

TBH I'm not really sure what I want to put in scripts and what I want to put in data for all the corner cases, so for right now I'm mainly doing the common cases. There's still tons of stuff left to do so this is reasonable I think. It's entirely possible that any out of the ordinary thing would absolutely need a script. The goal is to make general common task scripts very small though; for instance in ZC most scripts have a lot of for loops, we can easily put a lot of that type of stuff in optimized c++ code. Plus if I ever finish I may want c++ as an alternative scripting language, so it works for that too.

Gleeok
01-11-2016, 06:46 AM
http://s10.postimg.org/l7v5i8bqt/screenshot.jpg (http://postimg.org/image/l7v5i8bqt/)

Worked on it today (woot); Trying to finish up the preliminary screen effect goodies. Here's some panoramic stuff: A simple mask of scrolling circles, and some sandstorm weather at different velocities being tiled across the screen.

Tamamo
01-11-2016, 10:19 AM
I'm getting a connect 4 vibe from this.

Tim
12-12-2016, 06:12 PM
Gleeok

How's it going with FFC?