I am very curious as to how to do this, can anyone on this forum tell me how to make one? It is for a project of mine where I want to create a single room frame with randomly generated levels (at least 10).
For a basic level editor you need this stuff:
code the mouse wheel to scroll between different objects. use 'create' active object event on mouse click.
To do a grid, do this:
Set Active object Grid selector X position to (xmouse/16)*16
Set Active object Grid selector Y position to (ymouse/16)*16
place an ini object and code a file selector.
write a fast loop to save all objects (using a qualifier) into an ini.
write a fast loop to load all objects (using a qualifier) from an ini.
And there you go. Unfortunately, if you want random level generation it's experts only.
However, there was a recent post about random maze generation you may like to read.
Airflow gave the basic rundown on how to make a level editor for a 16x16 tile based game.
Basically you need these things for any type of editor:
-The editor itself (a way to "edit")
-A way to save/store the work done in the editor
-A way to load it up again
As Airflow said the ini object can be used, but pretty much any extension that can save data to the disk can be used. I've used the editbox in the past to save level date formatted as a string of characters. Another popular method is using an array object.
For loading and/or saving you will want to use a loop. In fusion a loop is basically an event that runs multiple times when called. That way you can save and load a level "instantly," or at least in a way that appears like it to the user. Since a loop executes completely before rendering the changes to the screen the user will simply see the level appear all at once rather than each piece loading in at a time.
If you need more detailed help than this there are a couple of tutorials/examples online you could look at. If you need help finding them feel free to ask again here.
Originally Posted by -UrbanMonk- Airflow gave the basic rundown on how to make a level editor for a 16x16 tile based game.
Basically you need these things for any type of editor:
-The editor itself (a way to "edit")
-A way to save/store the work done in the editor
-A way to load it up again
As Airflow said the ini object can be used, but pretty much any extension that can save data to the disk can be used. I've used the editbox in the past to save level date formatted as a string of characters. Another popular method is using an array object.
For loading and/or saving you will want to use a loop. In fusion a loop is basically an event that runs multiple times when called. That way you can save and load a level "instantly," or at least in a way that appears like it to the user. Since a loop executes completely before rendering the changes to the screen the user will simply see the level appear all at once rather than each piece loading in at a time.
If you need more detailed help than this there are a couple of tutorials/examples online you could look at. If you need help finding them feel free to ask again here.
Yes, I would love to see some examples, as that would be most useful in helping me figure out how to code all of this together.
Oh, some random level generation with a level editor is for experts? Then I guess I will have to scratch off the "randomized level generation thing" and just make pre-made layouts.
Oh, some random level generation with a level editor is for experts? Then I guess I will have to scratch off the "randomized level generation thing" and just make pre-made layouts.
basically yeah, but premade layouts are higher quality anyway. There's a computational dissonance between playable game content and generate content. Generated content cannot identify players capabilities, and in turn relies on the developer to configure it, leaving your high quality game with a void only filled with premade layouts anyway.
In my project wave I've provided tool assist level creation tools. This helps create levels without taking away level creator control. You can do this for a level editor by having things like 'click and drag to fill a rectangle with tiles'. A lot of level editors for indie games ignore simple but powerful functions like this. I speak of Mario X, Knytt stories, rpg maker, and various level editing tools. I like to think along the lines if a non-coder can use it then it's good, but you also want to reduce time expenditure. There's nothing stopping you from getting out notepad and typing your level data with the keyboard. Nothing wrong with it at all, that's how Super Mario Bros 3 on the nes was made, it's just time consuming.
TL;DR all good games focus on a level editor. I recommend making a level editor with a variety of simple but effective tools. You should think of random generation as a form of level editing.
I would start with a simple kind of level editor:
- small screen estate
(to get to know the idea, before working with scrolling)
- dedicated object library, level space to edit and menu bar
(to keep calculation of positions and objects simple)
- some way of saving
* text strings with characters
* ini file with fastloop
* ini file with a group that emulates a fastloop
(that way the fastloop extension isn't needed)
That should get you started.
For random level generation, there are all kinds of checks and balances
that need to be implemented in order to achieve a playable level.
I am pondering on one for DTV Boxes:
http://create-games.com/download.asp?id=8978
and also when I've created some spare time.
Hi! J.C im think i understand what your after.
This dude does Procedural cave generation https://www.youtube.com/watch?v=v7yyZZjF1z4
You generate your map, but it has advancer codes to understand.
Ive made a map editor based on array, very fun.
Also made so it loads whats in the frame and erase all objects outside of frame so i doesnt have thousands of actives at once on a stage.
retro style on it. 255colors. Made this 3 days ago.
Originally Posted by LordHannu Hi! J.C im think i understand what your after.
This dude does Procedural cave generation https://www.youtube.com/watch?v=v7yyZZjF1z4
You generate your map, but it has advancer codes to understand.
Ive made a map editor based on array, very fun.
Also made so it loads whats in the frame and erase all objects outside of frame so i doesnt have thousands of actives at once on a stage.
retro style on it. 255colors. Made this 3 days ago.
This is how mine looks like at the moment.
Yes! That is just what I am aiming for!
Only problem is, I have no idea how to do that in MMF2. If you could provide a sample mfa file I can look at, it would be most helpful.