GithubHelp home page GithubHelp logo

coolcord / level-headed Goto Github PK

View Code? Open in Web Editor NEW
112.0 11.0 6.0 3.39 MB

Random Level Generator for Super Mario Bros. 1 on the NES

License: GNU General Public License v3.0

C++ 95.38% Shell 1.61% Batchfile 0.30% NSIS 1.16% C 0.85% CMake 0.71%
rom game c-plus-plus levels level-generator mario mario-bros supermariobros smb1 nes

level-headed's Introduction

Level-Headed

Random Level Generator and Level Script Compiler for Super Mario Bros. 1 on the NES

GitHub release Github all releases GPLv3 license

About Level-Headed

Level-Headed is an application that is still under development. Ultimately, I am designing it to be a random level generator that will work across multiple platforming games. In its current state, Level-Headed can essentially create new Mario games based off of Super Mario Bros. 1 (SMB1) with a click of a button! Users can also create their own levels using the "SMB1_Compliance" scripting language. As of now, only SMB1 is supported, but in the future, support for more games will be added.

In order for Level-Headed to work properly, a base ROM must be supplied to Level-Headed. You can read more about which ROMs are supported here.

Check out the Level-Headed Wiki for more information and tutorials on how to use Level-Headed.

If you're a Windows user, you can download the Windows build under the releases tab. Linux and Mac users should compile the application and plugins via the Unix Build Script. Alternatively, Level-Headed can be compiled via Qt Creator.

If you have any questions about Level-Headed, feel free to contact me at [email protected]

FAQ

Q: What's going to be in the next update?

A: You can see what changes are going to be implemented by looking at the changelog.

Q: When are you going to add new patterns into the level generator? What about new level types?

A: Currently, levels still only have access to about 10 patterns per level type, which is why the levels can sometimes be a bit stale. The v0.4.x series of updates will address this by focusing on creating new patterns for existing levels as well as adding completely new level types all together.

Q: How do I add my own graphics and music patches?

A: There's a tutorial on how to do that on the wiki here.

Q: There's no variety!

A: Bear in mind that Level-Headed is only v0.3, so it's only a fraction of what I have planned. Think of current releases as a preview of what's to come. With each update, this will become less and less of a problem.

Q: When will you support X game?

A: Level-Headed is being designed from the ground up with multi-game support in mind, but don't expect to see support for another game until after v1.0. That's a very, very long ways off.

Q: Is Level-Headed dead? You haven't updated it in months!

A: No, it is far from dead. I tend to work on Level-Headed off and on when I have spare time and when I have the interest. Consequently, development tends to be very slow and sporadic. However, I can't see myself ever dropping this project completely.

level-headed's People

Contributors

coolcord 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

level-headed's Issues

C++17 issue

std::random_shuffle was changed to std::shuffle in C++17. The generated Makefile doesn't specify a standard, so it fails to compile on recent macOS:

