SMBX NPC Code Editor [Final Tiebreaker Vote]

General discussion about Super Mario Bros. X.

Moderator: Userbase Moderators

Which icon will be in the next version of the SMBX Episode Manager? (see first post for details)

Poll ended at Sat Oct 25, 2014 8:26 am

Wohlstand
3
38%
Luigifan2010 (the original, currently used one)
5
63%
 
Total votes: 8
Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Wohlstand » Sat Aug 30, 2014 10:36 am

Luigifan2010 wrote:
Wohlstand wrote:Error when open the NPC.txt with sprote:
Spoiler: show
Image
And when I press "start" - > crash

Take them for test:
http://engine.wohlnet.ru/docs/_files_fo ... Makers.zip
Err, could you translate that error for me (crap I never knew .net auto translated stack exceptions)
EDIT: I didn't get any errors oddly enough
[rimg]http://gyazo.com/4e6fe219c7ca3cf0af3bff5f1a39eaa3.png[/rimg]
SnifitGuy wrote:I have an icon submission:
Spoiler: show
Image
very good B)
Inpus string has wrong format

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Axiom » Sat Aug 30, 2014 10:39 am

You're missing some INI's then.

My folder is as shows
Image

And I actually use a modified version of your INI, I took out all the comments and changed a couple names

This won't be an issue in the new version as I'll code a fallback in case you want to use just the exe

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Wohlstand » Sat Aug 30, 2014 11:42 am

Luigifan2010 wrote:You're missing some INI's then.

My folder is as shows
Image

And I actually use a modified version of your INI, I took out all the comments and changed a couple names

This won't be an issue in the new version as I'll code a fallback in case you want to use just the exe
Is right? :D (Windows XP Professional Service Pack 3, almost all latest updates was installed (I used the offline updater for got all updates for fast-update new installed PC))
Image

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Axiom » Sat Aug 30, 2014 5:02 pm

Ahah, I was able to replicated under my Windows XP virtualbox. I'll work on getting this fixed asap, thanks for reporting this ;)

This was the output of the program at any rate if you're curious

Code: Select all

Running in debug mode
Loaded Configuration: SMBX64 Successfully
Reading: E:\Users\Mike\Desktop\CrashMakers\npc-275.txt
height is 64
width is 48
gfxheight is 64
gfxwidth is 48
Unable to create animation: Input string was not in a correct format.

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Axiom » Sat Aug 30, 2014 5:59 pm

Alright, good news. I figured out that Windows XP has some crazy limitation that when opening files, it actually changes the what Environment.CurrentDirectory outputs.

For example, let's say that program is located at "C:\\smbx\\SMBX NPC Editor.exe". At the programs creation point, Environment.CurrentDirectory will return that. However, once we open a file, lets say the file is located at "C:\\npc-175.txt", the Environment.CurrentDirectory will return C:\\ instead of C:\\smbx\\ like it should. That's just how XP works and it's but a simple fix.

This is not an issue on Windows 7 and 8 and probably Vista too but I'll make the solution global just to be safe. What I should be doing is using the built in reflection libraries to return the location of the EXE and using Path.GetDirectory instead of using Environment.CurrentDirectory to be safe on all OS'es. Glad you caught this, this is already being fixed in the new one ;)

[rimg]http://gyazo.com/8502c9f859ea0aa9d958b09efa21287e.png[/rimg]

I've updated the zip in the first post or if you want just the exe, you can download it here

zernicalohd
Swooper
Swooper
Posts: 62
Joined: Mon Aug 18, 2014 1:37 pm

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby zernicalohd » Mon Sep 01, 2014 12:17 am

Two icons ideas, i hope you like it.
Image
Image

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Axiom » Mon Sep 01, 2014 10:00 am

I like that first one a fair bit more than the second.
Oh and keep in mind, I completely forgot I could incorporate multiple icons for different sizes. So I could say use SnifitGuys' for the 64x64 or 128x128 and use yours for smaller ones. If that's the case both will get credits :)

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Wohlstand » Mon Sep 01, 2014 10:27 am

My icon (in 4 formats which available in the ICO format)
256x256 Image

48x48 Image

32x32 Image

16x16 Image


And compiled ICO file:
http://engine.wohlnet.ru/docs/Images/Ic ... pcedit.ico

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Axiom » Mon Sep 01, 2014 2:36 pm

I like all of these so far ;)

Here's a peek at what I've got done so far

[rimg]http://gyazo.com/5f9a917155d4849a38db67afd722782f.png[/rimg]
Initial UI. All of the value editors are seperate controls. EX: the gfx width label, spinner, and check box are all grouped together as one control. All I have to do is construct the event handlers to point to one void and it makes my life much much easier. Much better than how it was done before imo. Alot of this is actually internal stuff more than anything.
I couldn't get everything aligned PERFECTLY due to the way I have text scaling to work (hey, at least it'll use the native font on your system).

