-
|
|
|
I have seen that many people have been going through and editing the Platformer Starter Kit, and they post what features they have made in progress on here.
Then... i came across light, i was talking to my friend on the phone and he said "f**k, i spilled my Pepsi!"... Some how that inspired me to post my current progress of Platformer Expanded to allow other people to use the source code. feel free to use the source code, as long as you leave credit to me.
DOWNLOAD:
(Links below redirect to the latest version on MediaFire)
PC executable of game (rar): http://sn.im/pe_pc
Zune CCGame Package: http://sn.im/pecc
Open Source Rar: http://sn.im/peosc
Zip: BLEH, zips suck, use rars. :]
Screenshot Preview:
Features:
Game State Management (Menu)
Global Score
Scrolling levels (vertical and horizontal)
Custom level information from within the text file (Title, Time Limit, Description)
Level Select
Falling Apples
Options
Built in BSOD (incase any error happens you can see what it is)
In Game Level Editor (Beta, saving part under progress)
Ladders
option for 320x240 or 640x480 (in the ScreenManager.cs, "Game Configuration Fields" region near top, set the "useHighResolution" to true or false)
A Racing opponent (Turns directions by bumping into walls, Jumps on assigned "J" tiles)
Vanishing Tiles
Hidden Tiles (Both Solid and platform)
Death Tiles
Skin selections
Powerups
Level Information Tags
if you would like to set a custom time limit and/or describe and name your level, add these tags to the bottom of the text file
set timer to 5 minutes
@tim.5
set title to "my created level"
@tit.my created level
set description to "get to the exit"
@des.get to the exit
Tutorials, Resources, ect. used in the making:
Microsoft - Adding a Scrolling Level
Microsoft - Adding a Power Up
Wotudo.net - Adding Game State Management
XNA's member Brandon Bloom - Adding Vertical Scrolling
XNA's member HadesSpaniel - Adding Ladders
Eirik Hoem’s Blog - Falling Apples
|
|
-
|
|
|
Hey,
Thats really good mate!!
Just wondering where did u find the tutorials??????
as i am having some problems with vertical scrolling. I was wondering if u would send me a copy of ur level.cs just so i can see your scrolling code to see if i have made any errors.
Thanks
Adam
|
|
-
|
|
|
yeah sure bro, go ahead and use the source code. if you want you can use the entire thing and work off of it, rather than just comparing a part to get a feature that this already has. ill go ahead and post the tutorials in the op tho, thanks for mentioning that.
btw i dont really need to send you the source for level.cs since i posted the entire source in the first post =P
|
|
-
|
|
|
Thanks i have had a look through ur project and its amazing man!!!!! :D
And it help me sort 1 problem out but am running in to a slight problem of mine own lol I am trying to implment the game state management but i cannot get it to run no matter wat i do................. i keep getting errors all other the place and it just doesnt workl.
Am wondering if you found it easy or is it a little tricky????? only cause in ur project u seem to have alot more code then wat the walkthrough talks about.
Thanks
|
|
-
|
|
|
Dream12:Thanks i have had a look through ur project and its amazing man!!!!! :D
And it help me sort 1 problem out but am running in to a slight problem of mine own lol I am trying to implment the game state management but i cannot get it to run no matter wat i do................. i keep getting errors all other the place and it just doesnt workl.
Am wondering if you found it easy or is it a little tricky????? only cause in ur project u seem to have alot more code then wat the walkthrough talks about.
Thanks
Hey dude actually if you want, like i told the other dude, instead of starting off with a kit and have troubles implementing features, go ahead and use this and work off this.
it was kind of tricky in a way on spots here and there, and i may have had at one point my friend help me out (hes a wiz at c#).
|
|
-
|
|
|
Dude, I spent like 3 hours getting the GSM to work with my current project but this makes it effortless. Props to you for sure.
Logo Splash and other things like Level Select, and a BSOD make it easy to integrate and expand with my project.
Now that I look at the code it almost seems too easy now. but then it looked a little challenging. Again, thanks for the expansion. Its well worth the effort.
|
|
-
|
|
|
GlaphanKing:Dude, I spent like 3 hours getting the GSM to work with my current project but this makes it effortless. Props to you for sure.
Logo Splash and other things like Level Select, and a BSOD make it easy to integrate and expand with my project.
Now that I look at the code it almost seems too easy now. but then it looked a little challenging. Again, thanks for the expansion. Its well worth the effort.
lol aww i feel loved.
im now attempting to get a few more things in there, like ability to use multiple skins, and a ladder, im also working on the in game level editor now..
the ladders a tad bit challenging, i actually once almost got it but i accidentally screwed it back up so now im back to the start (luckaly it was within a single class void, which meant i could easily just copy the default void and replace it with xD).
also the in game level editor was really challenging, ive got most of it so far, now im trying to figure a way to organize the strings so it can be saved into a text file.
i also had to drop the hi res content, since im mainly building it for zune i dont really need the high res stuff, but there isnt no stopping you from inserting it back in =]. as for the parts with the #if zune sections, i merely have a simple boolean that tells weather or not to include the changes or not so if you want the high res content, all you gotta do is port the folder back in =].
im hoping i can get it done by saturday, and i will release the updated version on here =]
|
|
-
|
|
|
Yes, ladders are a pain.
I think you can do the strings for the level editor in one of two ways.
Use a List or string array. A List would be a great container because you can use a foreach loop and write in the strings line by line.
a string array can work also but it might be a little too difficult.
It looks like the List would be a better choice. its quicker and more efficient. Plus you can use the StreamWriter to do your bidding. But you probably already knew that.
Listen if you can figure out the ladders problem do give me a hand if you don't mind. Its driving me crazy.
Good luck on the new additions.
|
|
-
|
|
|
I got the in game level editor done for the most part, i got the part i was having trouble fixed, where it makes an ordered list in the correct order. only thing i got to do now is make it have the ability to save the strings to a text file, which will relatively be simple.
I think i got somewhat of this ladder going somewhere, i will probably record a video of what is happening and then put up the parts of the code i have for it so far, maybe with it somewhat started out, somebody can help fix it..
|
|
-
-
- (67)
-
premium membership
-
Posts
61
|
|
How did you get on with the level editor and ladders?
|
|
-
|
|
|
MattSimpson:How did you get on with the level editor and ladders?
Galaphianking (i think thats who it is), figured a way how to make ladders, so the ladders are checked off
as for the in game level editor, im still working on the part of how the level gets saved, (im wanting to make the levels seperate from the real levels, and have a seperate choice to save as real level)
I'm going to be posting the progress soon. ill probably post a preview of the progress in a few hours maybe, even. but the level editors save function wont be fully complete. =P
EDIT: meh, today i got some stuff todo, so ill have to postpone putting it up. i really wanna at least fix the skins feature before i release it.
|
|
-
|
|
|
If you don't mind me asking, how do I just implement the LIT's? I'm mostly concerned with time at the moment, but the other ones are useful too.
|
|
-
|
|
|
Veovis Muaddib:If you don't mind me asking, how do I just implement the LIT's? I'm mostly concerned with time at the moment, but the other ones are useful too.
What do you mean by LIT?
Also if anyone else is wondering im working on the thing right now and hopefully i can get the Level editor save method working, but weather or not i do, im still going to be releasing a update of the work so far :)
|
|
-
-
- (67)
-
premium membership
-
Posts
61
|
|
Cool, let us know how you get on!
|
|
-
|
|
|
K, the only one thats not quite updated is the PC Executable, but the Zune CCGame and the Open Source RAR are both updated!
I have added Ladders, Vanishing Tiles, Hidden Tiles, Death Tiles, a Boss racer, Skin Selector, And an beta Level Editor (im still trying to figure out how to save it within the container, its coming up with "xna0" as the container, and im trying to fix it.).
Also im thinking about hopefully redoing the level editors coding because i have the handle input very sloppy.
I'm going to be aiming towards using this guys tutorial (on the redone version):
http://fatso784.wordpress.com/2009/06/09/platforming-tutorial-4-basic-map-editor/
And for the skin selector, you have to enter the game (or exit the game and return to menu if your doing it from the pause menu), because when i tried making it unload and reload the games content section, it tries to update the background demo with the textures when they have not loaded yet.
Anyways yeah...
Check OP, Yo!
|
|
-
|
|
|
LordKtulu: Veovis Muaddib:If you don't mind me asking, how do I just implement the LIT's? I'm mostly concerned with time at the moment, but the other ones are useful too.
What do you mean by LIT?
Also if anyone else is wondering im working on the thing right now and hopefully i can get the Level editor save method working, but weather or not i do, im still going to be releasing a update of the work so far :)
I meant the level information tags.
|
|
-
|
|
|
Veovis Muaddib:I meant the level information tags.
You need the game state management for the message box part, but heres the parts used to retrieve,
first off, in the Level.cs, post these in the fields section
| |
| public int Score |
| { |
| get { return score; } |
| set { score = value; } |
| } |
| int score; |
| |
| public bool ReachedExit |
| { |
| get { return reachedExit; } |
| set { reachedExit = value; } |
| } |
| bool reachedExit; |
| |
| |
| int levelnumber = 0; |
| int timerline = 0; |
| int titleline = 0; |
| int descriptionline = 0; |
| bool metaisset = false, metatimerisset = false, metatitleisset = false, metadescriptionisset = false; |
| public bool MetaIsSet |
| { |
| get { return metaisset; } |
| } |
| public bool MetaDescriptionIsSet |
| { |
| get { return metadescriptionisset; } |
| } |
| public bool MetaTitleIsSet |
| { |
| get { return metatitleisset; } |
| } |
| public bool MetaTimerIsSet |
| { |
| get { return metatimerisset; } |
| } |
| |
| public TimeSpan LevelTimer |
| { |
| get { return levelTimer; } |
| set { levelTimer = value; } |
| } |
| TimeSpan levelTimer; |
| |
| public string LevelTitle |
| { |
| get { return levelTitle; } |
| set { levelTitle = value; } |
| } |
| string levelTitle; |
| |
| public string LevelDescription |
| { |
| get { return levelDescription; } |
| set { levelDescription = value; } |
| } |
| string levelDescription; |
| |
Then, find where the void for "LoadTiles" is drawn, NOTE DO NOT MIX "LOADTILE" WITH "LOADTILES"
comment out the current void you have for LoadTiles (by adding /* before the void and */ after the void), (just incase this doesnt work you can easily add whats missing), and paste this after the commented out part
| |
| /// <summary> |
| /// Iterates over every tile in the structure file and loads its |
| /// appearance and behavior. This method also validates that the |
| /// file is well-formed with a player start point, exit, etc. |
| /// </summary> |
| /// <param name="path"> |
| /// The absolute path to the level file to be loaded. |
| /// </param> |
| private void LoadTiles(string path) |
| { |
| // Load the level and ensure all of the lines are the same length. |
| int width; |
| int numboflines = 0; |
| List<string> lines = new List<string>(); |
| using (StreamReader reader = new StreamReader(path)) |
| { |
| string line = reader.ReadLine(); |
| width = line.Length; |
| while (line != null) |
| { |
| lines.Add(line); |
| if (line.Length != width) |
| { |
| if (line.StartsWith("@")) |
| { |
| if (line.StartsWith("@tim.")) |
| { |
| string mytimerstring = line.Remove(0, 5).ToString(); |
| int thistimer = Int32.Parse(mytimerstring); |
| timeRemaining = TimeSpan.FromMinutes(thistimer); |
| LevelTimer = TimeSpan.FromMinutes(thistimer); |
| timerline = numboflines; |
| if (!metaisset) |
| metaisset = true; |
| if (!metatimerisset) |
| metatimerisset = true; |
| } |
| else |
| if (line.StartsWith("@tit.")) |
| { |
| string mytitlestring = line.Remove(0, 5).ToString(); |
| LevelTitle = mytitlestring; |
| titleline = numboflines; |
| if (!metaisset) |
| metaisset = true; |
| if (!metatitleisset) |
| metatitleisset = true; |
| } |
| else |
| if (line.StartsWith("@des.")) |
| { |
| string mydescriptionstring = line.Remove(0, 5).ToString(); |
| LevelDescription = mydescriptionstring; |
| descriptionline = numboflines; |
| if (!metaisset) |
| metaisset = true; |
| if (!metadescriptionisset) |
| metadescriptionisset = true; |
| } |
| |
| } |
| |
| else |
| throw new Exception(String.Format("The length of line {0} is different from all preceeding lines.", lines.Count)); |
| |
| } |
| |
| line = reader.ReadLine(); |
| numboflines++; |
| } |
| } |
| |
| // Allocate the tile grid. |
| int metanumberset = 0; |
| if (metadescriptionisset) |
| metanumberset += 1; |
| if (metatimerisset) |
| metanumberset += 1; |
| if (metatitleisset) |
| metanumberset += 1; |
| tiles = new Tile[width, lines.Count - metanumberset]; |
| |
| // Loop over every tile position, |
| for (int y = 0; y < Height; ++y) |
| { |
| if (y != timerline && y != titleline) |
| { |
| for (int x = 0; x < Width; ++x) |
| { |
| |
| // to load each tile. |
| char tileType = lines[y][x]; |
| tiles[x, y] = LoadTile(tileType, x, y); |
| } |
| } |
| } |
| |
| |
| if (metatimerisset && levelTimer < TimeSpan.FromSeconds(10)) |
| { |
| TimeRemaining = TimeSpan.FromMinutes(2.0); |
| levelTimer = TimeSpan.FromMinutes(2.0); |
| } |
| |
| if (!metatimerisset) |
| { |
| TimeRemaining = TimeSpan.FromMinutes(2.0); |
| levelTimer = TimeSpan.FromMinutes(2.0); |
| } |
| |
| if (levelTitle == null) |
| { |
| levelTitle = levelnumber.ToString(); |
| } |
| |
| if (levelDescription == null) |
| { |
| levelDescription = "Explore the level looking for the exit."; |
| } |
| |
| |
| // Verify that the level has a beginning and an end. |
| if (Player == null) |
| throw new NotSupportedException("A level must have a starting point."); |
| /*if (exit == InvalidPosition) |
| throw new NotSupportedException("A level must have an exit."); |
*/
|
| |
| } |
Now you can test it by going to PlatformerGame.cs (or GameplayScreen.cs for the GameStateManagement users)
Find this:
DrawShadowedString(hudFont, "Score: " + level.Score.ToString(), hudLocation + new Vector2(0.0f, timeHeight * 1.2f), Color.Yellow);
Add right afterwards, add this:
DrawShadowedString(hudFont, "Title: " +level.LevelTitle + "\nDescription: " + level.LevelDescription + "\nTimer: " + level.LevelTimer.ToString(), hudLocation + new Vector2(0.0f, timeHeight * 2.4f), Color.Yellow);
Hope this helps see how it works better!
|
|
-
|
|
|
Thanks! I'll try it out after I get home from school.
Or maybe before my Net + / A + class, I have some freetime there.
|
|
-
|
|
|
Veovis Muaddib:Thanks! I'll try it out after I get home from school.
Or maybe before my Net + / A + class, I have some freetime there.
So, did it work OK?
also, anyone know any good features I can add now?
|
|
-
|
|
|
Great job LordKtulu! I'd been working on some of these features, and had some of them working.. but you've done a great job!
I seem to have one issue going on with the project though.. It seems that the ZUNE version is running when I debug it on my PC. I discovered this by digging through the code looking for where the screen resolution was specified (BackBufferHeight etc in PlatformerGame.cs). After some messing around I found that only by changing the Zune resolution specs was I getting results. I've also used breakpoints to verify that the zune code is being executed. I'd like to change it so that the windows version is the one being used, but I can't find where to do this. I used Find in Files / Find Symbols trying to find where Zune was defined, but to no avail. Of course, I could just modify the zune settings; but I'd prefer to not use that work around. I'm more of a C/C++ guy than C#, and it seems that preprocessor definitions are handled a bit differently in C#. Any recommendations?
Also, as far as features.. one I've added in my modded platformer is player / enemy health, enemy's causing variable amounts of damage, and projectile weapons to kill the baddies. I wrote a small tutorial for adding the health and damage tutorial. You can find it here: http://blackwatertribe.com/tutorials/XNA/Platformer/index.asp
Its the first time I've tried making a tutorial though, so it might not be the best quality.
|
|
-
|
|
|
I really would like to use this, and also give credit to you as well, but I can't. For some reason an error message says: Unable to find manifest signing certificate in the certificate store. Windows Copy of Platformer Expanded
Do you know how to solve this?
|
|
-
|
|
|
tonyxna:I really would like to use this, and also give credit to you as well, but I can't. For some reason an error message says:
Unable to find manifest signing certificate in the certificate store. Windows Copy of Platformer Expanded
Do you know how to solve this?
Dude go ahead man, this was meant to be more of a advanced starting for the Platformer game, only thing I ask is you credit me some way, but you already will. I also ask if you make any levels, i would love it if you would post the levels on here, I need more levels. I'm not that good with designing levels. Also, if you would like an easier way to make levels instead of notepad, go to http://cyberfang.uni.cc/platformer
As for the error, this looks like it might help you out:
http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/f2b8771a-902c-4a9d-a2e1-cc8044e54421
|
|
-
|
|
|
It worked.
And if I do design any levels, I would be honored posting them.
|
|
-
-
- (0)
-
premium membership
-
Posts
14
|
|
Also, as far as features.. one I've added in my modded platformer is player / enemy health, enemy's causing variable amounts of damage, and projectile weapons to kill the baddies. I wrote a small tutorial for adding the health and damage tutorial. You can find it here: http://blackwatertribe.com/tutorials/XNA/Platformer/index.asp
Its the first time I've tried making a tutorial though, so it might not be the best quality.
Hey nice tutorial. I think you did a great job! When are you posting the projectile tutorial??? ;) Keep up the good work!
There are 10 kinds of people in the world: Those who understand binary and those who don't
|
|
-
-
- (1254)
-
premium membership
-
Posts
262
|
|
Nice! I actually built mine to handle different game types, so I can have completely different platformer games inside the project (that way they can use different artwork/physics/sounds). It took me some work, and I am glad I did not see your post before hand.. ;) I needed to learn, and the only way for me to learn is by breaking things badly. I would have been too tempted to borrow your code for sure a few months back. I was thinking about posting a tutorial soon on my new website, but you also saved me some work there! Hehe
Save a virtual world, give a playtest! XBL/Twitter ="Talryyn" TalryynGames
|
|
|