PDA

View Full Version : KOFFE - The Fighting Engine.



Ñuño Martínez
29-08-2012, 06:12 PM
I was thinking about what WILL said in this thread (http://www.pascalgamedevelopment.com/showthread.php?13451-Not-Dead-just-resting-What-would-juice-this-community) about what would juice this community, and answer was more and better projects. So I decided to rescue this old project of mine.

The idea of KOFFE is to do a remake of KOF'91 (http://kof91.sf.net/), a M.U.G.E.N (https://en.wikipedia.org/wiki/M.U.G.E.N) like fighting game engine dead long time ago. I tried to contact with KOF'91's developers when they killed the project but they didn't answer me so I started it by myself.

Current status isn't a game at all. It just does some initialization, loads few data that doesn't uses, and shows the intro animation, but it sets the structure for a lot of stuff. Of course it uses Allegro.pas (http://allegro-pas.sf.net/) 8) so you'll see what you can do with it (version 4, because version 5 is still unstable and buggy).

You can get the sources, some documentation and testing data from last SVN by the tarball created automatically by SourceForge [here (http://koffe.svn.sourceforge.net/viewvc/koffe/TRUNK/?view=tar)]. I did test it on Linux only, so I don't know if it will work on Windows or MacOS (Windows should work, but MacOS would need some "hacking" in the Allegro.pas library ::) ).

The project's site (http://sourceforge.net/projects/koffe/) has minimal information, as I've (re)started few days ago. Any help, suggestion and comment will be welcomed.

WILL
03-09-2012, 08:20 PM
I remember this "Game Maker" type of program for Windows a while back called "Fighter Maker 95" or something. It was similar to RPG Maker and others like that. You could draw your sprite frames for all your characters put them into these character objects and you'd create moves, set which frames were used in sequence and set the attack and blocking regions of each frame. It was pretty cool. I wouldn't mind playing with something like this.

Got anything running yet? Video? :)

Ñuño Martínez
10-09-2012, 03:33 PM
Got anything running yet? Video? :) I'm stuck with the character selector screen. >:( So I was resting a bit. Anyway, I think I can show something soon.

WILL
11-09-2012, 01:43 AM
Cool. Be interesting to see how this turns out.

Ñuño Martínez
11-09-2012, 07:17 PM
It's far to work but I've decided to show you current status of character selector:
932
It doesn't allow to select any yet, but it shows all characters you have in the sprites subdirectory and renders them. The glitches in the background are because it's animated.

Note that I'm using these characters for testing only, because I didn't find more and I haven't time to create new ones.

Ñuño Martínez
16-01-2013, 12:54 PM
I was working on the project, and now the character selector is complete:
1048
As you see, the selector is a "stripe" with all characters available, that scrolls left or right. I did it that way because it was simpler.

Also I've added a stage selector.

Finally, I was designing the inners of the "arena", that is, the objects and how they work together. It's quite simple but complex at same time, and I'm a bit frightened about it. I don't know why, but I am. :scared:

WILL
16-01-2013, 02:21 PM
That's awesome!

Don't sweat it, just go right into the code. ;) I find drawing it out on graph paper (or at the very least getting a full mental picture) of how it will all function helps smooth out the rough concept so coding it becomes a bit more smooth.

I'm pretty anxious to see how the arena will look. Do you have anything special planned to make it different or are you going to try a more purist approach to that of games like Street Fighter and Mortal Kombat?

Ñuño Martínez
20-01-2013, 11:27 AM
Don't sweat it, just go right into the code. ;) I find drawing it out on graph paper (or at the very least getting a full mental picture) of how it will all function helps smooth out the rough concept so coding it becomes a bit more smooth. Yes, you're right. A flowchart or an UML diagram draft helps a lot when coding. I always say "The best coding tool is a piece of paper and a pen".


I'm pretty anxious to see how the arena will look. Right now it loads (almost) all data needed, but I was working in module distribution. I was working in "extreme programming" mode but I realized that this project is too complex so I did some diagrams and now I'm re-sorting the current code. I almost finished so I'll work on the arena and the fighting core soon.


Do you have anything special planned to make it different or are you going to try a more purist approach to that of games like Street Fighter and Mortal Kombat? Version 1.0 will be purist, like Street Fighter I / II. For version 2.0 I want to add a scripting language, initially for AI descriptions and "History Mode", but it will allow much more (for example, to change background and sprites in runtime, to add properties to characters (specials), ...). Also I'll add more things as "weaponry" (i.e. Cody in Street Fighter Alpha 3) and teams (as King Of Fighters series or Tatsunoko Vs. Capcom). I think I can do it flexible enough to build RPG-like and Adventure-like games (i.e: different paths/endings, taking decisions...).

The challenge is to keep it simple enough. Or create to different engines (KOFFE and KOFFE II) each one with different goals.

Ñuño Martínez
07-02-2013, 06:46 PM
After a lot of planning, drawing, replanning, redrawing... Here you have a drawing test, too far to be a game (actually it's a still image). It proves that everything is loaded correctly, and rendered in the right place. Almost everything you see can be modified, not just changing the pictures, you can change their position, and also you can decide not to show it if you don't want to.
1089
So next is to load all character data (currently it loads only the first frame of the "stand-by" animation) and then start coding the brawl... May be we have a playable first pre-alpha release before Christmas. :o)

SilverWarior
07-02-2013, 11:38 PM
Great work on yor project.

WILL
09-02-2013, 02:55 AM
Hey cool! I can almost imagine seeing this being played right now.

Ñuño Martínez
22-07-2013, 10:15 AM
There are a lot of things that works, but isn't still a game. It loads all data and animations, it does the game cycle (intro - wrawl -end) and even animates. But I haven't implemented the user input nor the AI so that's why I didn't record a video yet.

Now I must tune my new computer, translate the SVN to the new Sourceforge repository system (a pain in the ...) and I'll add an in-game command console system.

WILL
23-07-2013, 09:08 AM
So what are your plans for supported platforms and compilers?

Ñuño Martínez
31-07-2013, 09:57 AM
At the moment, FreePascal for Linux and Windows (theoretically it should work on MacOS X, but AFAIK nobody has test Allegro.pas in Apple computers yet so I have no idea if it works). May be version 2.x will allow Delphi too.

Ñuño Martínez
01-12-2013, 11:28 AM
Reporting:

I had the game loop and the animation working but then I read Mat Buckland's "Writting game IA by example" and I said "Of course I was so afraid about how to code character control, dude: I'm doing the FSM (https://en.wikipedia.org/wiki/Finite-state_machine) in the wrong way!" so I decide to stop, step back, redo the UML-Class diagram and re-sort my code.

Also I've wrote an old-style sprite engine and now I'm modifying all drawing stuff to use it. Then I'll rewrite my SFM using an object oriented design instead of long CASEs statements.

Ñuño Martínez
29-03-2014, 11:36 AM
Well, well, much time since the last report.

I've almost rewrote the whole thing and now uses a Finite State Machine to control all the game. It works pretty nice, but for the user it looks almost exactly than months ago. Sad.

Unfortunately I have not much time to work on my hobby projects right now. :( Fortunately, part of a "job" project I'm working for can be added to the engine, so the project is actually progressing. ;)

farcodev
05-07-2014, 03:40 PM
Pretty cool o.O

Yeah free time is a precious asset :D

Ñuño Martínez
14-07-2014, 05:03 PM
Yes it is. Unfortunatelly I'm too busy and I have some personal issues too so I can't work either in Allegro or Koffe. :(

Ñuño Martínez
09-09-2014, 03:21 PM
The project was in stand-by for a long time, but I've done some improvements the last weeks. Looks like I'm a perfectionist so I was rewriting a lot of internal stuff, so nothing new to see, but it looks better with a smaller executable and a more modular engine.

I've created a TKOFFE_Game class that is a rewrite of the good old TApplication class from Delphi and Lazarus. It contains all common stuff, such as the configuration, interface graphics and so. It also contains the main loop and manages all resources.

I've also rewrote the way it works using a better object oriented state system.

Next step is start working on the "figthing stuff". You know, user input, character animation, collisions, etc. Don't know when it will became playable, but I'm optimistic.