Super Basic Mario Editor

This is the place for video games!

Moderator: Userbase Moderators

andreepika11233
Bot
Bot
Posts: 51
Joined: Thu Jan 01, 2015 9:48 am

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby andreepika11233 » Wed Jun 03, 2015 9:22 am

I got a error when I start testing levels. :\
Spoiler: show
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap..ctor(String filename)
at MarioEditor.Play.GetPlayer()
at MarioEditor.Form1.TestLevel1upF5ToolStripMenuItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18444 built by: FX451RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
MarioEditor
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/andree/Documents/vsmbx/VSMBX.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 11.0.50938.18408 built by: FX451RTMGREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34245 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Pilzinsel64
Fighter Fly
Fighter Fly
Posts: 34
Joined: Wed Apr 01, 2015 1:26 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Pilzinsel64 » Wed Jun 03, 2015 9:38 am

andreepika11233 wrote:
Pilzinsel64 wrote:Okay, If i move above the Level windows, then i have a realy nice error:
http://i.gyazo.com/d38e9679fa84fbf3ba0d87f3f5dfc4cc.png
Just press continue, and it will work as fine.
Okay, If i click "OK" and i move again above the level window the error showing again:
https://www.youtube.com/watch?v=03HOX1r ... e=youtu.be

aero
Palom
Palom
Posts: 4787
Joined: Fri Mar 28, 2014 2:51 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby aero » Wed Jun 03, 2015 11:34 am

Pilzinsel64 wrote:
AeroMatter wrote:
Pilzinsel64 wrote:Okay, If i move above the Level windows, then i have a realy nice error:
http://i.gyazo.com/d38e9679fa84fbf3ba0d87f3f5dfc4cc.png
Could you copy and paste then post the actual error here?
Spoiler: show
Error-Message:
Fehler beim Erstellen des Formulars. Weitere Informationen finden Sie in
Exception.InnerExcemption. Fehler: Indikatomamensdaten können nicht geladen werden, da ein
ungültiger Index "" aus der Registrierung gelesen wurde.


Details:
Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

