Closed bmarroquin closed 11 years ago
I'm not sure where you guys want to add the option
It'll be in the main menu.
Saving works but i was unable to save the level in the Level folder.
Where does it currently save?
I'll test this and give you feedback as soon as possible. I'm doing the demo, after all! :p
It saves in the directory where the LevelSaver class is.
oh i was trying something with that fix. for some reason it was launching gameplay when there was a collision. I think it was fixed else where.does it happen on your branch?
Alrighty; it shouldn't be too hard to change the location of the level.
I finished reading the code, as you may have seen me do :p so time to actually test it...
...oh let me test that with master first.
oh i was trying something with that fix. for some reason it was launching gameplay when there was a collision. I think it was fixed else where.does it happen on your branch?
Doesn't happen with master, but you can leave it in (I hope).
I'm trying to make the launcher move, should i use the same bounding box as the collision detection or just base it on the base?
Just use the same bounding box for now.
If I get around to it, I might add some sort of highlighting that occurs when you hover over stuff, but I'm not promising that :p
Oh, how would I access Creation Mode in your branch? Or do I have to code it in somehow?
from level status screen instead of launching a new gameditorscreen make it a creationscreen. any level you chose will be creation mode.
Okay.
Also i should probably mentioned this before. hit enter justs saves the level. then it pops up in the bin debug area.
I added a Create Level menu option and a Play Custom Level option just for the heck of it, and I could play what I made :)
And yea I had to use Search to find where on earth the level file went lol :p
Have you tried creating an evil level yet?
lol I just put platforms in the most random places and saved it
Oh every level is in this location:
Configuration.UserDataPath + Path.DirectorySeparatorChar + "Level" + Path.DirectorySeparatorChar + FileName;
So, replace FileName with "Custom.xml" and it should hopefully save with every other level.
I just did "Content/Level/CustomLevel.xml" and it saved in the folder. Unless thats not the folder we want it in.
Hard-coded paths are not really a good idea; in fact, Configuration.UserDataPath is different depending on whether we're running the Debug build or Release build, so it's best to use that constant.
Also, right now, there doesn't seem to be a way to edit an existing custom level; unless I'm missing something, creation mode always starts with a blank level, so I guess you should check if CustomLevel.xml already exists, and if so, load that. Otherwise, create a level with only the launcher and goal.
Yeah that does happen. Maybe the default custom level should be the launcher and goal then we load it and write over that every time. crap, erasing objects is going to be a pain too.
I think the way you set up the LevelSaver is that it starts with a blank XML document every time you call the method, so I don't think you really have to worry about erasing objects from CustomLevel.xml.
Unless you mean something else...?
No i mean during creation. if you change your mind and want to delete something from the screen. it crashed the game for me. I think i figured it out though. not so bad.
Oh lol; I totally did not test that...
I tried the code you gave me for the name but it did not find Path, do i need to include something for that
Include this statement:
using System.IO;
using System.IO;
EDIT: Darnit, and with syntax highlighting too.
lol 1 second?
How do i do 1 minute?
It's in seconds, so just put 60
I failed at handling the going back to main menu but there is still a way to do so through the pause. also restart editor doesn't work correctly but im not entirely sure how to handle that either. In my test it loads the level i selected from the level select but i think that is based on how i set up the creation mode call.
Also, Custom.xml is not actually part of the Content project; can you add that in? If it's not there, the game crashes when entering creation mode.
Oh, and when you do, be sure to set the Build Action to "None" and the Copy to Output Directory option to "Copy if newer"; otherwise the project won't compile.
This is a bit minor, but if both a treasure and a platform overlap each other, you end up deleting both at the same time if you point at where they both overlap and delete either one of them.
The same thing happens with deathtraps.
This is a bit minor, but if both a treasure and a platform overlap each other, you end up deleting both at the same time if you point at where they both overlap and delete either one of them.
The same thing happens with deathtraps.
I know why this happens I'll fix it right now.
Hey jorenz have you tried filling up the screen with object and checking if it runs smoothly?
yea I played levels with all 30 objects used up and it seems to work fine
i wonder how many objects it could take before lag occurs,
In the gameplay editor, while playing a level with 30 objects, I was dragging a platform around like crazy and nothing really bad happened (and keep in mind that it's in a VM too lol :p)
I'm not going to put that many objects during the demo though lol
I limited it at 30 thinking lag would occur.
Alright, minus any bugs that you guys find, I'm not sure what else i can do with this. Unless I'm missing something big.
Do you want to add creation mode to the main menu? I could do it if you want, though; I actually modified the main menu already in a temporary branch...
Also, let me test the restart thing real quick...
It crashes when selecting "Back to Level Editor" while in simulation mode. Can you fix that?
Other than that, and the par time still being set to one second, I think we're good here.
...well, how is the player going to access the custom level? I could do that part if you want, though.
Oh yeah, that would be important lol. isnt it just adding it to the level list?
Well, if you just add it to the levellist.xml, the custom level will have to be unlocked before the player can play it, which is not what we want. We'll have to make a special case for it somewhere in the LevelSelectScreen.
The easy way is to just put it in the main menu :p
Yeah i just did that and learned that the hard way lol
Can you handle adding it to the list? i need to get some 310 homework done.
Okay, that's fine. You did enough already :)
I added creation mode. It works but there's no way to launch it directly. I'm not sure where you guys want to add the option Still have to make sure that some objects don't collide with each other and that the launcher is movable.
Saving works but i was unable to save the level in the Level folder.
Retouched toolbox screen to make it work better and modified it so that deathtrap and treasure only appear when you are building a custom level.