C# MegaMan Engine

Tesserex · 69692

0 Members and 1 Guest are viewing this topic.

Offline Tesserex

  • Net Navi
  • *
    • Posts: 68
    • View Profile
on: April 13, 2010, 05:04:15 AM
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.



Offline DjKlzonez

  • B-Class Hunter
  • *
    • Posts: 411
    • Gender: Male
  • Once a year
    • View Profile
Reply #1 on: April 13, 2010, 05:17:14 AM
 *o* Wow, it looks really good, almost official!
But is there any way this engine can be PORTED (NOT emulated) for Mac?

Steam       Youtube


Offline Mirby

  • RPM's Krillin
  • Legendary Hero
  • *
    • Posts: 14047
    • Gender: Female
  • KINGDOM HEARTS IS WAAAAAAA
    • View Profile
    • Mirby Studios
Reply #2 on: April 13, 2010, 05:35:56 AM
Sweet! I'm checking this out!

OH [parasitic bomb] IM USING LINK AND I ACCIDENTALLY FINAL SMASHED A CUCCO OH GOD HELP
Just enjoy yourself, don't complain about everything


Offline carlos-182

  • Net Navi
  • *
    • Posts: 53
    • View Profile
Reply #3 on: April 13, 2010, 06:15:22 AM
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  ;)



Offline Sub Tank

  • Neo Arcadian
  • *
    • Posts: 1409
  • PHOTOBUCKET EXPIRED
    • View Profile
Reply #4 on: April 13, 2010, 06:23:34 AM
Looking sharp.



Offline Tesserex

  • Net Navi
  • *
    • Posts: 68
    • View Profile
Reply #5 on: April 13, 2010, 01:04:59 PM
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).



Offline carlos-182

  • Net Navi
  • *
    • Posts: 53
    • View Profile
Reply #6 on: April 13, 2010, 03:26:20 PM
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.



Offline Tesserex

  • Net Navi
  • *
    • Posts: 68
    • View Profile
Reply #7 on: April 13, 2010, 03:32:11 PM
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.



Offline carlos-182

  • Net Navi
  • *
    • Posts: 53
    • View Profile
Reply #8 on: April 13, 2010, 05:52:32 PM
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

  • Guest
Reply #9 on: April 13, 2010, 06:40:39 PM
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!



Offline Tesserex

  • Net Navi
  • *
    • Posts: 68
    • View Profile
Reply #10 on: April 13, 2010, 07:23:22 PM
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?



Offline Mirby

  • RPM's Krillin
  • Legendary Hero
  • *
    • Posts: 14047
    • Gender: Female
  • KINGDOM HEARTS IS WAAAAAAA
    • View Profile
    • Mirby Studios
Reply #11 on: April 13, 2010, 08:34:21 PM
Hmm... I couldn't get it to work. I have XP SP2, btw.

OH [parasitic bomb] IM USING LINK AND I ACCIDENTALLY FINAL SMASHED A CUCCO OH GOD HELP
Just enjoy yourself, don't complain about everything


Offline Tesserex

  • Net Navi
  • *
    • Posts: 68
    • View Profile
Reply #12 on: April 14, 2010, 11:15:24 PM
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).



Offline OBJECTION MAN

  • Neo Arcadian
  • *
    • Posts: 1847
    • Gender: Male
    • View Profile
Reply #13 on: April 14, 2010, 11:29:05 PM
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)


Offline Tesserex

  • Net Navi
  • *
    • Posts: 68
    • View Profile
Reply #14 on: April 24, 2010, 07:15:34 AM
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.



Offline carlos-182

  • Net Navi
  • *
    • Posts: 53
    • View Profile
Reply #15 on: April 25, 2010, 06:31:26 AM
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  :(



Offline Tesserex

  • Net Navi
  • *
    • Posts: 68
    • View Profile
Reply #16 on: April 25, 2010, 07:30:41 AM
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.



Offline carlos-182

  • Net Navi
  • *
    • Posts: 53
    • View Profile
Reply #17 on: April 25, 2010, 04:08:23 PM
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?



Offline OBJECTION MAN

  • Neo Arcadian
  • *
    • Posts: 1847
    • Gender: Male
    • View Profile
Reply #18 on: April 25, 2010, 06:25:40 PM
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)


Offline Tesserex

  • Net Navi
  • *
    • Posts: 68
    • View Profile
Reply #19 on: April 25, 2010, 08:32:07 PM
I can't tell if you're being facetious, but yes, open game.XML. I'm glad that helped!



Offline carlos-182

  • Net Navi
  • *
    • Posts: 53
    • View Profile
Reply #20 on: April 26, 2010, 03:16:53 AM
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)



Offline Tesserex

  • Net Navi
  • *
    • Posts: 68
    • View Profile
Reply #21 on: May 07, 2010, 01:54:02 AM
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.



Offline OBJECTION MAN

  • Neo Arcadian
  • *
    • Posts: 1847
    • Gender: Male
    • View Profile
Reply #22 on: May 07, 2010, 03:18:55 AM
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)


Offline Yoku Man

  • Robot Master of Yoku Blocks.
  • Resistance Member
  • *
    • Posts: 248
    • Gender: Male
  • "Don't Trust Your Eyes, Trust Mine."
    • View Profile
Reply #23 on: May 07, 2010, 04:14:51 AM
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<



Offline Tesserex

  • Net Navi
  • *
    • Posts: 68
    • View Profile
Reply #24 on: May 11, 2010, 01:32:07 PM
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.