************** Ausnahmetext **************
System.InvalidOperationException: Fehler beim Erstellen des Formulars. Weitere Informationen finden Sie in Exception.InnerException. Fehler: Indikatornamensdaten können nicht geladen werden, da ein ungültiger Index "" aus der Registrierung gelesen wurde.. ---> System.InvalidOperationException: Indikatornamensdaten können nicht geladen werden, da ein ungültiger Index "" aus der Registrierung gelesen wurde.
bei System.Diagnostics.PerformanceCounterLib.GetStringTable(Boolean isHelp)
bei System.Diagnostics.PerformanceCounterLib.get_NameTable()
bei System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
bei System.Diagnostics.PerformanceCounterLib.CounterExists(String category, String counter, Boolean& categoryExists)
bei System.Diagnostics.PerformanceCounterLib.CounterExists(String machine, String category, String counter)
bei System.Diagnostics.PerformanceCounter.InitializeImpl()
bei System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName, String instanceName, Boolean readOnly)
bei System.Diagnostics.PerformanceCounter..ctor(String categoryName, String counterName)
bei MarioEditor.Debug..ctor()
--- Ende der internen Ausnahmestapelüberwachung ---
bei MarioEditor.My.MyProject.MyForms.Create__Instance__[T](T Instance)
bei MarioEditor.My.MyProject.MyForms.get_Debug()
bei MarioEditor.Debug.MouseLoc(Int32 X, Int32 Y)
bei MarioEditor.Form2.Form2_MouseMove(Object sender, MouseEventArgs e)
bei System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
bei System.Windows.Forms.Control.WmMouseMove(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.Form.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Geladene Assemblys **************
mscorlib
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18444 built by: FX451RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll.
----------------------------------------
MarioEditor
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Users/Pascal%20Schedel/Desktop/content/VSMBX.exe.
----------------------------------------
Microsoft.VisualBasic
Assembly-Version: 10.0.0.0.
Win32-Version: 11.0.50938.18408 built by: FX451RTMGREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll.
----------------------------------------
System
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.34238 built by: FX452RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Core
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll.
----------------------------------------
System.Windows.Forms
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.34251 built by: FX452RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System.Drawing
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System.Configuration
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
----------------------------------------
System.Xml
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.34234 built by: FX452RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
System.Runtime.Remoting
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.34245 built by: FX452RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll.
----------------------------------------
System.resources
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.resources.dll.
----------------------------------------
mscorlib.resources
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.
----------------------------------------
Microsoft.VisualBasic.resources
Assembly-Version: 10.0.0.0.
Win32-Version: 11.0.50938.18408 built by: FX451RTMGREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic.resources/v4.0_10.0.0.0_de_b03f5f7f11d50a3a/Microsoft.VisualBasic.resources.dll.
----------------------------------------
System.Windows.Forms.resources
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18408 built by: FX451RTMGREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------

************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.

Zum Beispiel:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

Wenn das JIT-Debuggen aktiviert ist, werden alle Ausnahmefehler an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.
It looks like a problem with .NET and the performance counter. Try repairing it and let me know if it helps: https://www.microsoft.com/en-us/downloa ... x?id=30135
andreepika11233 wrote:I got a error when I start testing levels. :\
Spoiler: show
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap..ctor(String filename)
at MarioEditor.Play.GetPlayer()
at MarioEditor.Form1.TestLevel1upF5ToolStripMenuItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18444 built by: FX451RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
MarioEditor
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/andree/Documents/vsmbx/VSMBX.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 11.0.50938.18408 built by: FX451RTMGREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34245 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
This is strange. This looks like it would be a problem with your content directories due to the invalid bitmap string, but I'm not sure.

Pilzinsel64
Fighter Fly
Fighter Fly
Posts: 34
Joined: Wed Apr 01, 2015 1:26 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Pilzinsel64 » Wed Jun 03, 2015 12:20 pm

AeroMatter wrote:It looks like a problem with .NET and the performance counter. Try repairing it and let me know if it helps: https://www.microsoft.com/en-us/downloa ... x?id=30135

Okay, sry, but the fixtool does not help me. :?

aero
Palom
Palom
Posts: 4787
Joined: Fri Mar 28, 2014 2:51 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby aero » Sat Jun 06, 2015 11:29 pm

I now have a working NPC system, so the next big update is underway. Since adding every NPC that SMBX has with varying AIs and animation will take an immense amount of time, I will only focus on SMB3 NPCs and have them in the next update. Other non-SMB3 NPCs such as SMB1 goombas will likely be included too since they use the same AI as SMB3 goombas and what not.

Also, I'll see what I can do about moving away from using the performance counter since it's being more of a trouble than a benefit for some people.

aero
Palom
Palom
Posts: 4787
Joined: Fri Mar 28, 2014 2:51 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby aero » Sun Jun 14, 2015 4:16 pm

Here's a showcase of the experimental NPC system I've working on for the game engine:


Murphmario
2025 Egg Hunter
2025 Egg Hunter
Posts: 2389
Joined: Fri Dec 20, 2013 7:07 pm
Pronouns: he/him

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Murphmario » Sun Jun 14, 2015 6:59 pm

AeroMatter wrote:Here's a showcase of the experimental NPC system I've working on for the game engine:

Red Paragoombas need to jump higher. Plus, npcs fall too fast.

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Wohlstand » Sun Jun 14, 2015 8:31 pm

Good step for VSMBX development, but I wanna to give suggestions with physics and controls handling. Some pieces I wrote as text algorithms, so, you should understand what to do even we are programmers of different languages such C++ and VB.NET
I have completely implemented player physics myself, and I think, my code will help you to handle good physics.
Note: In text I have an "included conditions" like:

Code: Select all

var =   true  ? "yea" : "no, you liar!" ;
which a part of C/C++ syntax where you can reduce size of code with this small trick. But I used it in text, I think, you will get it.
Please save text of this post to have use my info in future.

Controls
First of all, DON'T use event "Control.KeyPress" for a controlling of character motion, it's a dumbest way.

Check out for a Keyboard.GetKeyStates(): https://msdn.microsoft.com/en-us/librar ... -snippet-2

while loop is going, inside player class in the "update()" call use a checking out for a key-states instead of handling a state key via Control.KeyPress .

Code: Select all

If (Keyboard.GetKeyStates(Key.Return) And KeyStates.Down) > 0 Then
				btnNone.Background = Brushes.Red
Note: char to key is convertible:

Code: Select all

Keys k = 'Z' as Keys
If (Keyboard.GetKeyStates(k) And KeyStates.Down) > 0 Then
 'it happened!, Z-key pressed!
My suggestion to use it:

1) make a structure of boolean values:

