Archive for the ‘ActionRPG’ Category

ActionRPG Update: Axes and Shields

February 26, 2009

Nothing really big to announce, just did some tweaks and added a couple of new usable drops: Axes and Shields.

actionrpg-2009-02-26-2102
actionrpg-2009-02-26-2059
I really only need to get Helmets and Jewelry (Rings and Amulets) and I’ll have all of the equipping slots covered in Diablo I. As for the melee weapons, there’s really only Clubs/Maces and Staves to put in. I’m not sure how I’m going to deal with two-handed weapons yet.

Next I’m going to put in Bows and probably put a youtube up to see whether people [don’t mind] or [absolutely hate] what I’m going to do for targetting. I’m going to use the same system for missile targetting as I am for spell placement, and doing it with Bows saves me the trouble of having to first build the magic subscreen. After that, I’ll get some of the important spells in, so you guys can get a good idea of why I’m going this route.

Advertisements

ActionRPG Update

February 18, 2009

actionrpg-2009-02-18-19112

Got monsters back in, and damage counters are bouncing again. You can attack with your sword again, but I’ve improved melee with an arc path instead of just holding the thing in front of yourself. Progress!

Steady progress on ActionRPG

February 13, 2009

I’ve been plugging at it and I’m pretty confident about getting caught up soon. I’ve gotten things cleaned up in my code base better, and XNA has solved a few of my previous issues with MDX for me. One little problem I don’t know how to solve yet:

ActionRPG tile edge problem

ActionRPG tile edge problem

I don’t know how to get rid of the lines between tiles on my map. I know why they’re there, but I don’t have a simple solution to it at the moment. I don’t want to make 2×2 patches for every tile, that’ll quadruple my tilesheet sizes. I’ll be satisfied to turn off the antialiasing for now, but I’m thinking I’ll need to render the tilemap to an offscreen buffer and blit that somehow. Not sure how to do that yet.

Next I’ll be adding in the sword attacking again, but I’ve built a small prototype program in Allegro/C++ that I used to try a sword sweeping motion. I liked it, and I’ll be putting that in directly. Also in the testbed was a missile shooting test that I’m going to need to definitely get input on. I’d like to use it for most of the directed/placed spells as well, and I think it’s an ok method. If you’ve played Children of Mana or Crystal Chronicles, you’ll have an idea of what I want to do.

