Page 1 of 16

The Dolmexica Engine [Moddable 2D Fighter]

Posted: Fri Apr 22, 2011 7:48 pm
by Captain Dreamcast
Hey there friends, enemies and space cats!

Today is the day I present to you my newest pet project, the Dolmexica engine. As I may have leaked on multiple occasions, it is a moddable game engine, similar in style to Senile Team's Beats of Rage, allowing people without any programming experience to create their own game. Since I am a huge fan of 2D fighters like Street Fighter III, it was clear from the very beginning that it was going to be a moddable fighter engine, probably best compared to Elecbyte's M.U.G.E.N. Of course this genre definition is the only similarity shared by these engines, as the Dolmexica engine has been written from scratch (using KallistiOS) by Josh Tari (that would be me) and I can safely say that neither Mugen nor BoR were much of an influence for me.

Now you must be puzzled:
Why announce the engine at this point in time? Some of you might remember the ├╝ber-troll Maid Fight pulled off on the Dreamcast scene and doubt the engine's existence.
As a matter of fact, this project was supposed to be unveiled after its completion, but now that the the engine's basic functions are working, yet are also still in a state where they can be altered with relative ease, I've come to the conclusion that it is the best time to share how the engine works and hopefully get some constructive feedback.

Without further ado, here is how creating a new character works:

Okay, so you've gone through the process of ripping/drawing the sprites.
The Dolmexica Engine uses two semi-independent files for new characters: One .CHR file, which stores all the media related to the characters and one .MVT, which is best compared to a manual which tells the game what the character is supposed to do, more on that later.

First you have to create a .CHR file. Since the engine is optimized for use with the Sega Dreamcast, the individual frames are stored in the RGBA 4444 KMG format, compressed with the QuickLZ compression archive, resulting in a file format called .PKG (Portable KallistiOS Graphic). Currently I employ 128x128 PNG textures (which are then converted and compressed before using them with the game). You might wonder why someone would want a texture with a width of 128 pixels, the thought behind that one is that the all close combat moves take place in this box, so even long-range attacks like Dhalsim's stretching attacks fit in there. Just in case you wonder, those 128 pixels may look a bit small at first, but it's enough to contain even the detailed Street Fighter III: 3rd Strike characters. Also keep in mind that they are stretched to 256x256 pixels on the screen, which is a lot comparing it to the overall screen size of 640x480. One thing that I am still unsure about is wether the engine should use RGBA4444, RGBA5551 or both, with RGBA4444 being my current favorite.

After you have successfully converted your PNGs to PKG, it is time to work on the hit detection. The Dolmexica Engine uses a fifth image layer for that one, colloquially dubbed the Crash Layer and is stored in a .CRA file, which is nothing more than a 128x128 array of ones, zeros and other funky numbers, afterwards compressed with QuickLZ. Since writing 16384 numbers is nothing but a pain, I have also written a tool which converts a normal (24bpp) .BMP image to the .CRA format. White (0) is nothing, Black (1) is vulnerable, Red (3) is the area which HURTS, Blue (2) is blocking. In case you haven't noticed, this hit detection is pixel perfect.

Regarding Sound effects and other small sounds, I am currently evaluating the possibility of using some ADPCM format. Or just the normal .WAV one, the most important thing aspect is that the sound effects will be streamed.

Those three filetypes will be merged into the aforementioned .CHR archive. It probably sounds very confusing right now, but believe me, thanks to the automatic tools I have written, a new attack or animation can be added in less than five minutes.

The .MVT file is a tad more complex. As mentioned before, it serves as a manual to the game, which tells the game which moves are available. First we have to differ between two different types of manuals: The one used by the CPU and the one used when the character is controlled by a human player.
Should the character be controlled by the evil CPU, the .MVT is ordered by the type of Attack, whereas the Humanoid .MVT is ordered by the input buttons which trigger the animation.
Both types are being "compiled" from a readable .TXT file. For normal attacks, values which have to be declared are the overall amount of frames, the speed of the animation, the strength (attacks only), the Enemy Acceleration, how much the enemy gets knocked back (attacks only), sound effects and the AnimationType (attack, throw, blocking...).
Then there are also special attacks like throws, combos and so on, which have values declared for each individual frame, including some new variables: How much the Enemy's or the own Char's Position change, how much damage each individiual frame does and others. This is the stuff I'm working on right now, so expect a lot to change in the special moves department, but this is how I am expecting things to work.

Naturally you can also fiddle with things like the character's jumping height and speed. The physics are something I really put a lot of emphasis on and a lot of work into. My primary goal is to make it feel like Street Fighter III, which in my opinion is the very best 2D fighter on the DC.

Anyway, when you are done with creating the .TXT and converting it to .MVT, you have everything you need to have a new working character. My two testing characters right now are Sagat (Street Fighter II ver.) and Johnny Cage (Mortal Kombat ver.), replacing my previous test char, Stickler (The Best Game Ever).

Since releasing the engine just by itself would be pretty uninteresting, I am currently thinking about using it to create a Street Fighter vs. Mortal Kombat game, because it is the only Street Fighter crossover that has yet to happen and the Dolmexica engine is probably able to fix some of Mortal Kombat's grave gameplay issues (such as the hit detection). In addition to this all-star cast, it will also feature two original characters from The Rad Adventures of Captain DC, a full-fledged 2D fighter which will utilize a modified version of the Dolmexica engine. Don't hold too much of your breath for TRAOCDC though, unlike the Dolmexica engine it might go the Maid Fight way and never become a reality.