Also hey check this out
Image

EDIT: CELEBRATING THE FACT I HIT 420 LINES OF CODE

Image

The older Main class had 1994 lines of code, yeah just shows how much I've slimmed it down.

SMBXRaptor
Guest

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby SMBXRaptor » Tue Sep 02, 2014 10:48 am

i think we dont need this , wohlstand already make best animator and npc editor

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Wohlstand » Tue Sep 02, 2014 11:12 am

SMBXRaptor wrote:i think we dont need this , wohlstand already make best animator and npc editor
SMBXRaptor, he start this tool before I made my editor possible to save files, also I don't object for this. My editor is a huge part of developing project and "Photoshop" for SMBX, and this tool is a NPC.txt specific editing. Also we with Luigifan2010 are cooperate ;)

Luigifan2010,
I can adapt my NPC animator into С#, but I need for tiny help with C# environments:
- How to define dynamic array of bitmaps?
- how to crop bitmap into pieces and I wanna store them into array

I will give to you list of variables and functions which you should to define, and I will write contents for make it working.

Functions
void setAnimator()
function should:
- clear current framelist
- set animation properties into special variables
- crop source image into pieces
- set timer settings and set call "next Frame" function each timeout
Function should have access to "merged" NPC's config. I.e. merged INI with NPC.txt
This function should be re-Called by change of GFX width/height, frame-style and frame-speed. (before apply new changes, timer should be stopped)

void setFrame(int)
function should change current frame by accepted index (0 - is first frame) and refresh view of displayed animation

void nextFrame() -
this function should be called by timer. This is a calculator of next frame.

Variables and arrays
List<bitmap> frames - bitmaps dynamic array. Will have inside them frames.
int CurrentFrame - index of frame which displaying now
int frameCurrent; - calculating frame. Using by nextFrame() function
int frameSpeed - value in milliseconds, this is a timer value
int frameStyle - same from config
int direction - current direction (-1 or 1)
bool aniDirect; - Directed animation. I.e. left and right directions will define animation direction (reverse or direct)
bool aniBiDirect; - Bidirectional animation. I.e. animation direction will turn on last frame and will turn after return into first frame.
int curDirect; - direction of animation, I.e. direct or reverse animation.
int frameStep; - How many frames will be forwarded by one animation step. (defaultly 1, but if enabled algorithm "frameJump", this value can be redefined)
bool customAnimate;
int customAniAlg; //custom animation algorythm 0 - forward, 1 - frameJump, 2 - animation by frame sequance
int custom_frameFL;//first left
int custom_frameEL;//end left / jump step
int custom_frameFR;//first right
int custom_frameER;//enf right / jump step
bool frameSequance; - animation will go by predefined animation sequance\
List<integer> frames_list - dynamic array of INT degits which a frames indexes. This array Defining the frame sequance.

int framesQ; - total frames in sprite (calculating by dividing of sprite height to gfx height value)
int frameSize; // size of one frame - gfx height
int frameWidth; // sprite width
int frameHeight; //sprite height - height of source image

//Animation alhorithm
int frameFirst; - index of first frame (defining by setAnimation() and using by "nextFrame")
int frameLast; - index of last frame (if value -1, last frame is a last frame which stored into array)

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Axiom » Tue Sep 02, 2014 3:28 pm

Thank you very much for this Wohlstand. I'll see about cropping the npc into frames and such when I get a chance, it shouldn't be too much really but this is an excellent start :)
SMBXRaptor wrote:i think we dont need this , wohlstand already make best animator and npc editor
This was inspired by Wohlstand's and actually supporting saving before his did. The point of this was to have a one click single exe for you to quickly modify changes and not have to open an entire suite of programs and that's still my goal with this.

EDIT: update, UI is done for the most part. npc animator is not functioning. reading still has to be taken care of

[rimg]http://gyazo.com/262ebf6fc9a36e22c0c9156b3c2a66b5.png[/rimg]

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Wohlstand » Wed Sep 03, 2014 11:14 am

Luigifan2010 wrote:Thank you very much for this Wohlstand. I'll see about cropping the npc into frames and such when I get a chance, it shouldn't be too much really but this is an excellent start :)
If you have function for get image fragment, you can use this algorithm:

- Before start loop clear array;
for ( i=0; i<img_Height; i+= frameHeight )
{
- Create dummy image with width equal to frame_Width and with height eqial to frameHeight
- copy fragment from source image: X: i, Y: 0, W=frameWidth, H=frameHeight, and overwrite by them our dummy image
- add this dummy image into end of array
}

Note: My animation functions always checking the number of items in array to escape crash by "out of range"

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Axiom » Sat Sep 06, 2014 1:14 pm

hi so instead of programming the animator like i should be doing, i made this instead