Code: Select all

Public Structure ControlKeys
    Public left As Boolean
    Public right As Boolean
    Public Up As Boolean
    Public Down As Boolean
    Public Run As Boolean
    Public Jump As Boolean
    '.....
End Structure
2) before you will do game logic, set boolean flags from key states and when do game logic to do a result with pressed or released keys

Physics

Instead of constant speeds without accelerations, use those things:
make inside player (and also inside each NPC) floating point variables:
_gravity (gravitation value, for example 26.0)
_velocityX (speed X) [default value 0.0]
_velocityY (speed Y) [default value 0.0]
_velocityX_prev
_velocityY_prev (Backup velocities which you can use in collision resolving formula) [both are 0.0 by default]
_accelX (just applied force to X) [default value 0.0]
_accelY (just applied force to Y) [default value 0.0]
min_vel_x (smaller X speed, how fast you can move left) [while you walk, -3.0, while run -6.0]
min_vel_y (smaller Y speed, how fast you can fly up) [up, 74.0]
max_vel_x (larger X speed, how fast you can move right) [while you walk, 3.0, while run 6.0]
max_vel_y (larger Y speed, how fast you can fall down) [down, 12.0]
decelerate_x (deceleration value, how fastly character will lose speed without acceleration. Set it to zero if you flying in the air) [while your speed less than max walking speed - 4.55, or 10.88, independent to direction. If you'r turning, - value is 18.2]
{turning is: if direction-left & key.left, but speed moves right, or if direction-right & key.right, but speed moves left }
grd_dec_x (soft deceleration of exited max speed if too fast runs) [equal to 4.55]
decelerate_y (deceleration value, how fastly character will lose speed without acceleration)
gravityScale (modification of gravity, by default it must be equal to 1.0)

When you wanna walk or run, each loop step set _accelX to 6.5 to run right or -6.5 to run left
========================================================
At same time you have a config of player:. Save it into safe place, you will use it in the update function
walk_force = 6.5 ; Walking on ice 1,625
run_force = 3.25 ; (0,05) Force while character ranning (it's speed more than walking speed!); 0,8125 ice
decelerate_stop = 4.55 ; Deceleration ; 1,1375 ice
decelerate_run = 10.88 ; Deceleration while speed higher than walking speed
decelerate_turn = 18.2 ; forcing deceleration ; 4,55 ice
decelerate_air = 0.0 ; Deceleration in air (useful for liquid-like environments)
slippery_c = 4.0 ; Accelerations coefficient on slippery surfaces
ground_c_max = 0.0 ;On-Ground max speed coefficient (use it underwater!)
ground_c = 0.0 ;On-Ground accelerations coefficient (use it underwater!)
gravity_scale = 1.0 ; modifier of player's gravitation. For example, if value will be equal to 0.5, gravity will be reduced, If 2.0, will be increased
velocity_jump = 5.3 ; jump velocity up: while time is not exited, player will fly up with defined velocity
velocity_jump_c = 5.0 ; Jump coefficient which provides increzed jump height dependent to speed
jump_time = 280 ; How milliseconds to do a velocity up
velocity_climb_x = 1.5 ;climbing speed left-right
velocity_climb_y_up = 2.0 ;climbing speed up
velocity_climb_y_down = 3.0 ;climbing speed down
MaxSpeed_walk = 3.0 ;max walking speed
MaxSpeed_run = 6.0 ;max running speed
MaxSpeed_up = 74.0 ;allowed flying up speed
MaxSpeed_down = 12.0 ;allowed fall down speed

Initialization of physics:
Set up default settings from our config into player:

max_vel_x = Math.Abs( isRunning ?
MaxSpeed_run :
MaxSpeed_walk);
min_vel_x = -Math.Abs(isRunning ?
MaxSpeed_run :
MaxSpeed_walk);
max_vel_y = Math.Abs(MaxSpeed_down);
min_vel_y = -Math.Abs(MaxSpeed_up);
decelerate_x = decelerate_air;
gravityScale = gravity_scale;
grd_dec_x = walk_force;

Iteration of physics
Do our physics step

timeStep - constant - quotient of 1000.0 to 65.0 . I use it to make accurate conversion between different frame rates.
ticks - time of one loop step - quotient of 1000.0 and number of frames per second (put your!).

' do iteration
set X position to: ( current X +_velocityX * (ticks/timeStep));
set Y position to: ( current Y + _velocityY * (ticks/timeStep));

'backup velocities
_velocityX_prev =_velocityX;
_velocityY_prev =_velocityY;

' special coefficient which we will use in next calculations:
float accelCof = ticks/1000.0f;

' Apply acceleration
if _accelX not zero
{
append [_accelX*accelCof] into _velocityX
_accelX=0 ' set acceleration value to zero (is important!)
}
else ' or Apply deceleration
if decelerate_x not zero
{
float decX = decelerate_x*accelCof;
if _velocityX > 0 'Deceleration if motion going to right
{
if (_velocityX-decX) > 0.0 then
_velocityX-=decX; ' do deceleration while greater than zero
else
_velocityX=0; ' set to zero to prevent inversion of movement (which looks creepy!)
}
else
if _velocityX < 0 then ' Same but if motion going to left
if (_velocityX+decX) < 0.0 then
_velocityX+=decX;
else
_velocityX=0;
}
}

' Apply Y acceleration
if _accelY not zero
{
_velocityY += _accelY*accelCof;
_accelY = 0; ' Don't forget!
}

if decelerate_y not zero
{
float decY=phys_setup.decelerate_y*accelCof;
if(_velocityY>0)
{
if((_velocityY-decY>0.0))
_velocityY-=decY;
else
_velocityY=0;
} else if(_velocityY<0) {
if((_velocityY+decY<0.0))
_velocityY+=decY;
else
_velocityY=0;
}
}

if gravity not zero
{
_velocityY += gravityScale * gravity *accelCof;
}

' Limit velocities!
if max_vel_x not zero, AND _velocityX > max_vel_x then
_velocityX -= grd_dec_x*accelCof

if min_vel_x not zero, AND _velocityX < min_vel_x then
_velocityX+=phys_setup.grd_dec_x*accelCof;
if max_vel_y not zero AND _velocityY > max_vel_y then
_velocityY = max_vel_y;
if min_vel_y not zero AND _velocityY < min_vel_y then
_velocityY = min_vel_y;


...When you can do collision resolving and after going the game logic and controls checking

Game logic and applying of controls
put into player's class the:
ticks floating point number equal to time on one step (1000.0/65.0). Instead of 65 put your value
jumpTime floating point number with initial 0
isRunning flag with initial "false" value
JumpPressed flag with initial "false" value
ducking flag with initial "false" value (I think, you already have it!)
direction integer with initial 1 value (or -1 if you need to init player with facing to left)

set flag onGround if you found than player stands on solid blocks or on shyguy's head
set flag on_slippery_surface if you stan on blocks with slippery flag

' now, apply some modifications of physics settings:
if onGround is true
decelerate_x =
(Math.Abs(_velocityX) <= MaxSpeed_walk) ?
(on_slippery_surface ? decelerate_stop / slippery_c : decelerate_stop) : (on_slippery_surface ? decelerate_run / slippery_c : decelerate_run);
else
decelerate_x = decelerate_air

if "run" key pressed
{
if not isRunning
{
max_vel_x = MaxSpeed_run;
min_vel_x = -MaxSpeed_run;
isRunning=true;
}
}
else
{
if isRunning
{
max_vel_x = MaxSpeed_walk;
min_vel_x = -MaxSpeed_walk;
isRunning=false;
}
}


if "down" key pressed
{
//change state of your character into "ducking" and set 'ducking' flag into true
} else { if ducking, then
//change state of your character into normal state and set 'ducking' flag into false
}




if NOT key "left" pressed OR if not key "right" pressed
{ //Don't worry, it's a small protection if you have pressed both left and right keys

' Detection of "is you are turning", you can use it to play "sliding" animation also
bool turning= ( _velocityX > 0 AND direction<0) OR ( _velocityX < 0 AND direction > 0 );

float force = turning ?
decelerate_turn :
[ Math.Abs( _velocityX) > MaxSpeed_walk ? run_force : walk_force ]

if on_slippery_surface then
force = force / slippery_c ' Resuce force if you are staying on ice!
else if onGround AND ground_c not equal to 1.0f then
force = force*ground_c;

if( left key pressed) then direction = -1;
if( right key pressed) then direction = 1

if NOT ducking OR NOY onGround then
{

If left key is pressed and no blocks at left side
{
_accelX = force; ' Set value of our acceleration, so, player will accelerate it's speed to walking or to running speed
}
If right key is pressed and no blocks at right side
{
_accelX = force*(-1);
}
}
}


if( keys.jump )
{
if(!JumpPressed)
{
//play "jump" sound
}

if not JumpPressed then
{
JumpPressed = true
if onGround
{
jumpTime = jump_time; 'Be careful! jump_time - from config, constant!, jumpTime - left time to fly up!
_velocityY = -velocity_jump - Math.Abs(_velocityX / velocity_jump_c);
}
}
else
{
if jumpTime > 0
{
jumpTime -= ticks;
_velocityY = -velocity_jump- Math.Abs( _velocityX / velocity_jump_c) );
}
}
}
else
{
jumpTime=0;
if(JumpPressed)
{
JumpPressed=false;
}
}

