Giter VIP home page Giter VIP logo

smaghetti's Introduction

Archived as of Feb 16, 2023

Smaghetti is no longer worked on by me (Matt Greer). I would love to, but I just don't have the time anymore. The remaining things that Smaghetti needs are really big and hard, and the tiny pockets of free time here and there I have just don't work for that, as much as I have tried.

If you want to pick up Smaghetti, feel free to fork this repo. I will be available with any questions about its codebase.

The Smaghetti website will remain up for one more year, and taken down on February 24, 2024.

logo

Smaghetti - SMA4 Level Editor

This is a web based level editor for the game Super Mario Advance 4: Super Mario Bros 3 for the Game Boy Advance.

screenshot

Invaded Beach, by Nauts

Try it

It's available here: https://smaghetti.com

Status

Smaghetti at this point is pretty far along. The roadmap marks it as being alpha quality, mostly because several big features are missing from the editor.

At the time of writing, 425 entities and 42 backgrounds exist in Smaghetti. That represents almost every item/enemy/terrain/etc in the game. There aren't many left that need to be added. Mostly what is missing -- entity wise -- are "meta" controls such as sprites that influence auto scrolling and things related to platforms that ride on tracks. You can create a rather nice level these days, and many people have.

Editor quick start

The editor is at https://smaghetti.com/editor

It is very user friendly and takes loose inspiration from Nintendo's Mario Maker.

Proper documentation and tutorial videos will come later, but for now just start playing with it, most people have been able to figure it out. If you get stuck, start a discussion here in the repo. I always welcome feedback to make things better.

License

Smaghetti is Affero GPL licensed. See the LICENSE file. Since Smaghetti is based on someone else's IP, keeping it fully open sourced as much as possible seems like the right thing to do.

Also see the licenses directory for third party licenses.

Contributing

A lot more work needs to be done, help is awesome! Here are ways to help

Reverse engineering

The discussions are now where most reverse engineering talk is taking place. There is also the wiki and issues.

HexTree tool

This tool is growing to be pretty powerful. It really lets you explore and manipulate a level. I need to document a bit how it works, but just playing with it should enable one to figure out most of its features.

screenshot

It is here: https://smaghetti.com/tools/hex-tree

There are some other minor tools listed here too: https://smaghetti.com/tools

Code contributions

PRs are welcome, but please open an issue and discuss with me first before starting any work. That way no one does any wasted effort. The code is pretty messy and in many parts of the codebase I'm more focused on figuring stuff out than creating clean code. So I am refactoring pretty often. I'd hate to merge a refactor that really harms someone else's PR.

If you want to contribute code changes, the development guide is a good read to get to know how things work.

Discord

Discord server is here: https://discord.gg/95W9knXe3x

Code of Conduct

Smaghetti's code of conduct can be read here. In short: be inclusive, be nice, don't ask for or share any copyrighted items including ROMs and e-reader levels.

smaghetti's People

Contributors

city41 avatar lelegofrog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

smaghetti's Issues

First editor action not captured by undo

repro:

  1. clear local storage
  2. load the editor and choose example level
  3. paint a tile
  4. press undo

expected: painted tile goes away
actual: entire level goes away

seems something is off about undo when first start a level.

add in clappin' chuck

either a separate entity type or give charging chuck a details pane?

charging: [0 x y 9b 0]
clapping: [0 x y 9b 1]

seems any value other than zero makes it clapping

Support grass next to water

Whenever grass is next to water, it doesn't look quite right

image

Nintendo solved this by having a second version of grass intended to be next to water.

If the user puts grass next to water, switch to the water-grass version automatically.

gbajs: hard to get it to run at 60fps

The switch to requestAnimationFrame in gba.js does get a pretty nice 60fps if

  • the machine is pretty powerful
  • the user is using chrome
  • their monitor refresh rate is set to 60hz

if any are untrue, then gba.js will very likely not run at 60fps. In the case of the refresh rate being greater than 60, it's possible for gba.js to run way too fast.

For now, just went back to setTimeout(callback, 16), but this is not very accurate.

Figure out a way to get

  • 60fps on powerful machines with refresh rate set to 60hz
  • 60fps on powerful machines with refresh rate above 60hz
  • best possible performance can muster on lower end machines

Conveyor belt: direction details pane

The conveyor belt details pane only allows changing its size. Allow changing its direction too.

Also, the way it does size is pretty hokey, switch it to be drag based.

double ended pipes: have not found a non-warpable object id

Vertical, warpable, double ended pipe is object id 0x2c on bank 1. But so far, have not found a non-warpable version. This means double ended pipes can't yet be put into smaghetti because if the user doesn't add a warp to both of its ends, then it is a soft lock of the player goes into the pipe.

The brute force dump shows pipes at other object ids, including 0 for a double ended pipe, but it looks like they need different object sets. Possibly one of them is a non transportable double ender.

Possibly one doesn't exist? Do all double ended pipes in SMB3 allow warping?

Multiple object ids for some entities

Some entities. most notably WoodDoor, have different ids in different object sets. Support this so they can be used in more situations.

