Hacking Reggie! - NSMBWii Level Editor

Status
Not open for further replies.

WiiFan2012

Well-Known Member
Member
Joined
Dec 1, 2009
Messages
177
Trophies
0
XP
117
Country
United States
Well, its good to know that Nintendo didn't waste time making levels that didn't get unused
smile.gif
I'm impressed with this editor, or should I say, creator!

Hope it gets released to celebrate the new year!

FYI: on Monday, there are three years left to 2012. Let just see what happens that year.
 

Dteyn

Well-Known Member
Member
Joined
Aug 3, 2008
Messages
335
Trophies
0
XP
115
Country
Canada
WiiFan2012 said:
FYI: on Monday, there are three years left to 2012. Let just see what happens that year.

rolleyes.gif


It is widely believed by me that, according to Mayan predictions, in 2012 The Big N will release their next generation console (some people insist it will be called the Wii2, despite the fact that it was foretold by the Mayans that the console will be called the 'Yahuu') which will utilize the all new SMDF controller technology which Nintendo is currently working on. As per the Mayan predictions, the combined use of all these controllers will distort Earth's magnetic field to an extreme point, causing the magnetic poles to flip and in turn, erasing all of the magnetically stored data on the planet. Given the rapid rise of the popularity of World of Warcraft and the upcoming Diablo III, the Mayan Shamans predicted the end of civilization will come in 2012 when all Battle.net gamer accounts are wiped out, resulting in a mass suicide of the majority of the Human male population.
 

WiiFan2012

Well-Known Member
Member
Joined
Dec 1, 2009
Messages
177
Trophies
0
XP
117
Country
United States
^^

Thats actually funny. But, thats why I put lets just see what happens. Who knows, it may just pass us by. But; that is when the Galactic Alignment is due to happen. Who knows? We'll just have fun speculating until that day.
 

Treeki

Well-Known Member
OP
Member
Joined
Aug 1, 2007
Messages
203
Trophies
0
Location
Rogueport
XP
255
Country
Gibraltar
Sorry for the lack of updates, but we've been working hard and hope to have our first release out soon! I apologise for the length, but this is a pretty detailed/technical post.