My source of player's game logic part:
https://github.com/Wohlhabend-Networks/ ... r.cpp#L319

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Axiom » Wed Jun 17, 2015 8:56 am

AeroMatter wrote:Here's a showcase of the experimental NPC system I've working on for the game engine:

woah i missed alot

I agree with what Wohlstand said for the Keyboard.GetKeyStates, it's what XNA used and for a good reason. But most of Wohlstand's code in the "Iteration of physics" part is written for C#/C++ syntax so just be warned there, shouldn't be too hard to convert though as long as you get your appropriate variables in there.

Good to see this is still progressing!

aero
Palom
Palom
Posts: 4787
Joined: Fri Mar 28, 2014 2:51 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby aero » Wed Jun 17, 2015 9:01 am

Thanks Luigifan, I actually switched to Keyboard.GetKeyStates and got that together. Good to see you back too!

Pilzinsel64
Fighter Fly
Fighter Fly
Posts: 34
Joined: Wed Apr 01, 2015 1:26 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Pilzinsel64 » Sat Jun 20, 2015 9:27 am

Why i can'T downlaod the source code of VSMBX?

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Wohlstand » Sat Jun 20, 2015 9:33 am

Pilzinsel64 wrote:Why i can'T downlaod the source code of VSMBX?
...because he wasn't uploaded it. He should upload his code into GitHub. It's simple and easy

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Axiom » Sat Jun 20, 2015 11:07 am