Of course modifying the source code will be possible too, since the Dolmexica engine will be released under the GPL. As a matter of fact, I have to release it under the GPL, since that is a requirement for using QuickLZ for free. Fair trade if you ask me.

During the next few weeks I will put up a site and a forum dedicated to modding for and improving the engine (not for DC things in general; DC-Talk is way better for that!), until that one is finished, feel free to ask any question in this thread. Like I mentioned before, I also appreciate feedback and constructive criticism! Oh, and thanks for reading this wall of text! :mrgreen:

Re: The Dolmexica Engine

Posted: Fri Apr 22, 2011 8:32 pm
by TeamXlink

I really like what your doing here!

Re: The Dolmexica Engine

Posted: Sat Apr 23, 2011 3:43 am
by Anthony817
Wow! 2011 is the best year for Dreamcast in years! Now you are releasing a game engine similar to mugen! I know TONS of folks who will love this news over at Dcisozone! I think you would do good to post it there too, we have tons of traffic, so it is sure to get peoples attention.

Re: The Dolmexica Engine [Moddable 2D Fighter]

Posted: Sat Apr 23, 2011 3:04 pm
by Dreamcaster
Fighters are my favorite video game genre. Holy sheeeeit, I can't belive this, 2DF engine for Dreamcast!? Good luck with this project Cpt. DC :D

Re: The Dolmexica Engine [Moddable 2D Fighter]

Posted: Sat Apr 23, 2011 4:30 pm
by comradesnarky
I think a Street Fighter vs. MK game is the only way I'd ever want to play as MK characters :P

This is very exciting stuff. I'd love to play around with this.

Re: The Dolmexica Engine [Moddable 2D Fighter]

Posted: Tue Apr 26, 2011 7:05 pm
by Captain Dreamcast
Thanks for the kind words, I'm really glad to hear you guys like the idea! :D

Well, regarding the progress, I was able to implement the first type of Special moves, Throws. Works like a charm, looks pretty horrible right now. Up to now, I was putting the character's sprites on the very left side of the frame, but some of Sagat's moves (like his throwing move) go to the left, resulting in some awkward movement by him on the screen. Looks like I have to remake Sagat's frames to keep him in the center and not on the left side. Oh well, it's easy to change and not too much of a problem.

Now I've spent so much time babbling about the modding process, I should talk about the real important thing, the gameplay.

You see, I began development on the Dolmexica Engine after I was horribly disappointed by Street Fighter Alpha 3. It is by no means a bad game, but there were three things in particular which really pissed me off:

  • Sluggish Gameplay (A little speed would've helped)
  • Bad hit detection (Tell me what you want, that one was just off)
  • Loading Before/After the Continue Screen (Just Annoying)

That's not an awesome lot to go by, so I added a few more things which formed the basic guidelines of the Dolmexica Engine:

  • Quick gameplay. (like Street Fighter III)
  • A hit detection with an inaccuracy of no more than 2 pixels.
  • 60 Frames per Second.
  • A character resolution of at least 128x128.
  • Different styles of Gameplay (Capcom, Mortal Kombat, SNK, etc...)
  • No Loading Before/After Continue Screen. (Hellz Yeah!)
  • No maniac Fighter like Killer Instinct. Pick up and play but hard to master.

Currently all of the points are achieved or not yet implemented (#5; #6), so things are looking good. To elaborate on the different gameplay styles, it is mostly about things like "Button-Blocking or D-Pad-Back-Blocking" or special stuff like Fatalities, since the modder takes care of pretty much everything related to physics and attacks.

Heh, I've talked too much already. The combos won't implement themselves, so I'm back to devving some more. See you around! ;)

Re: The Dolmexica Engine [Moddable 2D Fighter]

Posted: Wed Apr 27, 2011 12:34 am
by Anthony817
Awesome man thanks for the update! This is a really exciting thing for fighting fans! I can totally see Mortal Combat vs Street Fighter! Best mashup ever!

Re: The Dolmexica Engine [Moddable 2D Fighter]

Posted: Wed Apr 27, 2011 1:24 am
by mout
Fantastic !! I'm very exciting !!!

Re: The Dolmexica Engine [Moddable 2D Fighter]

Posted: Wed Apr 27, 2011 9:32 am
by VasiliyRS
Gimme screenshots !

Re: The Dolmexica Engine [Moddable 2D Fighter]

Posted: Wed Apr 27, 2011 6:55 pm
by Captain Dreamcast
Vasiliy wrote:Gimme screenshots !

Fair enough.

It sure was a lot of trouble to get some screenshots. Making the demo disc was pretty easy (thanks to the DEPR0GRAMMER), but when I tried to run it on Chankast and NullDC, it seemed like the romdisk and ramdisk used by the engine clashed with each other, probably due to some emulation error. This resulted in brown sprites on top of a brown background and an equally brown GUI. The romdisk will be removed in the final version, so I believe this error will no longer exist and discs can be checked with NullDC before burning.

Uhh, it took me several hours to find an emulator capable of displaying the engine, but managed to find the Linux/Mac-only lxDream. Even though the game was displayed correctly (apart from some graphical glitches like flickering), there seemed to be some problem with the button emulation. Man, and I sooo wanted to show off the special attacks I managed to implement today. TIGER UPPERCUT!

Maybe next time... In case you know about a good emulator (which actually works, I'm looking at you MAKARON/Demul!) please let me know. I have tried NullDC 1.6 and Chankast with no success.

Well, here is what you came for, the first screenshots. Please note that this is still an alpha build.




Hey, maybe I should implement the timer next! Or maybe improve the AI? Argh, there's still so much to do, 'till next time I hope you like the screenshots. :P