Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

OpenGL [MMF2 3D Engine]


LarkSS

Recommended Posts

I don't know where to put this because I don't want it on the main site (it's incomplete, buggy, incomplete, etc) and it's not a fangame.

So about... 6 months ago I started working on a simple 3D engine in MMF2 using a dropped OpenGL extension which included enough features to do the majority of what I felt necessary. After finally getting decent collisions and shadow casting working through the use of Lua scripting, the engine was already starting to lag even on modern machines. I implemented delta time to counter the effects of lag to some degree, but I know that if this was applied in a large case scenario, well, the lag would just be unacceptable. I also was forced to stop working on it for a couple months because of college and now it's unbearable to try and dive back into it again.

In any case, I'm uploading what I have for others to learn from or even use if they so care, given that they're able to actually get this thing up and running.

http://larkss.thisisourcorner.net/files/OpenGLsource.zip

As the OpenGL extension I used is no longer uploaded to the author's website, I packed up everything I THINK it needed; probably a mix of files for that other OpenGL extension got included.

http://larkss.thisisourcorner.net/files/OpenGL.zip

Now, there are a lot of other extensions you will need, namely the latest versions of them. At least try to get the newest builds of IniPlus, ForEach, and XLua. You can find a lot of updated extensions from these two sites (check the forum board first).

http://www.clickteam.com/epicenter/ubbthreads.php?ubb=postlist&Board=17&page=1

http://sites.google.com/site/mmf2stuff/

And yeah, here's an image or four for anyone who likes images. Have fun!

opengl4.png

opengl5.png

opengl6.png

opengl7.png

Edit: As Strife pointed out, the AdvSound extension no longer exists, so just grab it from my server.

http://larkss.thisisourcorner.net/files/AdvSound.zip

Edit2: Due to the engine crashing if the beta version of the INI object I used is not present (and upon checking it appears the author has removed the specific version I downloaded), I now have the ini object uploaded to my server as well.

http://larkss.thisisourcorner.net/files/INI1.5b.zip

Edit3: Recommending that anyone who wants to use this NOT use HWA. It'll render faster and allow the Lua code to execute 100% correct.

  • Like 1
Link to comment
Share on other sites

Looks fantastic Lark. One problem though:

This application requires the following extensions:

Ini++ v1.5 Object (INI++15.mfx)

Zip Object (ZipObject.mfx)

File-Folder object (fcFolder.mfx)

Messages Box object (fcMsgBox.mfx)

Sound Object (AdvSound.mfx)

Immediate If Object (IIF.mfx)

Func Loop (funcloop.mfx)

Could you zip these up? I have real MMF2, I have all extension packs installed yet when I try to download these from Clickteam or any extension site, it says link not found.

Link to comment
Share on other sites

Yes! I've been waiting for this ever since you mentioned it on the screenshots thread. ^_^ It's just what I need to make my kart racing game truly 3-dimensional instead of a flat plane like Super Mario Kart.

However, I've been looking around for the Sound Object (AdvSound.mfx) and it seems that the author has taken it down and replaced it with two new extensions. Do you still have the Sound Object in your PC, and if so, could you upload it for us please? :3

Link to comment
Share on other sites

@UnlimitedChaos: Turn off Adblock Plus, also you may need to use Fusion Updater for some of the extensions.

@Strife: I think I remember the author considering to do something else with that extension when I used it, but didn't expect any further progress. Here it is in any case.

http://larkss.thisisourcorner.net/files/AdvSound.zip

If anyone else absolutely cannot download specific extensions because they don't exist anymore, let me know. UnlimitedChaos, the Zip extension should come by default with MMF2 extension packs, which leaves me concerned if you are unable to get it. Please try to find the extensions again if you're still interested as I will not upload extensions which can still be retrieved, for the sake of the authors as well as for legal reasons since many extensions require a legit copy of MMF2 to be installed.

Edit: If anyone is able to get it running but is confused about how to use it or want to ask questions about what it can even do (such as its lack of slope support), feel free to contact me via AIM or MSN. I might even help implement features if I have the time.

Link to comment
Share on other sites

Awesome! I can load the MFA now. ^_^ Thankies.

Though, I have another problem now. Whenever I launch the EXE or run the MFA, it crashes. Seeing how the EXE is affected as well, it may be something wrong with my computer... Is there anything that absolutely needs to be installed on the PC in order for it to work correctly?

Link to comment
Share on other sites

  • 3 weeks later...

Bah I remember sending it to someone else and they had the same problem. I sent them the same exact extensions I had too and made sure we both had the same build of MMF2, yet it still crashed for him but not for me. Everyone I've sent it to has managed to run the exe at least however, and it has worked on every computer I've tried too including my 2002 laptop.

The requirements for it to run is OpenGL 1.4 support with GLSL shader support optionally for improved fog rendering. Even without a proper gpu though, it should still fall back to software rendering so you can at least run it. You could try updating your gpu drivers to see if you get more fortunate results.

Besides that, all I can say is to make sure you extract everything before testing it, which I'm sure you did. If you want you can try contacting me over AIM/MSN and we can try to get it working for you.

Link to comment
Share on other sites

I found out the reason it crashes. It's because a certain version of Ini15++. If you get the absolute latest version from the click-team forums and all other extensions are correct it'll work.

http://clickteam.com/epicenter for the forums. Easiest way to find it though is Google search something a long the lines of "Ini15 clickteam". Also, Lark, this engine is amazing. Shame you couldn't put models in it though.

Link to comment
Share on other sites

I found out the reason it crashes. It's because a certain version of Ini15++. If you get the absolute latest version from the click-team forums and all other extensions are correct it'll work.

http://clickteam.com/epicenter for the forums. Easiest way to find it though is Google search something a long the lines of "Ini15 clickteam". Also, Lark, this engine is amazing. Shame you couldn't put models in it though.

I think that may be the source of the problem, because MMF2 itself crashes whenever I highlight an Ini++ action in the Event Editor. Strange, considering I did download the latest version from the Clickteam forums...

In any case, from what I can tell, it's only used for loading key mappings and thus is not mandatory, so I'll try and remove it when I get home later today.

Link to comment
Share on other sites

I'll PM you the working one, otherwise you won't see much of anything since everything is separate from the mfa "apart from the code". The ini effects many events that draw the opengl. I tried removing it and all I saw was white. Best thing is to get the working version and update to MMF2 Standard HWA R251.

Link to comment
Share on other sites

Sure, as soon as I get home from college. If you don't receive it soon. Remind me. I may do what Gamerdude did and keep an archive of MMF2 extensions for people to get in-case errors occurs. I know it took me forever to find those extensions especially a working INI++15.

Link to comment
Share on other sites

Bah I had a feeling that would cause problems. I used a beta version of the ini object that preloads animation data and uses a new technique in the extension to switch between data sets that are stored in memory to greatly improve the speed that the ini data is interpreted between objects.

Unless you guys got it figured out already, I can upload my version of the ini extension as soon as I'm done babysitting.

Link to comment
Share on other sites

Thanks Lark! It works now. ^_^

This is so cool. xD Real 3D in MMF! It's going to take me a little while to familiarize myself with OpenGL, but I would totally prefer this for my kart racer over Mode7 since I can actually make walls.

Is it possible to make curved geometry, or just stuff at 90 degree angles?

Link to comment
Share on other sites

Slopes are possible, but the engine doesn't support collisions with it in its current state. I was supposed to add slopes eventually...around the time I planned to make a level editor for it so that slope creation didn't mean making a ton of unique objects and setting alterable values.

In regards to 3D models, this particular opengl extension is supposed to support them as well as the ability to use vertex and pixel shaders, but I haven't messed with either. I think with the opengl extension I zipped up, one of the examples included shows how to use glsl shader materials, which in turn also shows how to load up a 3D model. The extension lacks code for rigged models however, so animations would mean loading up a ton of models for every frame...

And yes the principal is the same. You just add the Z coordinate to the distance equation and calculate three speeds over two (speedX, speedY, and speedZ).

Edit: I forgot to mention that I highly advise you use the standard MMF2 build when running this. In HWA parts of the Lua code fails to execute properly, namely that shadow settings 2 and 4 which use Lua code to properly cast shadows in all situations fails to actually be correct. (check out the ring on the big block, with shadow setting 1 or 3 the shadow of the ring is cast inside of it instead of on top). It also renders a little faster since it can skip the step of converting the OpenGL scene into a flat polygon in D3D.

Link to comment
Share on other sites

I wasn't referring to slopes, actually, but curved walls and such. It would be ideal for me to build racetracks with smooth walls instead of zigzagging them along at 90 degree angles. xD; Though, slopes are also a plus for racetracks. ^_^

I use HWA 249 which doesn't even load OpenGL properly, but the engine runs just fine under the standard version of MMF2.

Link to comment
Share on other sites

Er by slopes I meant angled surfaces in general, sorry. The engine doesn't support angled collisions of any kind right now... or at least I never tested it.

UnlimitedChaos, the shadows only work because it's not using Lua code. Investigate the rings I placed to find the ring that isn't casting a shadow. Any time you place a shadow caster on top of a stack of blocks, the shadow isn't placed correctly. Also, you have to set the shadow setting (data\config\prefs.ini) to 2 or 4 to activate the Lua procedure to observe the difference (most notably the increased overhead).

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...