HAHAHAHAHAHA how did i miss the music for the NPC video. i can't believe you

aero
Palom
Palom
Posts: 4787
Joined: Fri Mar 28, 2014 2:51 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby aero » Sat Jun 20, 2015 12:56 pm

Pilzinsel64 wrote:Why i can'T downlaod the source code of VSMBX?
Because I can't into Git like Wohl says.
Luigifan2010 wrote:HAHAHAHAHAHA how did i miss the music for the NPC video. i can't believe you
:mrgreen:

Shadow Yoshi
Dark Knight
Dark Knight
Posts: 4291
Joined: Sun Dec 01, 2013 12:56 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Shadow Yoshi » Sat Jun 20, 2015 12:58 pm

Just use GitHub for the repository and GitHub for Windows to manage it. Doesn't require much Git knowledge at all.

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Wohlstand » Sat Jun 20, 2015 1:07 pm

Joey wrote:Just use GitHub for the repository and GitHub for Windows to manage it. Doesn't require much Git knowledge at all.
Yea, it can be got here:
https://windows.github.com/
It's a user-friendly GitHub client, and I began to use GitHub with them. Now I use the "Git Gui" which provides more advanced stuff, but it is NOT user friendly for a beginners, therefore GitHub official client is a right choice for you

When you will register GitHub account and when you will install app, steps needed to be done:
1) make a repo in the GitHub site:
- page "repositories" and tick "New"
- fill "Repository name" [with no spaces ASCII only] and "repository description", check in the "Add .gitignore" the 'VisualStudio' to fit your VB.NET project, and in the "Add Licence" choice a public license of VSMBX (ZLIB, MIT, GPLv3 or any other, but be careful, if you has to use any GPL-based code files [Copy-Pasted As-Is or partially modified] or static libraries (not as DLL-files), VSMBX should be under GPL too!)
- click "Create repository"
...and now you have to make a repository
2) gonna into GitHub for windows and add your just-created repo, and choice the folder where repo will be physically located
3) Move entire VSMBX source project include all working files into repo folder and check out than it still working from a new place
4) commit your tonn of files as "Init commit" and sync repos by clicking of a special button