The base editor is about 95% complete now - we're simply working on bugfixes and other minor improvements. The only thing we're waiting on now is the sprite data collection. (I also need to implement custom graphics for the platform line guides, like in 8-7 - since they don't show otherwise.)

One main improvement that I've been working on today is for speed. Right now, the editor works quite well in normal usage (even on underpowered systems) - but loading tilesets is extremely slow. Reggie takes about 20 seconds to start on my netbook (1.6ghz Intel Atom CPU, Linux Mint) and about 5 seconds on my desktop (2.4ghz Intel quad-core CPU, Windows 7).

So we've been looking into optimising it. I tried rewriting the texture conversion code to avoid calling into PyQt for every pixel, and to do everything in pure Python code. It didn't help though - in fact, it was slower than the original code.

So then, I decided to look into Python extension modules. I implemented the exact same algorithm in C, and made Reggie use it. The editor takes about 3 seconds to start with Psyco (Python JIT) off and less than a second to start with Psyco on. Quite a nice improvement, right? Loading tilesets is still a little slow with it off, but I suspect it's due to the decompression. With Psyco on, they load almost instantly.

However, this will make it harder for source releases to work (as you'll also need the module compiled/installed), so I'm going to keep the old code - if the NSMB module is available, the optimised functions from it will be used; but if it's not available, the regular Python implementations will be used.

I'm also working on recoding a few of the other algorithms (like LZ decompression) in C, which should make it run even faster. That was your update for today
biggrin.gif
 

WiiFan2012

Well-Known Member
Member
Joined
Dec 1, 2009
Messages
177
Trophies
0
XP
117
Country
United States
Thanks for the update! Once released, you can pat yourself on the back. 95%? YAY, looks like it is going to be released just in time for Christmas, that is if no major colds (bugs) are found in the program. Once I get my hands on it, I'll remake Mario Bros 1-1 and Super Mario World 1-1, then make some new levels, maybe even a North Pole level
smile.gif
with tile maps of Santa all over.

Thats funny that, it seems, with most games, there is a little bit of data that don't get used. The unused data is
frown.gif
until it gets hacked and used via hacks. Then its Mr.
smile.gif



Great work!


20 seconds ain't extremely slow, believe me. Extremely slow is more like 1-5 minutes.
 

creffca

Well-Known Member
Member
Joined
Feb 1, 2007
Messages
196
Trophies
0
XP
96
Country
United States
Treeki said:
Sorry for the lack of updates, but we've been working hard and hope to have our first release out soon! I apologise for the length, but this is a pretty detailed/technical post.

One main improvement that I've been working on today is for speed. Right now, the editor works quite well in normal usage (even on underpowered systems) - but loading tilesets is extremely slow. Reggie takes about 20 seconds to start on my netbook (1.6ghz Intel Atom CPU, Linux Mint) and about 5 seconds on my desktop (2.4ghz Intel quad-core CPU, Windows 7).
...
I'm also working on recoding a few of the other algorithms (like LZ decompression) in C, which should make it run even faster. That was your update for today
biggrin.gif

LZ77 is notoriously slow to decompress. C should help a lot though.
 

Treeki

Well-Known Member
OP
Member
Joined
Aug 1, 2007
Messages
203
Trophies
0
Location
Rogueport
XP
255
Country
Gibraltar
I love hate Apple. Seriously.

Reggie works perfectly on Windows XP/Vista/7 and can be placed into a standalone .exe file (with no installed dependencies needed).

Reggie works perfectly on Ubuntu 9.10/Linux Mint 8, and also works on earlier versions if you install a newer PyQt. It should also work on other distributions if they have the correct PyQt versions.

Reggie doesn't work on Mac OS X Snow Leopard.
- Getting it to run requires you to compile PyQt and Qt yourself! Of course, no binaries are available.
- The NSMBLib extension module which works perfectly on Windows and Linux out of the box? It compiles fine, but use it in Reggie and HAY GUIS SEG FAULT

Well, that's my rant for now. I also wish I knew what's wrong with my alpha transparency code.
frown.gif
 

Arisotura

rise of melonism
Member
Joined
Dec 5, 2009
Messages
839
Trophies
1
Age
30
Location
center of the Sun
Website
kuribo64.net
XP
2,498
Country
France
Wow! You're doing a great job, Treeki.

However, if I were you, I'd use C++ or another compiled language. They're always faster than interpreted languages like Python and VB. Emulators are written in C++ for a reason...


Also, when I get some weird issues solved, I'll do a gallery of all those NSMB Wii hacking screenshots, to help remembering beta stuff and all.
 

Treeki

Well-Known Member
OP
Member
Joined
Aug 1, 2007
Messages
203
Trophies
0
Location
Rogueport
XP
255
Country
Gibraltar
Mega-Mario said:
Wow! You're doing a great job, Treeki.

However, if I were you, I'd use C++ or another compiled language. They're always faster than interpreted languages like Python and VB. Emulators are written in C++ for a reason...
The editor actually runs very well in Python - it's just some operations which are slow. This was the code I replaced:
CODEÂÂÂÂÂÂÂÂfor i in xrange(16384):
ÂÂÂÂÂÂÂÂÂÂÂÂfor y in xrange(ty,ty+4):
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂfor x in xrange(tx,tx+4):
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂd = iter.next()
 

WiiFan2012

Well-Known Member
Member
Joined
Dec 1, 2009
Messages
177
Trophies
0
XP
117
Country
United States
Treeki said:
I love hate Apple. Seriously.

Reggie works perfectly on Windows XP/Vista/7 and can be placed into a standalone .exe file (with no installed dependencies needed).

Reggie works perfectly on Ubuntu 9.10/Linux Mint 8, and also works on earlier versions if you install a newer PyQt. It should also work on other distributions if they have the correct PyQt versions.

Reggie doesn't work on Mac OS X Snow Leopard.
- Getting it to run requires you to compile PyQt and Qt yourself! Of course, no binaries are available.
- The NSMBLib extension module which works perfectly on Windows and Linux out of the box? It compiles fine, but use it in Reggie and HAY GUIS SEG FAULT

Well, that's my rant for now. I also wish I knew what's wrong with my alpha transparency code.
frown.gif

Actually, you CAN install Windows on a iMac/Macbook/Pro via Boot Camp; its just the matter of having the "full" version of Windows. (I.E, not the upgrade version)

Anyway, you can rant all ya want; just pointing out the facts.
 

Treeki

Well-Known Member
OP
Member
Joined
Aug 1, 2007
Messages
203
Trophies
0
Location
Rogueport
XP
255
Country
Gibraltar
WiiFan2012 said:
Actually, you CAN install Windows on a iMac/Macbook/Pro via Boot Camp; its just the matter of having the "full" version of Windows. (I.E, not the upgrade version)

Anyway, you can rant all ya want; just pointing out the facts.
I know you can install Windows on a Mac, but I wanted to be able to have a native version of Reggie for it. Not sure how feasible it is though - considering how backwards getting a proper Python/PyQt development setup on it is.

(I don't have a Mac, but Tempus uses one and is developing on it. He had to compile Qt and PyQt himself to get Reggie to run, and my module gave him several compilation and usage problems. I also like how a simple test script using the module worked fine, but Reggie just segfaults.)
 

Arisotura

rise of melonism
Member
Joined
Dec 5, 2009
Messages
839
Trophies
1
Age
30
Location
center of the Sun
Website
kuribo64.net
XP
2,498
Country
France
QImage.setPixel must use the Windows API SetPixel() (atleast under Windows), which is slow indeed. You should rather consider putting all the pixels in a buffer, then render it as a bitmap, for each object.

My crappy NSMB editor did draw everything directly in a huge bitmap, was coded like crap, it's kinda like a game directly drawing in the framebuffer...
It's surely better to make one bitmap per object.

But the bitmap method was slower for you - must be due to the programming language; in an editor coded in C++, the bitmap method would sure be loads faster than SetPixel().
I'd even recommend that you rewrite the whole editor in C++, if you feel like it... but it's your choice. Not forcing you.
 

WiiFan2012

Well-Known Member
Member
Joined
Dec 1, 2009
Messages
177
Trophies
0
XP
117
Country
United States
Treeki said:
WiiFan2012 said:
Actually, you CAN install Windows on a iMac/Macbook/Pro via Boot Camp; its just the matter of having the "full" version of Windows. (I.E, not the upgrade version)

Anyway, you can rant all ya want; just pointing out the facts.
I know you can install Windows on a Mac, but I wanted to be able to have a native version of Reggie for it. Not sure how feasible it is though - considering how backwards getting a proper Python/PyQt development setup on it is.

(I don't have a Mac, but Tempus uses one and is developing on it. He had to compile Qt and PyQt himself to get Reggie to run, and my module gave him several compilation and usage problems. I also like how a simple test script using the module worked fine, but Reggie just segfaults.)


Ok, didn't know if you already knew that. Just wanted to suggest it; and did not know that you wanted to run it natively
 

TobiasAmaranth

Well-Known Member
Member
Joined
Feb 6, 2009
Messages
456
Trophies
1
Age
38
Location
Texas
Website
werewolfdarkarts.com
XP
2,617
Country
United States
12 days left in the year~ Since sprites are all that's left, can we hear some of the stuff that's actively being worked on?


~It's the 12th day till the new year and Treeki gave to us~
~Twellllve ways-to-use-the-???????~ XD
 

WiiFan2012

Well-Known Member
Member
Joined
Dec 1, 2009
Messages
177
Trophies
0
XP
117
Country
United States
TobiasAmaranth said:
12 days left in the year~ Since sprites are all that's left, can we hear some of the stuff that's actively being worked on?

12 days left until we start a new revolution around the sun!

I'm excited about this editor!

(still waits for an update on the Mario Kart Wii course creator over at mariokartwii.com)

^^
Complement to Treekie for keeping us updated, even during the holiday season
smile.gif
 

Treeki

Well-Known Member
OP
Member
Joined
Aug 1, 2007
Messages
203
Trophies
0
Location
Rogueport
XP
255
Country
Gibraltar
Mega-Mario said:
QImage.setPixel must use the Windows API SetPixel() (atleast under Windows), which is slow indeed. You should rather consider putting all the pixels in a buffer, then render it as a bitmap, for each object.No, as far as I know, Qt implements its own software rendering engine.
Mega-Mario said:
I'd even recommend that you rewrite the whole editor in C++, if you feel like it... but it's your choice. Not forcing you.I've been thinking about it for a bit; although even if I did, I'd still use Qt. But I already have almost 5000 lines of Python code and I don't really want to have to rewrite all of it. The editor is fast enough in Python even on my netbook - it's just loading which is an issue, and I'm working on it.
QUOTE(TobiasAmaranth @ Dec 20 2009, 02:00 AM)
12 days left in the year~ Since sprites are all that's left, can we hear some of the stuff that's actively being worked on?
Soon
wink.gif
 

creffca

Well-Known Member
Member
Joined
Feb 1, 2007
Messages
196
Trophies
0
XP
96
Country
United States
After your C lib produces the rgbdata do you then iterate through that and setpixel () each pixel of the bitmap, or do you write directly to the bitmap's bits?
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-