comp380team3 / PuzzlePathDimension

Class project for COMP 380 at California State University, Northridge
0 stars 0 forks source link

Brian creation #112

Closed bmarroquin closed 11 years ago

bmarroquin commented 11 years ago

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.

Jjp137 commented 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

bmarroquin commented 11 years ago

It saves in the directory where the LevelSaver class is.

bmarroquin commented 11 years ago

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?

Jjp137 commented 11 years ago

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.

Jjp137 commented 11 years ago

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).

bmarroquin commented 11 years ago

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?

Jjp137 commented 11 years ago

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

Jjp137 commented 11 years ago

Oh, how would I access Creation Mode in your branch? Or do I have to code it in somehow?

bmarroquin commented 11 years ago

from level status screen instead of launching a new gameditorscreen make it a creationscreen. any level you chose will be creation mode.

Jjp137 commented 11 years ago

Okay.

bmarroquin commented 11 years ago

Also i should probably mentioned this before. hit enter justs saves the level. then it pops up in the bin debug area.

Jjp137 commented 11 years ago

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

bmarroquin commented 11 years ago

Have you tried creating an evil level yet?

Jjp137 commented 11 years ago

lol I just put platforms in the most random places and saved it

Jjp137 commented 11 years ago

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.

bmarroquin commented 11 years ago

I just did "Content/Level/CustomLevel.xml" and it saved in the folder. Unless thats not the folder we want it in.

Jjp137 commented 11 years ago

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.

Jjp137 commented 11 years ago

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.

bmarroquin commented 11 years ago

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.

Jjp137 commented 11 years ago

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...?

bmarroquin commented 11 years ago

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.

Jjp137 commented 11 years ago

Oh lol; I totally did not test that...

bmarroquin commented 11 years ago

I tried the code you gave me for the name but it did not find Path, do i need to include something for that

Jjp137 commented 11 years ago

Include this statement:

using System.IO;
Twisol commented 11 years ago
using System.IO;

EDIT: Darnit, and with syntax highlighting too.

bmarroquin commented 11 years ago

lol 1 second?

How do i do 1 minute?

Jjp137 commented 11 years ago

It's in seconds, so just put 60

bmarroquin commented 11 years ago

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.

Jjp137 commented 11 years ago

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.

Jjp137 commented 11 years ago

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.

bmarroquin commented 11 years ago

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.

bmarroquin commented 11 years ago

Hey jorenz have you tried filling up the screen with object and checking if it runs smoothly?

Jjp137 commented 11 years ago

yea I played levels with all 30 objects used up and it seems to work fine

bmarroquin commented 11 years ago

i wonder how many objects it could take before lag occurs,

Jjp137 commented 11 years ago

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

bmarroquin commented 11 years ago

I limited it at 30 thinking lag would occur.

bmarroquin commented 11 years ago

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.

Jjp137 commented 11 years ago

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...

Jjp137 commented 11 years ago

It crashes when selecting "Back to Level Editor" while in simulation mode. Can you fix that?

Jjp137 commented 11 years ago

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.

bmarroquin commented 11 years ago

Oh yeah, that would be important lol. isnt it just adding it to the level list?

Jjp137 commented 11 years ago

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

bmarroquin commented 11 years ago

Yeah i just did that and learned that the hard way lol

bmarroquin commented 11 years ago

Can you handle adding it to the list? i need to get some 310 homework done.

Jjp137 commented 11 years ago

Okay, that's fine. You did enough already :)