Every time when you was made some partial work with VSMBX, open GitHub for Windows and commit your changes, then sync them.

Every time when someone (who has write access into your repo. Usually if repository created in as "repo of organization". You can make your own "organization" and invite friends to do a work together!) made side changes, you must merge them with your. If are not conflicts detected, everything will be done automatically. BUT, if found a conflict (if was modified SAME line by different people), you should open issued file and solve conflict by manual edit of than file. When save it and check again.

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Axiom » Sat Jun 20, 2015 2:58 pm

Actually, command line Git is really simple.
On Ubuntu, I use the GitHub website to create my repository, then I use git clone to clone it (which makes a copy of the source code into your local files). Then, I copy all of my existing code into that folder, run git status to check what files were changed, then use git add . to add ALL of the files (changed or new) into the queue to be pushed. Then, use git commit to create a commit. You can make many of these before finally using git push to push them, but I like to push after committing.

Or you could use the GitHub for Windows client but I found it to be kinda slow even on my Quad Core :/

If you push this project to GitHub I'll totally contribute! GitHub makes this stuff really simple, I love it. I especially love it because it basically means easy syncing of source code. It's super efficient, and version controlled so if you screw up you can revert a file. It's arguably the most important tool to learn (next to your IDE) as a developer.

Pilzinsel64
Fighter Fly
Fighter Fly
Posts: 34
Joined: Wed Apr 01, 2015 1:26 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Pilzinsel64 » Wed Jun 24, 2015 11:36 am

So, I started searchin the Error ...
Here is a error if i move above the level windows:

Image

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Wohlstand » Wed Jun 24, 2015 12:16 pm

Pilzinsel64 wrote:So, I started searchin the Error ...
Here is a error if i move above the level windows:

Image
Than compatible with VS2013 :P

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: Visual Super Mario Bros. X (VSMBX) Thread

Postby Axiom » Wed Jun 24, 2015 1:27 pm

I tried translating that error

"Indicator name data can not be loaded because a ungultiger Index '' was read from the registry"

I don't know how accurate this is but from the looks of things, a registry value is corrupted.

Try the solution here: http://stackoverflow.com/questions/1798 ... -exception


Return to “Video Games”

Who is online

Users browsing this forum: Petal [Bot] and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari