C# MegaMan Engine

Started by Tesserex, April 13, 2010, 05:04:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tesserex

This is a project I've been working on since last August. It's a megaman fangame engine I'm writing from scratch in C#, and not using any game software like Game Maker or MMF. So far it has most of the gameplay features, full movement, ladders, enemies, health, teleports, charged buster, a pause screen, and stage select.

You can see the videos of it on my youtube channel: http://www.youtube.com/user/Tesserex

The special thing about this engine is that I'm hoping it's easy enough to use that anyone can make custom enemies and other things without asking me for help programming them. There's a very powerful and flexible system for defining entities using XML that you can see explained in one of my videos.

The engine is available for download at www.liquidfyre.com/tesserex/downloads.php. Note that it requires XNA to run, but that's also linked from the download page.

I'm not going to write any more right now because I don't have time and also I'm too tired and probably not very coherent right now. So that's all. Looking forward to feedback.

DjKlzonez

 *o* Wow, it looks really good, almost official!
But is there any way this engine can be PORTED (NOT emulated) for Mac?
Steam       Youtube

Mirby

Sweet! I'm checking this out!
Quote from: OBJECTION MAN on September 13, 2014, 04:31:11 PMOH [parasitic bomb] IM USING LINK AND I ACCIDENTALLY FINAL SMASHED A CUCCO OH GOD HELP
Quote from: VirusChris on September 16, 2017, 03:55:20 PMJust enjoy yourself, don't complain about everything

carlos-182

Wow, so this is done in XNA Game Studio  :o
I tried to make games with XNA but seems complicated... well the problem here is that I need to re-understand programming things like objects and classes.

I'll download this tomorrow, since it's late and I have to sleep.

But for the videos I have to say, good work  ;)

Sub Tank


Tesserex

Quote from: carlos-182 on April 13, 2010, 06:15:22 AM
Wow, so this is done in XNA Game Studio  :o

Well, it's not actually done in Game Studio. I originally wrote it with GDI+ (the standard windows drawing) for graphics. I use visual studio as my IDE. But GDI+ isn't hardware accelerated and became very slow. So I found a way to get xna drawing into a windows forms control (Microsoft wrote the control itself and has a tutorial with it).

carlos-182

When I try to execute, an exception is shown. "Exception not controlled in the application, an unexpected error has occurred".

I don't know what's happening, I had XNA Framework since I develop (or try  :|) in XNA Game Studio. I downloaded the framework from your page anyway and re-installed it, and it was the same.

I have Windows 7 by the way.

Tesserex

Hmm, interesting. My brother is able to run it on 64-bit windows 7, with xna 3.0 installed. Do you have 3.1 because of game studio? Maybe they're conflicting.

carlos-182

Yeah I have 3.1 but 3.1 supports 3.0 as far as I know.

But my Windows 7 is x86 (32 bits)

MexicanSunflower

Wow, I'm both surprised and happy you made a RPM thread about your engine. I've been following it for awhile, it's incredible!

Tesserex

Carlos, it's compiled as x86, and my machine is as well, so that can't be the problem. I'll investigate whether 3.1 is indeed compatible with 3.0.