[rimg]http://gyazo.com/a83b8be25da428f316890dc5be1350d0.png[/rimg]

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Wohlstand » Sun Sep 07, 2014 11:03 am

Luigifan2010 wrote:hi so instead of programming the animator like i should be doing, i made this instead

[rimg]http://gyazo.com/a83b8be25da428f316890dc5be1350d0.png[/rimg]
I will program animator, I need only defined dummy functions and variables, and I will program them ;-)
(give me link to file, and I will return by pull request edited)

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Axiom » Sun Sep 07, 2014 11:08 am

Wohlstand wrote:
Luigifan2010 wrote:hi so instead of programming the animator like i should be doing, i made this instead

[rimg]http://gyazo.com/a83b8be25da428f316890dc5be1350d0.png[/rimg]
I will program animator, I need only defined dummy functions and variables, and I will program them ;-)
(give me link to file, and I will return by pull request edited)
I forgot to mention I started on it, I have the List<bitmap> setup and ready to go.

What I really needed help with would be defining the frames for each side, if I interpreted right you wanted 2 List<int>'s. Let's say for example, this NPC has 4 frames 2 for each side right?

So the first List<int> would have:
1
2

And the second would have:
3
4

Is that what you meant?

As of now, its super beta and the face left and right buttons are placeholders that cycle through the frames. I've only tested this with a custom Ludwig and I haven't started on loading default values from the ini. Here's just the class: https://github.com/Luigifan/smbx-npc-ed ... nimator.cs.

Be warned: it's a WinForms usercontrol class so there is some UI attached to it. There's also a couple calls in MainUI.cs to assign some values and such.

But I did put in all of the variables you mentioned a couple posts earlier, I just haven't outlined the functions yet.

But at the very least, saving and loading is fully working now, and it works very well might I add ;)

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Wohlstand » Sun Sep 07, 2014 11:22 am

Luigifan2010 wrote:
Wohlstand wrote:
Luigifan2010 wrote:hi so instead of programming the animator like i should be doing, i made this instead

[rimg]http://gyazo.com/a83b8be25da428f316890dc5be1350d0.png[/rimg]
I will program animator, I need only defined dummy functions and variables, and I will program them ;-)
(give me link to file, and I will return by pull request edited)
I forgot to mention I started on it, I have the List<bitmap> setup and ready to go.

What I really needed help with would be defining the frames for each side, if I interpreted right you wanted 2 List<int>'s. Let's say for example, this NPC has 4 frames 2 for each side right?

So the first List<int> would have:
1
2

And the second would have:
3
4

Is that what you meant?

As of now, its super beta and the face left and right buttons are placeholders that cycle through the frames. I've only tested this with a custom Ludwig and I haven't started on loading default values from the ini. Here's just the class: https://github.com/Luigifan/smbx-npc-ed ... nimator.cs.

Be warned: it's a WinForms usercontrol class so there is some UI attached to it. There's also a couple calls in MainUI.cs to assign some values and such.

But I did put in all of the variables you mentioned a couple posts earlier, I just haven't outlined the functions yet.
But at the very least, saving and loading is fully working now, and it works very well might I add ;)

I was review file and was fork your repo into Wohlhabend-Networks, and will try to imlpement my animator

Is this right for build? (to test)
http://www.visualstudio.com/ru-ru/produ ... express-vs
Or I have dists of Visual Studio 2010 Ultimate which I got by Dreamspark license because I'm studding in university.

EDIT: Found on your screenie the Visual C# Express 2010, just got here: http://www.microsoft.com/ru-ru/softmicr ... press.aspx

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Axiom » Sun Sep 07, 2014 4:22 pm

You can use C# 2010 Express, but I recommend an ultimate and installing Costura-Fody via NuGET package manager. I think you need ultimate to use that package manager. I use Fody to compile the DLL's inside of the application to make things neater. Don't forget to copy the "Data" folder into the same directory as the EXE, I haven't bothered to play around with build options to get it done automatically for me. I'll check out and merge and stuff when you're done ;)

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

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Axiom » Wed Sep 10, 2014 5:46 pm

hey guys, just thought i'd let you know

i've decided to start some preliminary beta testing, every so often i will push out some builds via a clickonce installer (auto updating out of the box, makes my life so much simpler). you can check out the page here and help me squish some bugs. Thanks guys, and cheers!

Blck_Guy
Guest

Re: SMBX NPC Code Editor (DESIGN THE NEXT ICON!!)

Postby Blck_Guy » Fri Sep 26, 2014 6:49 am

I just realized something, why is there two tick boxes? - One to make the next to it tickable?



Oh! Also I found and error:
Spoiler: show
Image

Also tried to do it on a standard GFX, one that came with SMBX:

Spoiler: show
Image


Return to “General”

Who is online

Users browsing this forum: Levelmaker_123 and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari