Author Topic: Peter's Game Port Challenge  (Read 4898 times)

0 Members and 1 Guest are viewing this topic.

Mike Lobanovsky

  • Guest
Peter's Game Port Challenge
« on: April 13, 2014, 04:08:53 PM »
may be interesting for you.

just wrote a game for the ancient SdlBasic.
you could it convert for Fbsl,  if there is enough time.


Suum cuique (Lat.)
Каждому своё (Rus.)
To each his own (Eng.)
Jedem das Seine (Germ.)


Prologue

Dear Peter,

Thank you very much for your proposal. Seriously, I really like your game; it is entertaining, it runs smooth, it looks good, and it has some artistic touch to it too.

Yet I will hardly accept your challenge - not because I actually couldn't re-create it in FBSL without even wondering what this SdlBasic thing is or why its executables are so terribly huge for what they do. I could do it, and moreover, my re-creation would have swallowed your own script and assets word-for-word and byte-for-byte without the slightest modification. And my resultant and fully equivalent FBSL executable would only have been around 265KB large all in all.

I am an extremely skillful imitator, you know, and my FBSL is a triplet of multi-purpose languages each of which has everything that's needed for such a trivial task. I love applied programming and I would be glad to devote more of my time to it but I can't, and I won't, afford it at this particular point in time for this particular object. My extremely expensive time may not be spent on reverse engineering unknown executables in a quest for knowledge that has already been in my possession for decades. I am able to reverse engineer anything, Peter, but SdlBasic is certainly not worth it in my opinion.

I am a Language Developer and while being such, I am not preoccupied with re-writing Dr. Dobb's 30 year old editorials for a hundredth time in my senile spare time. I am absolutely sure claiming one's 20 keywords worth of a very basic console interpreter and a cheap citation at the end of the funny table by Ed Davis on such forums as basicpropgramming.org are not sufficient for putting oneself on a par with such people as Mr Charles Pegge, Mr Eros Olmi, or Mr Mike Lobanovsky, for that matter, to name but a few. The same concerns rank and file hobbyist coders.

Would you dare challenge Mr Pegge and his OxygenBasic with the same task, Peter? Do you have the slightest shade of doubt what the result would be should he accept your challenge? Then why would you think about, or behave with, me and my FBSL differently?

While I'm seeing a few animated sprites in your window, you're going to see hundreds of animated sprites in my windows, Peter, and very soon too.


Part I

First of all, please download an archive with a few simple games written in, or ported to, FBSL in the past few years as a relaxation between periods of intensive language development. The games come precompiled with dependencies and media; full source code is available in the corresponding FBSL forum messages.

FBSL has a set of basic drawing functions like PSet(), Line(), Circle(), Arc(), Fill() etc. that permit the begginers to make themselves familiar with the principles of pixel graphics under Windows. The resultant images are not very smooth as the primitives are not anti-aliased, yet people with artistic abilities can use that function palette just for starters to get the feeling of what BASIC's graphics API is.

The two simple games that fall into that category are Bouncer and RotoBalls. They are written in FBSL's pure BASIC.




Part II

FBSL has also a few image loading and manipulation functions that permit users to write simple games without resorting to the concept of a "sprite". Such games are MacMac, Pong, and SpaceFighter (MacMac is actually my favorite).

They are also written in FBSL's pure BASIC. Charles, John and others, if your "alien" audio and MIDI drivers are OK then you can also run these games successfully under Linux Wine (yes, yes, this is how my Ubuntu 12.04 desktop looks :) ):



as well as under Mac OS X Wine:




Part III

FBSL has an almost exact re-implementation of Liberty BASIC's sprite control system written in FBSL's BASIC that performs at least 3 times faster than the original. It allows FBSL users to create very smooth and attractive animations such as this Christmas quest/greeting card:




Part IV

FBSL has a sprite library include file that I wrote in FBSL's MMX assembler. The library has a set of matching text, static, and animated sprite classes written in FBSL's BASIC so that the applications built around this sprite system can be written in pure BASIC too.

The sprites support animation, coloration, blending, rotation, scaling, per-pixel lighting, z-ordering, and pixel-perfect opaque and transparent collision detection at terrific FPS rates.

A very simple game utilizing this sprite system (which is called "the USSR"; the PDF manual and sources can be downloaded from the FBSL site) is SpaceRace.

A few hundred animated and color blended sprites more are awaiting you right here and now in the attached Lissajous.zip pseudo screen saver:




Part V

And the last but not the least, FBSL is extremely OpenGL capable. It can successfully render about a million 3D polygons with over a thousand different mipmapped textures from texture atlases on an anti-aliased anisotropic OpenGL canvas simultaneously at a steady rate of 30 frames per second - a standard rate for modern laptops. And it can do so without GLSL shaders yet lightmapping and bumpmapping is all there, in just a standard set of 4 texture units in a fixed pipeline of a cheap notebook's video card. The FPS rate is well over 60 frames at a 1680x1050-px full-screen resolution on an ordinary 2GHz desktop PC:



The XANEngine project was started (but also regretfully suspended too) some 3 years ago by one of my French friends and me as a challenge to crack and re-create an extremely popular console game Resident Evil V: Lost in Nightmares by Capcom Inc. which had never been released for desktop PC's:



So what you're seeing below nobody has ever seen on a PC monitor except for my French friend, me and now, you:





Not only was the rendering engine proper developed (it was all before FBSL's DynC JIT compiler appeared - just BASIC and assembly, is all; I didn't know anything about GLSL at the time either) but also an extensive set of auxiliary editing facilities were added where each and every plugin or even individual widget was a separate project unto itself. Everything was developed from scratch - no third-party code or libraries:




A lot of effort was put into character viewers and animation tools:





Next, a completely skinnable, clickable and animated HUD ("head-up display") control system was developed that is usually used for game intros, player selection, ammo and mission control, navigation and inventory, etc.:



It enabled us to reproduce the original animated HUD's with almost pixel-perfect authenticity:



Yes, what you see here in this snapshot are actually textured versions of a few HUD controls from the preceding purely graphical set. I still have short animated tech demos of both sets with sound as precompiled standalone all-in-one executables; the code is closed-source for obvious reasons but I can provide the executables if needed.

But sooner or later we just had to stop and abandon the 300,000 lines of FBSL code and all the manpower we had put in it. My French friend failed to crack the original character animation format of the game while the known formats were too simple and crude by our mutual quality standards. So now the project is on an infinite hold while nobody in the whole world except Capcom Inc. themselves could yet do what the two of us did three years ago.

I'm missing that project very, very much, Peter. I wish you had challenged me with something similar now that ANSI C is also added to FBSL's programming language palette... But you didn't; you just told me to come back to my first grade and demonstrate how well I know the ABC's. Don't ever do that again, my friend; you should always know well in advance who you're going to mock.


Epilogue

So I am very pleased with my FBSL which isn't just another BASIC. The existing FBSL environment allows me to program virtually anything and of virtually any complexity that the programming world can challenge a skillful programmer with. And I am perfectly content when my FBSL uses just a couple of arithmetic operators and a trivial PSet() to generate me purely programmatically within a couple of seconds without extra sprite PITA a beautiful and peaceful marine morning view like this:




Kind regards,

Michael LOBKO-LOBANOVSKY
FBSL Development Team


P.S. Charles, if you consider this post sort of inappropriate being published on your forum rather than on my own one, please feel free to exercise your administrative privileges and delete it without further notice. Thank you.

.
« Last Edit: April 13, 2014, 06:01:11 PM by Mike Lobanovsky »

JRS

  • Guest
Re: Peter's Game Port Challenge
« Reply #1 on: April 13, 2014, 05:42:57 PM »
My vote is to keep the post/thread. An impressive target to shoot for. Nice job Mike!

Charles Pegge

  • Guest
Re: Peter's Game Port Challenge
« Reply #2 on: April 14, 2014, 08:38:35 PM »
Excellent material, Mike. Though high-end games are probably beyond our reach due to the huge investment of man-hours required for limited gains, and nature always outperforms virtual reality effortlessly. :)

Mike Lobanovsky

  • Guest
Re: Peter's Game Port Challenge
« Reply #3 on: April 14, 2014, 10:38:43 PM »
Thanks for your appreciation, Charles.

... high-end games are probably beyond our reach ...