In file included from Pipe_Exit_Generator.cpp:1:
In file included from ./Pipe_Exit_Generator.h:4:
In file included from ./Level_Generator.h:14:
./Midpoint_Handler.h:8:1: warning: class 'SMB1_Compliance_Generator_Arguments' was previously declared as a struct; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
class SMB1_Compliance_Generator_Arguments;
^
./SMB1_Compliance_Generator_Arguments.h:11:8: note: previous use is here
struct SMB1_Compliance_Generator_Arguments {
       ^
./Midpoint_Handler.h:8:1: note: did you mean struct here?
class SMB1_Compliance_Generator_Arguments;
^~~~~
struct
1 warning generated.
Continuous_Enemies_Spawner.cpp:93:14: error: no member named 'random_shuffle' in namespace 'std'
        std::random_shuffle(order.begin(), order.end());
        ~~~~~^
1 error generated.
make: *** [Continuous_Enemies_Spawner.o] Error 1
make: *** Waiting for unfinished jobs....

Unvalid SMB1 rom.

So I downloaded the PC10 version of the Super Mario Bros rom for full support to use in the level-header, but it's somehow unvalid. It even says .nes at the end. Why is that and can that be fixed?

[Feature Request] Command Line Support

Level-Headed should be able to act as a command line application if arguments are passed to it. This should allow for level scripts to be compiled over command line or for new games to be generated quickly. Settings will be loaded from the config file, but a few basic options should be configurable over command line.

Game freezes when shooting an enemy with Luigi's Fire Flower

Using the latest version of Level-Headed (0.3.9), I generated three different games with all of them having the Powerup set to Luigi's Fire Flower (config settings for the last one are below if needed). In all three shooting an enemy with a green fireball freezes the game once it makes contact. I'm using Nestopia UE and generating with a clean SMB1 rom.

SMB1_Compliance_To_SMB1.txt

[Feature Request] A bunch of new difficulty settings.

The custom difficulty settings are great, but are, in my opinion, incomplete. The following settings would complete the custom difficulty settings:
Goombas Can Spawn (1-11)
Green Koopas Can Spawn (1-11)
Red Koopas Can Spawn (1-11)
Paratroopas Can Spawn (1-11)
Off-screen Bullet Bill Spawn Chance Per Level (%)
Flying Cheep Cheep Spawn Chance Per Level (%), to fine-tune difficulty progression
Earliest Bowser Flame Start Point (Level Start, Early, Halfway, Late, Final Stretch, Random)
Latest Bowser Flame Start Point (Level Start, Early, Halfway, Late, Final Stretch, Random), Bowser flames need more customizability.
Bowser Starts Throwing Hammers (1-11)
Bowser Hammer Throw Rate (Same options as Hammer Bros. Throw Rate), Some of us would really appreciate it if he wasn't so obsessed with hammers; others might think he needs to throw more, and again, difficulty progression.
Minimum 1-Ups (0-5)
Minimum 10 Coin Blocks (0-5)
Minimum Brick Block Powerups (0-5)
Minimum Question Block Powerups (0-5)
Minimum Starmen (0-5)
Question Block Powerup Spawn Chance (%), So you can make it as easy or as hard as you want to get powerups, or just have a fair shot at getting to the highest powerup in each level. If water levels really can't have blocks, they can be exempt.
Min Level Length (Same options as Max Level Length), so those who prefer longer levels can have more consistent level lengths in their random games.
More time limit options (300, 400, 500, Proportional to Level Length, Random)

Yes, I know this is a lot. If any of these wouldn't be possible to do, tell me.

Hammer Bro Placement.

Hammer bros often spawn inside walls in the castle levels when the walls go really low, and in other levels they seem to spawn in mid air and just fall to the bottom. I think this is due to they are just replacing other enemies, and i'm not sure how you would fix it, but I just thought I'd let you know. Otherwise I haven't found any issues.

[Feature Request] Option to generate solid ceiling for underground levels

Not sure if this is doable, but worth a shot. With underground levels the ceiling uses the standard breakable bricks, which if you are at least Super Mario allows you to break through and run on the ceiling if you are able to reach that high. These allows you to essentially 'cheese' the whole level bypassing all generated obstacles/enemies.

If possible, an option to use something solid (like the ground tiles or the wall tiles that you see in the same levels) for the ceiling instead would be useful to prevent Mario from being able to reach the ceiling easily. I understand they may still be gaps generated that could potentially allow you to reach the ceiling (similar to the castle levels), but the idea is to make it a rarer possibility that what it currently is.

Pipe Exits in Underground and Underwater Levels

When in an underground / underwater level there is no pipe to go back to the overworld then get the flag. Instead the flags are just underground / underwater which never happens in the real game. It should be pretty easy to implement this as the overworld flag sections are all the same.

[Feature Request] Option to save/import configuration file from within the application

Currently the best way to share configuration settings with other players (outside of taking screenshots) is to share the SMB1_Compliance_To_SMB1.cfg file in the Config folder. In our testing replacing this file with one from another player's installation copied over all settings previously used by that player, which works fine but comes with inconveniences:

-All shared cfg files have to have this exact name and be manually placed in the directory
-The Output ROM location is copied over as well
-Possibly other issues/potential issues we are not aware of due to the non-standard procedure

To simplify things, a way to save and import configuration files from within Level-Headed itself would be a nice feature to have. With all of the configuration options it has (and more to come I am sure) it would make it easier to swap between different customized presets and share them with other players.

How can I make level scripts?

I saw the files of the level scripts for creating a second quest and I wonder if you can tell me how I can make one of those. It'd be cool if you can add this to the wiki.

Windows 7 and Windows 8.1 Support

I downloaded the latest ver (0.3.10) and when executing it appears a message saying "The procedure entry point GetCurrentPackageFullName could not be located in the dynamic link library DLL KERNEL32.dll". I don't know what that means and 0.3.9 works perfectly. It could be related to the fact that I use Win7? Someone using latter Win has this issue? Thanks.

[Feature Request] Setting to replace all Goombas (not just lone ones) with Buzzy Beetles

Self-explanatory. Sorry for making so many requests, but I really really love Buzzy Beetles. (They're so cute. If I could litter a level with them, I would.)

To my knowledge, the randomizer has an option to replace lone Goombas with them, but not Goomba groups. I know SMB1 automatically applies this after you beat the game (not sure if that applies to randomized games), but I'd like an option to start with that.

Edit: An option to do the same, but instead replaces Goombas with Spinies would be good too for extra challenge

[Platform Request] Web Version

This randomizer is great, but mobile users don't get to experience this. So you should consider making a Web Version so mobile users can enjoy this. SMB3, SMW, and SM64 each have a Web Version so SMB1 should too.
And I do understand that it is planned that Level-headed will gain support for more than just SMB1. I just think a Web Version should be available.

No checkpoints in games generated via Custom (Advanced) Difficulty

As the title says, games generated with a custom difficulty seem to lack checkpoints. I'll have to try the preset difficulties later to see if those are affected as well. Again, this applies to both 0.3-RC2 and 0.3-RC3.

Traditionally, checkpoints in SMB1 are suppose to be present in all levels except castles and World 8 (or whatever the final world becomes in the randomizer)

Enclosed is the level file so you can try and figure out what happened.
Random 18-07-27-21-44-49-278.lvls.txt

norton!

norton blocked the level-headed file can you fix?

runtime error

i found an error if you do numbers of world to 6 please fix it

[Feature Request] Easier way to generate a premade game for races

Currently in order to race a generated game with friends one person would either have to generate and distribute the ROM file to the other players (a legal issue in itself), or all players would need to verify that all settings match up in Level-Headed prior to generation, a daunting task in itself with all the available settings.

What I would propose is an interface allowing you to simply provide the seed number and a flag/config string or CFG file that would allow you to easily generate the same game as another player for racing purposes. This could also allow players to select their own graphics and music (provided there are no differences as far as lag goes, not sure), but the important thing is that all other settings should be the same (levels, enemies, power-ups, lives, etc.)

[Graphics Request] My own take on a modern Mario sprite?

I love this randomizer so far, and although I know that adding new graphics packs / player sprites isn't your focus, I would still like to submit some sprites from my own hack for your consideration.

The graphics pack as a whole is incomplete, but I think it looks cool. I think the Mario sprite especially would be a nice addition to the randomizer. It's a different sort of "modern Mario" sprite than any of the others that are available.

I've also made a few small changes to the ASM, including something that might be useful for the randomizer: a 2-digit lives display. It works for as many as 137 lives (more than the base game lets you have), could be a useful patch for those who want it, and fits in the same space as the original code (at offset 0x084f in the ROM, replace the next 15 bytes with E8A838E90A10F9CA8AF0038D08038C).

However, one thing to keep in mind about that lives-counter code is that it reports the number as-is, so the lives counter appears off by one. (My hack adds 1 to your starting lives counter to compensate, and it changes code such that having 0 in the lives counter gives you game-over, instead of a negative number in the lives counter.)

The IPS patch for my whole hack is here, if you wanna take a look.

gif

Impossible level generated.

When experimenting with with version 0.3-RC2 of the Randomizer, I encountered a level with a jump that is impossible to complete if you are not at least Super / Big Mario, in World 1-3. Standard SMB1 course design requires that all levels should be able to be completed as Regular / Small Mario. The brick block ceiling over this jump makes that impossible.

fail

Enclosed is the generated level script. (I added .txt to the extension so GitHub would let me upload it here)
Random 18-07-26-14-49-25-272.lvls.txt

bullet bill launchers can be pointed at checkpoints

I played a seed today which had a checkpoint with a bullet bill launcher on the same screen pointed at it. This results in an almost immediate death if you don't jump.

I don't know if this is considered a "bug", but I wanted to report it just in case.

Games freezes when moving backwards at a certain point in World 2-3

When testing games generated with both 0.3-RC2 and 0.3-RC3, I've experienced game crashes in World 2-3 triggered by moving backwards beyond a certain point that I have yet to determine. I'm not sure what the cause is, nor am I sure if it's a Level-Headed bug or an emulation. The emulator used was the latest FCEUMM core in RetroArch 1.7.3.

img_20180727_185014215
img_20180727_222729024

When the freeze occurs, the HUD shifts far to the left.

Enclosed is the level file generated.

Random 18-07-27-21-44-49-278.lvls.txt

Is this project dead?

Is this project dead? It's been ages since the last update and the creator of this project is inactive. If it is discontinued it really is a shame.

[Feature Request] Previews of sprites and music.

because how will someone who hasn't seen every custom sprite or heard every user created song beforehand know what they're choosing when generating their game?

Also, Coolcord, I would greatly appreciate it if you would reply to my posts so I at least know you read them.

[Misc] Please add build documentation

Personally, I hate Windows. I'm primarily a Linux (Debian 9 Stable) user. So far, I've been using Level Headed in Windows, but I'd rather do so in Linux. The Readme tells me to compile it with QT Creator. I did and it generated more source and a makefile. I run make and get the following error:

make: Nothing to be done for 'first'.

I also get the same results if I perform:

qmake Level-Headed.pro && make

Clearly, I'm doing something wrong, but I have no idea what. Can you please make documentation on how to successfully build a Linux binary for Level-Headed?

3 Hack/Enhancements Requests

This one makes it so that Fire Mario power-downs to Big Mario when get hurt: https://www.romhacking.net/hacks/3570/
This other is more than a graphics hack(because it also adds new graphics), so it can't be included in the graphics pack list (believe me, I've tried): https://www.romhacking.net/hacks/5406/
The final one adds a new palette to Luigi by making him use Mario's palette while convert the orange into green(to make Luigi look like the SMB1 Deluxe (GBC) Luigi): https://www.romhacking.net/hacks/5228/

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.