[update]
Tried a few things including SamplerStates fiddling (thanks Blecki, Jolle, X-0ut, gustav, DrPetter, and anyone else I missed over at #ludumdare). Found the best solution was to render the scene to a 1:1 destination and then stretch the thing out, using a manually created RenderTarget. I like the texture sampling, I just wanted to get rid of my bleeding/seaming issue.

ActionRPG, XNA style

February 4, 2009

I’ve been digging around and considering my options, and it looks like I’m going to be able to rebuild ActionRPG with a very minimal amount of work. Most of the code I had can be moved around and be easily refit into XNA’s game framework.

One of the things I was worried most about, was using SpriteBatch to draw tilemaps with. Back when I was building the first iterations of the game, I was having trouble with framerate when using SpriteBatch; I then picked up my MDX book and learned how to use VertexBuffers and got my framerate back to something reasonable again. Well all of the tilemap methods I could google were all using SpriteBatch!

Just for fun, I went back and looked into my old versions that still had the VertexBuffer <-> SpriteBatch drawing toggle, and checked it out again. There was no difference! I realized that since then I’ve gotten a new computer and upgraded it somewhat, so I’m going to guess that’s the reason. (On top of that, I saw in the code that I wasn’t culling offscreen tiles during draw: naughty me!)

So I guess that’s what’s on the agenda right now. I’m actually pretty happy to get back into my code again. The best thing about all of this is that when I’m done, I’ll have something that I should be able to port to the Xbox 360! That’s cool.

ActionRPG update

January 30, 2008

I’d like to have something interesting to post every day, but that I don’t think that’s possible. Still, I try.

I’ve made a few minor additions to ActionRPG, and I’m richer for the experience. Such additions include:
– Allowing magical items the possibility for both a prefix AND suffix.
– Adding all of the property ranges for those I’ve already defined, as per the tables found on Planet Diablo.
– Refactoring related to the above.
– Constant Random Seed, for reliable replication of environment (for testing purposes).

I haven’t yet taken a look at Quality Level, which determines what magical properties can be used on an item. Also, item “quality” is still completely random – so it’s possible to wind up with The Best Item In The Game on the very first drop.

I really want to get some magic into the game. Really Badly. Perhaps I need to be poked with a stick to get it underway.

CryptFloors: random generation, go!

January 28, 2008

I decided to see how hard it would be to hook my Random Level Generator to ActionRPG. I had it going in under an hour. I’m shocked at my own efficiency:

 actionrpg-200801282053.png

So yeah, there you have it. For the first four levels under the church, I’m randomly generating rooms and filling them with a crapload of entities. I found the levels to be too small at 32×32 so I jacked them up to 64×64. I’m not sure if thats too big or what, I’ll have to playtest a bit more before I can really tell. I’ll probably drop back to 48×48 if I find it’s too big the way it is now.

A few additional changes that may not be readily apparent:
– The stats panel in the upper left is now shortened until you open the inventory.
– The player can now move on diagonals. You couldn’t get him through doors unless you had a wall to line him up, before.
– Doors are available as a tile used in the random generation, though they act as floor tiles right now.
– Randomizer uses constant seed system now. Great for saving games with.

There’s still a ton to do, I’d really like to try out the Cellular Automata Method for the Caves. I think it will yield very good results. I’ll be doing it in the Level Generator project before I move it in here. That testbed was a super-great idea. I’m so smart.

Random Level Generator

January 28, 2008

I felt it was time to at least set up a testbed for working on some random level generators. As I was looking around, I realized that emulating the look of a Roguelike would be a quick and dirty way to show off a dungeon map. I got right into it and built a WinForms app and gave it the first two test buttons you will see below:

Level Generator - Random Rectangles

I started taking a look at some Roguelike map-related information at roguebasin, that Viridian was kind enough to pass along to me. There wasn’t a whole lot I could really sink my teeth into, but an article originally written by Mike Anderson really caught my attention. I googled and found a page where he provided an example where he was stepping through and showing the algorithm at work. Once I saw that, I was hooked. I wrote up a rooms-only version and wound up with maps that looked like this:

Level Generator - Rooms-Only Anderson Algo 

As you can see, I’ve got something to work with now. Even if it doesn’t make perfect Diablo 1 maps, who cares! I just want some rooms to move around in for now. And this shows that I can have exactly that without a whole lot of trouble.

Make no mistake, I’m not done with this by a long shot. I’m looking at the walls of interconnected rooms and considering rolling for different types of openings: standard wall-door, completely open, pillars, portcullis-walls with door, and so on. I think that will make it look much more Diablo-esque. On top of that, if you consider that there are required rooms for certain floors (the Butcher’s room, for example), I may have nailed their creation method. Only time and effort can tell for sure!

How does Diablo build its maps?

January 18, 2008

I took a bit of time to try and look up how Diablo 1 loads or creates its maps – and I came up with nothing but tile graphics. I have to assume that when you use a stair to go to a level you haven’t been in yet, the progress bar is indicating that the game is generating the map from scratch. I used several tools to look into the Diablo MPQ datafile to try and find more information out, but I was unsuccessful. Without information or raw data, I had to look to other means of working towards building my own maps.

I have the thought now and again that I should really be trying to create my own content. Right now I can’t really support content I’m not ready to build, so it seems reasonable to borrow other content. That’s why you see me building a Diablo clone – it’s a good stepping stone to start off with. I’ve built mazes before, but never anything more complicated than a 1-tile-wide corridor maze. As I think on things, I could probably look up Rogue‘s level creation method, but since I’ve already done this much I figure I might as well see it through.

Getting back to the problem – I wasn’t able to find any information about how Diablo builds its levels, and there was no indication from the datafile how to go about it either. So I decided to take another approach – take screenshots of the automap and put them together in an image-processing program (I like Paint.NET). I wind up with images that look like:

diablomaplv1-200801180807.png

With enough of these, I can start to guess at the patterns and come up with my own builder. It’s a good idea, but the mashup above is awfully hard on the eyes. I wanted to filter out the non-map information, but I didn’t want to hand-edit the compiled image.. but how would I do that? I know GDI+ a bit, but I just wanted a quick-and-dirty solution that I know only one way of creating: Allegro. So I broke down and downloaded Dev-C++ and grabbed Allegro for it. After a bit of wrangling with C++ and a couple of recompiles, I handed my new tool the image and wound up with:

diablomaplv1-200801180807_filtered.png

Perfect! Now I can really get an idea of what the folks at Blizzard were doing.

It would really have been helpful for the guys at Diablo Evolution to have put something about the map generation somewhere on their site. These guys probably know more than anyone else about Diablo. They mention that some of the screenshots in the early days of pre-final Diablo were “impossible” and they could only know that if they knew how the maps were being built. I still have to dig some more before I decide to give up on that route, but for now I’ve got a good lead.

There’s no escape!

January 17, 2008

At lemur’s request, I dropped in wall collision detection. You can’t walk through walls anymore! It really changes how I find myself collecting items, because I can’t just run away from the monsters forever anymore.

I had no problem putting in wall collisions for underneath the town, as I was generating the maps myself. Getting the town to block my movements was a little trickier. When I originally put in support for the town tilemap, I built the map in Mappy and exported a .MAP file; that file contained only indices into the tileset bitmap so I had something to draw with. I didn’t have any collision information for when I decided to do this, so I had to try and load .FMP files that would have collision info in it. I fought with it, but I got it in.

Wall collision isn’t exactly something I consider worth making an avi over. Posting a picture of it isn’t really going to show much, either. I’d like to have something visual to post every time with, but that just isn’t possible every time. I’ve got a ton of stuff still to do before I’m looking at a Diablo clone, but I’m inching every closer with every step I take.

I think the next thing I’ll be doing is to improve on the floor layout of the dungeons. There’s nothing but open space!

New youtube of ActionRPG

January 15, 2008

Have a gander at my latest triumph!

Keep your eyes open for:
– town map
– NPCs (can’t use them yet, but the Talk action appears when you face them)
– bouncing items
– new monsters
– magical items

That’s right: Magical Items are in! The eight properties I listed in the last blog post are all in, I focused on just those. The way I have it set up, I’ll be able to give monsters many of the same properties, if not all of them. I’m also all set to add unique items with multiple properties. I’m going to step back from this project for a little bit to see what’s next to do… Probably skills and magic. Or sound (I know, mrfun, I know!)