todo:

  • have these entities have a map from id -> objectSets in their objectSets.ts file
  • have them flatten the objectSets into a single list inside the entity
  • have toObjectBinary pass in the chosen objectSet
  • choose the id based on the objectSet that was passed in

SeeSaw platform no longer works

This is because it needs the sixth to last byte of level settings to be 1, instead of 0.

Need to figure this out. Possibly there's really 12 or more graphic set bytes instead of the assumed six? some brute force dumps would probably help shed some light.

when a FireBar is on top of a FireBarBase, can't access details pane

This is a specific example of a more general problem.

When clicking on a part of the editor that has occupants in both actors and stage, often bad things happen. If you just want to move one, you can't. If you want to get the details pane, you can't.

a work around is to lock one of the layers, but this only works if the two entities are on different layers.

Suggestion: Load existing e-reader levels

I think it would be useful in documenting object parameters if existing levels could be loaded - entities that aren't documented yet could use fallback graphics/settings boxes (e.g. just using a raw hex view rather than the "friendly" settings box)

Add pipes

Pipes are a big missing feature. Add a pipe entity with a detail pane that can configure its size, orientation, color and whether it is a warp.

CoinChallenge: only one value per room

If a room has more than one CoinChallenge in it, then when the level loads the last CoinChallenge to load is the value that gets set.

ie

  1. add a CoinChallenge set to 10
  2. add another CoinChallenge, set it to 30
  3. run the level

both CoinChallenges will set the count to 30

enforce this limitation in the editor

Firebar needs detail pane

So far fire bar only comes in one configuration. Add a details pane for choosing size, direction and pivot point.

Pile driver goomba: determine entire graphics set

Since pile driver goomba just looks like a brick after a graphic set dump, have not yet figured out its entire graphic set.

Do a special run, or figure out a more flexible way to do dumps for situations like this.

auto tile Grass in the editor

This grass setup in the editor

image

leads to this in game

image

the editor should auto tile grass in the same way Nintendo did to help the user understand what their grass will ultimately look like.

Dump object sets all the way up to 0x1f for all entities

object sets can go all the way up to 0xff. After testing this with WoodFloor, it was found in far more object sets, sometimes with different (but usable) palettes.

To increase the chances of entities being compatible, should do full dumps for all entities up to 0xff. Sadly this means each dump will take about an hour, so wonder if can speed this up somehow.

need to give objects priorities

the first object in a level to claim a spot in the map wins. later objects will at best work around that spot.

this is essential for things like allowing terrain to be in front of the end of level backdrop. The end of level backdrop should probably have lowest priority.

assign priorities to objects and sort them by priority before creating the level data.

Changing the level name causes a new level to be added to the save file

When createLevelData was using the real level name, it would cause a new level to get added to the save file instead over overwriting the old when the level name was changed. For now, went back to a canned name.

todo:

  • have injectLevelIntoSave stop mutating the array in place and always create a fresh save array
  • OR: have injectLevelIntoSave have a mode/version that always overwrites the first level

NOTE: injectLevelIntoSave's ability to add a new level next to existing ones is good and should not be thrown away, it will be used in the future.

Use Projects tab suggestion

Hello Matt! How are you doing?

I found out about you after reading a post on your blog "Javascript is a pass by value language". So I ended up checking your profile here and I am impressed by your work with this project! Congratulations on the amazing work!

I am just messaging to make a suggestion in case you haven't used it already, the Projects tab. I've only recently found out so I'm starting to use and thought it was a nice way to create task issues, link PRs and manage everything here on github just like we do on Trello. In case you haven't opted for that forget about my message, just thought about helping :)

Keep up the good work! Cheers :)

Redo palette

Palette has gotten way too crowded and tedious to use. The new palette should

  • fill the entire width of the screen, and open up just below the toolbars.
  • have a text search that can be invoked by typing / then the search term
  • remove the notion of "add" and "remove", instead the quick palette should just have the 10 or so most recently and/or most commonly used entities.

FloatingBlock is likely a beach ball instead

If the byte that controls the rotating object gfx (like rotating blocks, seesaws, etc.) is set to 2, sprite e3 (FloatingBlock) will resemble a yellow-brown beach ball (which I'm pretty sure isn't used by anything else, it looks like ArrowLift without the arrow on it but it uses a different graphic) rather than the rotating blocks from Vexing Doors. Its collision also support this, and if you play a level with it in an emulator it makes ocean sound effects when it's moved around.

Support length for FluffyCloud

FluffyCloud takes a length parameter and extends the cloud accordingly.

The editor should support this. Will probably end up working like conveyor belt.

Pipe destination improvements

The current destination definition was built with doors in mind. It has the x/y coordinate of a tile that is the warp destination. This makes sense for doors, as you can warp anywhere with them.

But pipes must warp to other pipes. Explore defining a pipe specific destination which stores the dest pipe's id. Then if the dest pipe moves, the transport moves automatically with it.

This would also mean a new "PipeDestinationModal" for choosing the dest pipe, as the current TransportDestinationModal chooses tiles.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.