Showing posts with label level editing. Show all posts
Showing posts with label level editing. Show all posts

Tuesday, September 9, 2008

Finishing touches (omg j/k lulz)

Okay, so I've spent VERY little time on Extinctathon of late. This, with two weeks left (from today) before the deadline. Ugh.

Here's what I'm going to do before then:

  • Eliminate garbage created by ToString() (called several times per call to draw) by storing strings and updating only when necessary.
  • Save the background color (or image, maybe) to be used in the binary level files (because one can only take so much Cornflower Blue). Update: DONE!
  • I really need to finish three more levels. This has been such a difficulty simply because of the lack of building blocks I have at this time. I've made some additions, but it's not nearly enough to make a fully fleshed out game (I'd ideally like to have 80-100 more blocks, 6-8 more powerups, and maybe 10 more enemies before calling it "done"). A large problem with this is very deeply embedded in the stupid way I designed the Sprite class (yes, that's ONE sprite class, used for 30+ types of sprites) that needs a complete overhaul that will absolutely not be done in any small amount of time. I'm just gonna work through with what I've got for now, and restructuring the sprite types to inherit from a base Sprite class (rather than all being instances of the same class differentiated by a SpriteType enum) will have to come further down the line.
  • I need to create the boss character for level 1-D. I already know what it is, and aside from creating the artwork it shouldn't be a problem.
  • I need to reload and restart the current level upon death. This will be a trivial change. Update: DONE!
  • I need to make a Game Over screen for when the player's lives are less than zero. Shouldn't be a big problem. Update: DONE!
  • I need to make a non-debug mode (all I have are DEBUG and EDIT) for DBP. Don't want to see all the diagnostics 'n' shit on the actual submission. Update: causes a weird bug that makes everything but the player invisible. WTF? I tried to fix it for a good 30 minutes last night but have yet to find the problem. Double update: DONE!
  • Along those lines, I need to disable entering the level editor for the same reason. Update: works, but of course it's dependent on fixing the above mentioned bug. Double secret update: DONE!
  • I need to move inactive (i.e. dead) sprites out of the current level's sprite list if performance on the XBOX 360 necessitates it.
  • I need to fix, once and for all, the intermittent bugs caused by the sound loading and reloading. Update: DONE!
  • I need to fix the jumping bug that allows the player to jump after falling off of a ledge. Update: DONE!
  • I need to make the loading screen show the name of the level (and maybe an image preview?) being loaded. Update: Level name is shown, will add picture preview later.
And that's all I've got. These things WILL be done by September 21st. I'll be prepping the rest of the submission package on the 22nd, and turning it in no later than 5:00 P.M. on the 23rd. I'd better get my ass in gear.

Thursday, August 14, 2008

Incremental updates ahoy!

Adblock

Okay, so I've been really really busy in the real world in the past several weeks. Unfortunately, I've had little time to work on Extinctathon. I have done some stuff in the past week, though, so here's what I'm working on:
  • The levels now have barriers that keep the walking enemies (i.e. everything but the bees at this point in time) bound to a particular region, primarily keeping them from walking off the edges and commiting enemy suicide. These are inserted manually in the level editor, an idea that seemed retarded (in that there must be a smarter way of doing it) until I saw a similar mechanism in a commercial 2D level editor.
  • The barriers, along with the previously mentioned checkpoints (see previous post) now turn invisible outside of the level editor. I'm listing this as an additional feature to make it look like I did more work this week so I can feel better about myself.
  • The major bounding box issues have been fixed, but a smaller problem still remains. Projectiles, as you may recall, are reformed from existing projectile objects which avoids using new (since the XBox 360 is racist against news). The problem was that the bounding box was being semi-manually set after the creation of the object in a spectacularly stupid way, so when the bounding box for the object changed (like when a fireball turns into a bible, which is bigger), it wasn't getting updated in the code. At first I tried to work around this by referencing the data from the sprite sheet, which does have the bounding box information for every sprite in the game, but that was REALLY slow. At the moment, it's copying the box from the sprite sheet at object creation/reformation time, which is doable (since the sprite sheet should never be changed, this should be okay).
  • And, finally, aside from the necessary addition of an end, which I'll get back to in the next section of this post, I'm done with the basic construction of the first level of the game. I'm happy with it, and I'm sure I'll tweak it, but I want to have something roughly set in stone so I can look beyond it on to other things.
What's next? A lot.
  • The biggest thing--and I mentioned this in my last post as well--is level transitioning. When the player crosses the final checkpoint of the level, a little animation needs to happen, perhaps a summary or a ghetto cutscene, and then we need to move on to the next level. This is going to be tricky, and I am going to have it done by this time next week. It will be done. Seriously. I have to do it. So that's what I'll do.
  • I need a couple of tweaks to the powerup system, including the ability to set what type of powerups come out of the box inside the level editor. At the moment I'm just procedurally saying "the box has been hit, pop out a fireball!". Along these lines I need to make the brick blocks breakable and give them similar behaviors to the questionmark blocks.
  • A whole bunch more, which I'll maybe get in to in a bit.
As always (at least usually), here's the video:
Extinctathon: Barriers, checkpoints, and bug fixes (720p 10.1mb download, recommended)
The same video (YouTube)

Wednesday, May 21, 2008

Extinctathon: level editor saving and loading complete



Just a post to let anybody who's reading this that I've finished the level saving and loading features and they work quite nicely. The in-game level editor (still a work in progress--it's not very fancy at all) can save all the blocks in the current level as an XML file. I can then add that file to the project, where my Content Pipeline library converts it into a binary XMB file at compile time. My XMB reader then converts said XMB file into objects in memory.

Basically, List<Block> -> XML -> XMB -> List<Block>. Apparently doing it in this way is much faster than the easier way of simply writing to and reading from plain text XML files. When you're saving thousands of blocks, you end up with a good 2 or 3 megs of XML which takes far too long to parse.

I'll post details, code, video, et cetera a little later on.

Also, I should say that writing this took a good deal of work on my part, and once again the XNA tutorials were a HUGE help. However, while in the middle of this, the XNA site was down for about a day preceeding their big relaunch, and this was the first time I just NEEDED other people's help. I ended up getting it on the forums after the relaunch, and it helped me to understand some of the things that weren't clear to me before. In other words, "Thanks, internerds!" Where would we be without you?

Source:
Program.cs, Extinct.cs, Species,cs, Block.cs, BlockReader.cs (rar)
BlockPipelineContent.cs, BlockSettingsWriter.cs (rar)

Wednesday, May 14, 2008

Extinctathon: Level Editor



I've been working on Extinctathon pretty regularly lately, at least 2-3 hours per day, and I've updated quite a bit. I've got multiple types of background tiles (Block objects), I've updated the collision detection (it works about 95% as well as I want it to), and the beginnings of a level editor (as seen in the video). It's all in one program; you hit up on the d-pad to toggle between editing and debug modes (as seen in the upper right hand corner). In edit mode the shoulder buttons cycle forward and back through the types of tiles (grass, mountain, cloud, block), and the cursor is moved with the left hand joystick. Tiles are placed by pressing A.

I still have quite a bit to work on, including adding blocks that can be broken, blocks that can pop out power-ups, enemies, and all sorts of other stuff. The code needs cleaning up, too, and there's a good amount of commenting that I need to do before I move forward. The next step I'll be taking, however, is adding a level loading and saving system. I'd like to then make one semi-complete level so that I can test it out and then add enemies. I'll hopefully do that this week.

Source:
Extinct.cs
Species.cs
Block.cs