For anyone else who has downloaded it (and please do if you haven't!) could you give me a quick report on success or failure?

Mirby

Hmm... I couldn't get it to work. I have XP SP2, btw.
Quote from: OBJECTION MAN on September 13, 2014, 04:31:11 PMOH [parasitic bomb] IM USING LINK AND I ACCIDENTALLY FINAL SMASHED A CUCCO OH GOD HELP
Quote from: VirusChris on September 16, 2017, 03:55:20 PMJust enjoy yourself, don't complain about everything

Tesserex

I have a suspicion as to why. And if I'm right I'll be pissed, because it means a lot more hassle for me. Basically using xna in a wingorms app requires you all to have visual studio or xna game studio installed. Total bull.

Update: someone on the xna forum says my suspicion is wrong (thankfully). But that means you guys are going to have to send me whatever details you can about the errors. I still don't know about whether 3.1 conflicts with 3.0

Posted on: April 13, 2010, 20:35:21
Just to make sure we cover all the bases - for those having problems, do you have .net 3.5 installed? Most people do, and it comes with windows vista and 7.

If that's not it, I would really appreciate Amy stack traces you might be getting (a huge chunk of code after an error message).

OBJECTION MAN

Coincidentally I do have Visual Studio 2008 installed, and it worked for me. Maybe your suspicion isn't all that wrong?

TWITCH   ➧ TWITTER   ➧ DISCORD   ➧ MY GAMES

Knockout Mondays
Experimental day: Fighting game engine project Live Gamedev (8PM - 10 PM EST)

WIP Wednesdays
Hamster Drop Gold Edition Live Gamedev (8PM - 10 PM EST)

Weekend Game Hangout
Marc, Amber, & Friends (Saturday Evening EST)

Tesserex

Ah, but the possibility remains that it only made it work for you because vs2008 gave you .net 3.5

Posted on: April 14, 2010, 03:02:07 PM
A new demo video has been posted to YouTube! This update - boss fights!!! View the awesome video here! Then when you're done, download the new version of the engine and try the fight for yourself.

carlos-182

I have to say, the video looks awesome.
Seems like you reached a great level of the engine, looks great.
But the problem persist, I can't play it  :(

This is the message:

System.InvalidOperationException: An unexpected error has occurred.
   en Microsoft.Xna.Framework.Graphics.RenderTarget.CreateRenderTarget(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Int32 numberLevels, SurfaceFormat format, MultiSampleType multiSampleType, Int32 multiSampleQuality, RenderTargetUsage usage, Boolean isTexture2D, _D3DSURFACE_DESC* pDesc)
   en Microsoft.Xna.Framework.Graphics.RenderTarget..ctor(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Int32 numberLevels, SurfaceFormat format, MultiSampleType multiSampleType, Int32 multiSampleQuality, RenderTargetUsage usage, Boolean isTexture2D)
   en Microsoft.Xna.Framework.Graphics.RenderTarget2D..ctor(GraphicsDevice graphicsDevice, Int32 width, Int32 height, Int32 numberLevels, SurfaceFormat format)
   en Mega_Man.EngineGraphicsControl.Initialize()
   en WinFormsGraphicsDevice.GraphicsDeviceControl.OnCreateControl()
   en System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   en System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   en System.Windows.Forms.Control.CreateControl()
   en System.Windows.Forms.Control.WmShowWindow(Message& m)
   en System.Windows.Forms.Control.WndProc(Message& m)
   en System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   en System.Windows.Forms.ContainerControl.WndProc(Message& m)
   en System.Windows.Forms.Form.WmShowWindow(Message& m)
   en System.Windows.Forms.Form.WndProc(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Buh  :(

Tesserex

Ok, I found one hint of what might cause it. Try replacing your Mega Man exe file with this one. I can't promise it will work but it's worth a shot. I found a third-hand source that suggested a fix which I've tried here.

carlos-182

Well the error doesn't show now... but the game doesn't start.
The screen keeps black and maybe I need to use "Open game", but I don't know what to open, I tried with Mega Man Common.dll but the error appeared again.
What should I open?

OBJECTION MAN

I dunno, maybe game.xml in the Demo Project folder.

TWITCH   ➧ TWITTER   ➧ DISCORD   ➧ MY GAMES

Knockout Mondays
Experimental day: Fighting game engine project Live Gamedev (8PM - 10 PM EST)

WIP Wednesdays
Hamster Drop Gold Edition Live Gamedev (8PM - 10 PM EST)

Weekend Game Hangout
Marc, Amber, & Friends (Saturday Evening EST)

Tesserex

I can't tell if you're being facetious, but yes, open game.XML. I'm glad that helped!

carlos-182

Well now there is progress  :D
I can see the boss select screen, but when I press 'enter' to enter the level, the game crashes again.
EDIT: The game crashes when I enter a level that is not the one of right corner.
So yeah, it works.
I can play the level that is shown on the video  8)

It's a great great engine dude, I want to ask you, what about the code, is it big? A lot of code lines?
You should make a tutorial, or something to tell us how did you made the game.

Long time ago I tried something with XNA but I failed, then I went through Multimedia Fusion 2, and then ended with Scirra Construct, making a Mega Man X fan game.

But it would be awesome if I do something with XNA, and I guess is similar to C#. (due the fact of XNA works in C#).

Well, congratulations dude, its a great work. 8)

Tesserex

Crashes when it's not the "one of right corner"? All three in the top row should work, the rest will crash. Besides, the Zero stage is the top middle. So which did you mean?


edit: You want to know about the code. It's right here. Yes, it's a lot of lines. I don't know exactly how many. Look at some of the files that end with Component. StateComponent.cs and CollisionComponent.cs are nice big ones. If I were you I might be curious how stuff actually winds up on the screen. If that's the case, check out SpriteComponent.cs, and then look at the code for the common dll here.

Posted on: April 26, 2010, 03:29:16
New update! No download for it yet though. This time I'm mainly demoing some enemies I wrote in XML. I also accidentally demo a new bug I introduced yesterday.

http://www.youtube.com/watch?v=XdJ6aqSx2dc

Favorite the video if you like it! Subscribe too.

OBJECTION MAN

Oh god I nearly spit out my dinner when I saw that note, haha.

And then when the rotating wheel DISAPPEARED I WAS LIKE FFFFFFFFFFFFFFFFFFF.

That was pretty awesome. Lots of cool ideas going on there.

TWITCH   ➧ TWITTER   ➧ DISCORD   ➧ MY GAMES

Knockout Mondays
Experimental day: Fighting game engine project Live Gamedev (8PM - 10 PM EST)

WIP Wednesdays
Hamster Drop Gold Edition Live Gamedev (8PM - 10 PM EST)

Weekend Game Hangout
Marc, Amber, & Friends (Saturday Evening EST)

Yoku Man

Seems alot of fans think alike. :) Expect some Yoku Spikes and Yoku Wheels in Yoku Man's stage too in MM Unlimited. I like the similarities to N-Mario's engine, especially the reverse gravity ability for debug testing over large pits.  >0<

Tesserex

New version, 0.9, is released! Get it here.

Remember that you need to install the XNA distro 3.0, available at the top of the page. You also need .NET 3.5. If you have Windows 7, .NET is preinstalled. Otherwise you may or may not have it.

The most important change in this version is that I fixed the problem that caused some people to be unable to run the engine. So if you still get an error trying to run it, please post the error here.

I apologize for the size of the download, it's mostly the music files. I tried MP3 but they didn't loop quite right.

edit: if you want to play crystal man (zero) stage and it isn't working, open demo project/stages/crystal/tiles.XML, and delete the file path at the top of the file. It should just say tiles.png. Sorry, that one slipped through the cracks.