Believe it or not but history knows a few individuals who were able to do similar things all alone using Unity. There even was one of them that got some fifty thousand bucks or so through Kickstarter to finalize his project that was around 80 per cent complete after 2 years of arduous work. His game was somewhat simpler than ours and again, he used Unity while we decided to develop every little bit from scratch.

We estimated our project's time frame to be about 12 months all in all. We were able to rip all the assets (monsters, characters, scenery, ammo, HUD's, textures, and sounds), lighting system, collision system, and physics system (as it turned out, the game used a custom version of Havoc) from encrypted half-float big-endian DLC (downloadable content) of PlayStation 2 version.

We developed our own shaderless rendering engine and cameras to be able to play the game on low-end PC's and laptops because Capcom's games are always very demanding, harware-wise. I was able to implement an on-the-fly 16-bit/32-bit conversion algorithm for floats (half-float-to-float and vice versa) in assembly that took only some 2.5 nanoseconds per array element on a 2.2GHz CPU! That was needed because all the assets for PS2 were stored as big-endian half-floats; a game console FPU is capable of computing half-floats directly which is of course impossible on an Intel FPU. Hehe, and I even discovered some bugs in MS' Direct3D functions that others usually use for similar conversions... :)

It took us about 5 months all in all.

But we failed miserably with ripping the animation file format. We then tried to re-rig the characters and monsters with simpler skeletons and used stock animations but it all looked so poor that we gave up. We couldn't afford inevitable public criticism for ugly character behavior amidst such beautiful scenery. So we never even started to develop the AI which should've been the final stage of the project. :(

Charles Pegge

  • Guest
Re: Peter's Game Port Challenge
« Reply #4 on: April 14, 2014, 10:56:17 PM »
I am sure you gained some valuable assets from that project, such as the physics engine.

Mike Lobanovsky

  • Guest
Re: Peter's Game Port Challenge
« Reply #5 on: April 15, 2014, 12:01:18 AM »
Hehe,

Look in her face, Charles, in her eyes:



This was what I wanted to gain. I thought I was a god... :-\

Charles Pegge

  • Guest
Re: Peter's Game Port Challenge
« Reply #6 on: April 15, 2014, 12:19:42 AM »
Those eyes have camera Lenses. She is a botty! :)

Mike Lobanovsky

  • Guest
Re: Peter's Game Port Challenge
« Reply #7 on: April 15, 2014, 01:20:45 AM »
Thanks again Charles,

You've soothed me all right! :D

OK, assuming I can forget those eyes, WHAT SHOULD I DO ABOUT THE BOOBS?!



« Last Edit: April 15, 2014, 02:25:56 AM by Mike Lobanovsky »

Aurel

  • Guest
Re: Peter's Game Port Challenge
« Reply #8 on: April 15, 2014, 05:36:42 AM »
Quote
WHAT SHOULD I DO ABOUT THE BOOBS?!

I don't care what you think about boobs...
I am wondering what is inside her wallet.... ;D

Charles Pegge

  • Guest
Re: Peter's Game Port Challenge
« Reply #9 on: April 15, 2014, 11:46:31 AM »

Unfortunately we have no female members on this forum who could advise you on this anatomical consideration.

Mike Lobanovsky

  • Guest
Re: Peter's Game Port Challenge
« Reply #10 on: April 15, 2014, 08:13:51 PM »
Aurel,

Sorry for you, man. Excella Gionne (that's her name) is not the best moving character in RE5 but you would hardly have any chance against her in a short, deadly, and terrifically painful fight for her purse. You'd better get back to observing her purely feminine virtues from a safe distance. :)
« Last Edit: April 16, 2014, 03:03:53 AM by Mike Lobanovsky »

Charles Pegge

  • Guest
Re: Peter's Game Port Challenge
« Reply #11 on: April 15, 2014, 10:52:19 PM »
Other experts on boobs:


Mike Lobanovsky

  • Guest
Re: Peter's Game Port Challenge
« Reply #12 on: April 16, 2014, 03:03:06 AM »

JRS

  • Guest
Re: Peter's Game Port Challenge
« Reply #13 on: April 16, 2014, 09:03:28 AM »

Mike Lobanovsky

  • Guest
Re: Peter's Game Port Challenge
« Reply #14 on: April 16, 2014, 09:36:43 AM »
ROFL!




« Last Edit: April 16, 2014, 08:46:05 PM by Mike Lobanovsky »