Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Super Mario game  (Read 10979 times)

0 Members and 2 Guests are viewing this topic.

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Super Mario game
« on: August 06, 2016, 05:06:12 am »
Hi Ladies and Guys

This is my last version of Super Mario game, done with C# .Net and SFML. It has (by now) 2 worlds with 6 levels each.

https://www.dropbox.com/s/ni5st51tkgrndl7/My%20New%20Super%20Mario%20Bros.rar?dl=0

The levels were designed with my own editor

I'll try to make the code tidier and completely in English soon and then post it here

I don't know how to make a video, sorry

I would apreciate advices on how to get it better
Thanks

Pablo
(from Argentina)

Voroz

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Super Mario game
« Reply #1 on: August 10, 2016, 01:02:15 am »
Unfortunately your game crashes for me instantly. Windows "A program has stopped working" comes up. Debug shows System.badimageformatexception [5152]. But judging from your data assets, alot of work went into it. Would like to try it :).

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Super Mario game
« Reply #2 on: August 10, 2016, 10:47:22 am »
Crashes for me as well... :(
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: Super Mario game (already fixed the crash)
« Reply #3 on: August 11, 2016, 02:06:05 am »
Hi,
Thank you for reporting the crash.  :)

Here's the link (the exe file already fixed)
https://www.dropbox.com/s/ni5st51tkgrndl7/My%20New%20Super%20Mario%20Bros.rar?dl=0

There are still a few details to fix (as the rakoon tail attack) and some enemies to add. And also to add more levels.   :D

The app is for 32 bit systems. I'm not sure, but think if you change the DLLs in the folder where the .exe is, you can run it on a 64 bit system.
Thanks

« Last Edit: August 12, 2016, 08:28:08 pm by Tigre Pablito »

Ruckamongus

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: Super Mario game
« Reply #4 on: August 15, 2016, 05:37:06 pm »
Unfortunately, it still crashes for me as well:


K.F

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • Email
Re: Super Mario game
« Reply #5 on: August 16, 2016, 02:27:21 am »
Does not even boot by default, downloading the SFML.Net 2.2 64-bit files and replacing the files that comes with the game makes the game boot, show a loading screen, then crash.

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: Super Mario game
« Reply #6 on: August 16, 2016, 03:01:06 am »
Drats! I oath you that in my PC my mario game ran fine ... I was using VC# 2008 Express, and though when debugging there appeared about 300 error messages of "SFML namespace not found", the app ran Ok ... i suppose that those messages were which prevent the exe to create Ok (but don't understand why the project ran in muy PC)

I thought that changing to VS 2015 Community and using the latest version of SFML would solve the problem, but if i use Version 2.2 it throws an error "Cannot load the dll file csfml-graphics-2", and the Version 2.4 i don't know how to use it, i think there is a cmake procedure, but have no idea of what to do

I will apreciate any help

Ah, here i give you a link to the source code folder, sure in it there are no errors in compile time, perhaps you can tell me how to do testing it, you need the exe that the code generates (it's in C#), the dlls and the 'data files' foldfer

https://www.dropbox.com/s/gbv38rs3xovgm4u/My%20New%20Super%20Mario%20Bros%20Source%20Code.rar?dl=0


man'O'war

  • Newbie
  • *
  • Posts: 46
  • What needs to be done is done by those capable.
    • View Profile
Re: Super Mario game
« Reply #7 on: August 16, 2016, 05:50:07 am »
Hi,

I will be pleased to recompile your code and test it but, unfortunately i dont have C# environment installed. I work only with C++ at the moment. :(

I don't know how to make a video, sorry
You can put few screen-shots instead.

Good luck.

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Super Mario game
« Reply #8 on: August 16, 2016, 09:24:30 am »
You're trying to load a file that doesn't exist in data load.cs:53. (copy and paste error?) Changing the path to "dir + Hammer.wav" fixed the crash for me.

Though it seems like it might be stuck in an infinite loop when loading the first stage. Or I'm impatient. :) (Might want to consider allowing the user to "press any key to skip" during intros/etc)

Also, personally, the color flashing in the second intro is a bit much. :)

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: Super Mario game
« Reply #9 on: August 16, 2016, 03:03:22 pm »
I got this error that is in the 1st screenshot, it says in Spanish "Cannot load DLL file sfml-graphics-2. Cannot find specified module." (and i attached 3 screenshots of the game when run on VC# 2008)

I suppose it could be that i'm using the wrong version of SFML? i'm now using Visual Studio 2015 (C#)

I downloaded SFML 2.4 but don't know how i should use it or what to do, cos there are many more dll files, and there aren't the csfml-xxxxxxx dlls

I think if i can solve this issues i will be able to make the game run (again)

I didn't see the error in data load (maybe cos it stops before) and then i'll remove the flashing

Thanks for your help

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Super Mario game
« Reply #10 on: August 16, 2016, 07:33:04 pm »
SFML.NET and CSFML aren't updated to 2.4 yet (But I'm working on it), so you can't use it. You've gotta use 2.2, just download the whole zip from the sfml's website, extract it, and it essentially just works.
Pick 32-bit and/or 64-bit, and make sure you add references to (and copy) the correct dlls based on your target architecture in Visual Studio.
I personally disable the "Any CPU" target, and set only x86 and x64, though that may partly be because I find it easier to be explicit in what I want (and/or I'm just more familiar with C++ compilers). :)

That error message just means that .NET can't find the dll it specifies, or one of that dll's dependencies. Make sure you have all the dll's from the SFML.NET download copied to the same directory as the produced exe.
« Last Edit: August 16, 2016, 07:37:28 pm by dabbertorres »

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: Super Mario game
« Reply #11 on: August 16, 2016, 10:57:58 pm »
Now I have got this message

**********************************
Severity   Code   Description   Project   File   Line   Suppression State
Warning      There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "sfmlnet-window-2, Version=2.2.0.0, Culture=neutral, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.   Super Mario         
********************************

Is it a problem with the DLLs (the msg repeats for every DLL) or something in my VS 2015 project?
cos in VC# 2008 it ran perfectly ...  :(

if the problem is in something about my VS 2015 project configuration, and someone who uses C# can tell me how to fix this, i would thank him/her strongly  :)


dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Super Mario game
« Reply #12 on: August 17, 2016, 01:33:32 am »
That's what my 2nd and 3rd sentences were talking about.

See: https://msdn.microsoft.com/en-us/library/ms185328.aspx

I think I saw you mention you're on a 32-bit machine, so make sure you set it all up for x86.

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: Super Mario game
« Reply #13 on: August 17, 2016, 02:59:32 am »
Thank you very much for testing my game and helping me!  ;D

dabbertorres was right, the app got stuck into an infinite loop, that is not infinite, but as the variable that had to make it end didn´t decrease, it didn´t end ... in brief, i implemented properties instead of defining all attributes public, and didn't do that well ... i have already fixed that, and now the game runs fine, with no error messages  :)

Very sorry for all this issue that was my own error (i had to debug very hard to find it), not the DLLS neither the project configuration  :(

Please now tell me it runs Ok
https://www.dropbox.com/s/ni5st51tkgrndl7/My%20New%20Super%20Mario%20Bros.rar?dl=0

and this is the code fixed
https://www.dropbox.com/s/gbv38rs3xovgm4u/My%20New%20Super%20Mario%20Bros%20Source%20Code.rar?dl=0


K.F

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • Email
Re: Super Mario game
« Reply #14 on: August 17, 2016, 04:49:35 am »
Works  ;)