Jump to content

  • Log In with Google      Sign In   
  • Create Account

kseh's blog

RPG Project Post 12

Posted by , in RPG Project 15 April 2015 - - - - - - · 843 views

I'm procrastinating on beginning the next thing I want to work on for my project so I thought I might as well post something here. Unfortunately, there's not really much progress that can be shown with screen shots or video. So for the heck of it, I thought I'd more or less just copy & paste the descriptions I have on my back up folders.
  • 2014-09-25 - Replace overworld array of Tiles with Tilemap object. (to help create basic house interiors)
  • 2014-10-01 - Tilemap stuff still in progress
  • 2014-10-14 - Mostly Stable
  • 2014-10-21 - Work on neglected Serialization code
  • 2014-11-07 - Fairly Stable
  • 2014-11-10 - Change Town object into Actor object
  • 2014-11-21 - Mostly working again
  • 2014-11-24 - Beginning NPC Instruction work
  • 2014-11-27 - Refactor instruction script code.
  • 2014-12-04 - Instruction labeling
  • 2014-12-12 - Scripting changes in progress
  • 2014-12-23 - Generally Stable
  • 2015-01-09 - More Collision Refactoring
  • 2015-01-12 - Collision rewrite in progress
  • 2015-01-14 - Collision rewrite looking ok so far
  • 2015-02-19 - Collision work
  • 2015-02-24 - Embedding collision issue appears resolved
  • 2015-02-27 - CollideTestStep1 Rewrite
  • 2015-03-04 - NPC Path finding and steering still sucks but is reasonably stable
  • 2015-03-19 - Begin Connecting Houses with roads
  • 2015-04-07 - Redoing House Connecting
  • 2015-04-15 - Houses now connect with fewer Road objects created
The current plan is to get these Road objects all in place such that they effectively connect all the houses in a town to each other and also connect one town to another. When that is done I'm planning on having NPCs do their path finding based on the network of road objects rather than map tiles.

I'm not sure how I got on this tangent but it appears that the direction I'm going is to try to get something looking like a busy town where the people wake up at home, going to work, maybe going shopping or to the pub, and then head home and repeat. There's still no actual game to this thing yet but I'm pressing on with the theory that if I can turn this day to day activity into a simple economy (probably centered on rent, food, and beer) then maybe adding in things to disrupt activities will provide a player something to do.

I suppose if I really wanted to, I could just abandon the path finding stuff and let townsfolk wander stupidly and then carve out some caves underneath all the towns where demons and treasure could be found. I'd have something more resembling a game rather quickly. But I think I'd rather see if this plan that I have going will work out.

RPG Project - Post 11

Posted by , in RPG Project 05 September 2014 - - - - - - · 686 views

Been steadily working on this RPG project an hour or two at a time and finally got around to making a new video. Though there's lots of stuff going on in this project, I still don't have something that can be called a "game". It's still just the PC wandering through a world where there isn't really anything that happens. Just the various features I thought would be fun to work on. The apparent responsiveness is a little slow between not having a fixed time step and having to do the video capture on an older laptop.

  • Added some birds and NPCs into the world. They don't really do anything other than wandering around a bit and generally giving you something to look at.
  • You can see my version of "Fast Travel" (I mentioned in my last post) when the PC is traveling along a road and those stars appear a bit in front of him.
  • I don't have any examples of trying to steer through forests but there's a bit of walking around NPCs and buildings. It still needs some work as steering only takes place when collisions occur but I'm pretty confident I can work out something better when I figure on investing the time to do so.
  • You can see a bit of what I've done with the hands (if they're not too small) in that you can see them swaying back and forth as the PC walks. They aren't directly connected to the sprites but are more like disembodied circles that follow the PC and NPCs around. The hands are capable of performing "gestures" when triggered. The only gestures you see in the video are the swaying of hands while walking and one that happens when the PC swings a staff around. It's supposed to be like a sort of reach and follow through sort of motion but I got lazy and used one of the test gestures I had previously gotten ready rather than properly doing up a custom one that fits better.
  • I'm not certain yet but I think combat is going to change from the little bit that you see in the video. I'm thinking about changing from the more action based style I have now to something that's more turn based.
  • Added regions and towns. (Started adding farms as well but they're not present in the video).
  • Houses and farms are placed somewhat randomly around the town's epicenter. An NPC is added near each house that's placed.
  • At a point closer to the end of the video I set off an "explosion" on a field of flowers, if you're wondering why it looks like a bunch of flowers just suddenly go flying. "Exploding" things was supposed to be a part of developing a spell of some kind which didn't go very far. But the functionality is there and I thought I'd show it a bit.
Had a bit of trouble with SFML in that the (old) laptop that I do some of my testing on uses an old Intel graphics chip and there's been known issues. The problem I had was when it came to trying to do alpha blending to a couple different off screen buffers so that I could play around with lighting effects. It worked fine on the desktop that I do development on but not the laptop. The problem could probably be easily resolved by updating the graphics drivers but doing that sort of thing has been locked down by the laptop manufacturer and I haven't found any work around. So for the time being I won't be planning on doing anything with lighting in this project. It's a bit of a shame too because it seemed to set a mood when it did work.

The past few weeks have been spent on trying to create towns and connect them with roads. So far I'm pretty happy with the results (screenshots below). The roads do this thing though where they switch back on themselves such that you get pockets of wide roads and this interferes with the fast travel that I have going. I'm currently looking at adding farms for NPCs to go work on. I want to do a schedule sort of thing where they go off to work and then return home or maybe stop at a pub or something. Maybe add a few other jobs eventually. I'm hoping that this will add a bit more life to the world and eventually lend towards creating situations for the player to interact with and do something other than wander around pointlessly.

The regions were done using a Voronoi algorithm. I started out by finding points on my map that were 32 pixels apart from each other then applied the algorithm. The result was my island being divided up into square regions so I randomized the position of the points a bit and got a result like the one below with the small regions. Then, I choose a random point for where a town's epicenter would be and removed any points that were within a certain range and ran the algorithm again. And repeat the process until I've placed all the towns I want.

(first pass)
Island Regions Start

(final pass)
Island Regions Final

(map blend with roads, buildings, and farms)
Island Regions

RPG Project - Post 10

Posted by , in RPG Project 14 February 2014 - - - - - - · 1,008 views

I have been working on this project now a year and a half. I wanted to post an update back at the one year mark but I kept thinking I need to include screenshots or videos to really show off what I've done. There isn't much that has come out of the past 6 months that could be shown with just a screenshot and I never seem to have the presence of mind to make a video when I have the resources handy.

Old code
The one year mark of this project would've also marked the 10 years that I've been working from the same code base.

My Code base's 10th b-day
So 10.5 years ago now, I started writing the code that I'm using now. Back then I was looking at getting some classes to handle 2d animations and generally try to keep things organized such that animation data, graphical data, and game related data for characters were all kept separate and manageable. For the most part, the animation class has changed very little over the years (changed from using arrays to vectors awhile back and just recently a change to support different animation types better) while the other two have evolved from one kind of organized chaos to another, spilling into additional classes and sub-classes.

Switching to SFML
One change that was long overdue I made last September and that was switching from DirectX 7 to SFML 2.1. If I remember right, DX7 was obsolete when I first started with it. But it so happened that I was able to wrap my head around the code I found for it well enough back then and all I really needed was to just get an image to the screen. And it did that well enough for my needs for quite awhile so I never bothered looking for anything else. Finally though I found with this RPG project I'm blitting enough things to the screen that it was really slowing things down on my target computer (which is also quite old). After a few attempts at trying to make things more efficient and looking around for options, finding out how much things would improve if I was taking advantage of hardware acceleration.

I went with SFML because it was the easiest to get working. Or at least, it was the first option that I got working. I found both SFML and SDL streight forward enough to get an image to the screen but I was unable to figure out how to make use of hardware acceleration with SDL. I would've experimented with an updated version of DirectX or XNA but I was limited by my dev machine. In the end, SFML was the easiest to install and see an improvement with.

Movement stuff
Most of the past 6 months has been messing around with movement. I already had a system for using A* that is working alright for me but there was other stuff to do.

Walking through forests.
Since my last post I've changed from using a keyboard to move the player to using the mouse. I did this because I like the fairly thick forests that I have in the game world (see video in previous post) and I want to have it so that the player can move between the trees reasonably well. It was just way to easy to get caught on a tree when moving through a forest using the keyboard. Some quick experiments with mouse movement showed that being able to travel at angles other than 45 and 90 degrees really helped. The path finding stuff that I had didn't have the resolution to navigate between the two or three trees that could be found on a tile so it took awhile to get a sort of steering behavior and path finding combination working to make travel through forests reasonable. It's still quite possible to get a bit caught on trees but I'm thinking trying to move through a forest doesn't have to mean flawlessly traveling to your destination without the need for changes in course.

Fast travel element added.
Before that got done though I was sidetracked by an idea I had for a fast travel sort of thing. I'm not sure why I started thinking of it but I figured if I needed such a feature I'd want to avoid having it like you teleport from one place to another. As it is, I've occasionally generated 1024*1024 or 2048*2048 maps to play with and walking around a world that large does get a little tedious. I ended up laying down roads from the center of the map to random locations using the A* stuff that I had to try and find a path such that roads are 1 tile wide and are laid down so that changes in elevation from tile to tile are minimal. Now, when a player is on a road and does a mouse-key click combination, a flood fill sort of thing is done down the road tiles to the next point an intersection is found. A path is then set to that destination and the player is moved along the road at an accelerated speed. This way, you can follow a road quickly without knowing where it's going and you can always interrupt the travel to go off road.

I don't really know if roads are going to play any part in whatever I end up with for a game but it was an amusing diversion and I can use the feature later if I choose..

Future development plans

When I started this project I was thinking the main character would be trying to learn magic from the ground up. So I wanted to be able to show hand gestures without having to create sprites for every imaginable combination. Since my main character is basically a couple minor evolutions away from a rectangle body with a circle head, I figured why not a couple more circles for hands that are sort of disembodied. Not worrying about drawing arms, I should be able to float these hands around in whatever pattern I need them to and hopefully get a versatile way to animate interacting in different ways.

So far I've just worked on having hands sway by the player's side as he walks. Still a fair bit more to do here that will take my focus for the next while.

Combat (lack there of and some planning)
Probably the main thing holding me back from adding combat into the game is that it seems like I don't have a reason for the player to fight. And that's pretty much because I'm not yet that sure what it is that the point of the game is. The slimes that I've added so far aren't aggressive to the player and I can't really think of a reason for them to be unless I embrace the notion of making a hack and slash sort of game. There's nothing wrong with that but it doesn't really seem to go with the other features that I've developed so far.

But awhile ago, somebody posted, I think it was on their journal, that they were switching from a mouse driven movement system to a keyboard one because they found that it provided a better overall experience when it came to combat. I'd link to that post but I can't seem to find it. Whoever you are, thanks because it made me realize that I'll be facing this problem too. In my case though, I'm not willing to abandon mouse movement because I want to keep the whole moving through forests element that I like. After thinking on how to do combat for awhile, I'm leaning heavily towards something where the PC is kept facing the mouse cursor and the player would press a key or mouse button to execute a melee attack. The attack will have a range that I guess could be described like a radar sweep of various widths and lengths depending on the type of attack. Anything within that sweep will be considered hit. I'm hoping that this idea will keep the pace of the action that I currently have.

RPG Project - Post 9

Posted by , in RPG Project 22 August 2013 - - - - - - · 624 views

Sorry, I don't have anything "Awesome" to share. Unless you've been following my journal posts anyways in which case I have a video that I think is pretty cool. The video is basically a walk across the island from the northwest corner to the southeast. You can see the slimes lurching around and some fallen trees in places. No dinosaurs though.

For the moment the winter environment has been replaced with one that's more like the ground says it's summer but the trees say it's autumn. That's only really because I've been playing around with world gen a bit and this is where I've left off for now. At some point I'll have a proper plan for stuff like biomes and regions on the island but that's a bit away yet. Oh, and I feel that I should mention that the blue stuff that looks like water isn't really water (not yet anyways).

I should also mention that the map that's displayed for a few seconds at the beginning shows the general island shape and some vegetation features. It's not a part of the game yet but I thought I'd include it in the video as an environment overview sort of thing.

At about 3:38 I triggered a path finding operation on all of the slimes left on the island (about 250 slimes on a 256*256 tile world) and the game lurches for a little bit (I don't think it's so bad if only one or two were to path find at about the same time). The slimes all find a path to the player's current location and I display the path of one of those slimes using the fallen tree graphic. Once the path find is complete, I follow the path back to the originating slime. There's a couple spots that aren't exactly optimal that I'll have to look into. So, still more work to do with improving pathing but it'll do for the time being.

I still need to make a game out of this world that I just keep adding details and things to. I'm leaning towards having the player try and discover potion recipes (and maybe a few other spells) with the ultimate goal being to conjure a portal to escape the island. The idea at the moment being that the player puts a bunch of ingredients together and ends up with a potion but he doesn't know what it does. He has to experiment with it a little bit (somehow) to determine if it's safe to drink or if there's a proper way to apply it towards forming a portal or doing something else. Ideally I would like to make potion recipes random for each world generated but I need some sort of procedural way to generate recipes, provide a fun way to discover and experiment with them, and for that matter determine what the effects are supposed to be.

Sometimes I wonder if I should skip all the magic stuff for the time being, throw together a few more critters, drop in some treasure stuff and an exit portal somewhere and just release the game more as a warriors adventure sort of thing. I have a feeling that I wouldn't be as far off from finishing something like that. Then maybe look into the magic idea more afterwards. Potions, treasure, simple weapons and armor upgrades, maybe some survival element with food or something. Not sure what I'd do with the trees and flowers though.

Also of note, the frame rate isn't very pleasant on the computer that I do the video capture from. I gotta wonder how much of that is due to the the essentially 'brute force' coding techniques I'm using to get all those objects to the screen. At some point I'll probably have to look into doing something that takes more advantage of video hardware or just see about any sort of technique more advanced than the simple DirectX7 Blt() calls that I'm doing. Maybe join everyone in the 21st century.

So, the assorted stuff I've been up to this past month or so:
  • Create a pile of wood when a tree is cut.
  • Slimes leave piles of wood after colliding with trees sufficiently.
  • Spent some time reworking some collision code
  • Fixed bug where actors wouldn't do anything unless they're visible on screen.
  • Fixed up some animation stuff.
  • Worked on path finding code and related changes. Tried to make path code more extensible.
  • Worked on frame rate issue related to terrain edging. Better but not completely resolved.
  • Lamented poor redraw speed.
  • Experimented a bit with adding shadows to sprite bitmaps.
  • Experimented with enlarging the world (and related code changes to make it easier to do so).
  • Turned off seasons and temporarily switching to using elevation to decide biomes.
  • The 2048*2048 world with 32*32 pixel wide tiles took about 6 minutes to traverse from west to east.
  • Added code to output world map to bmp.
  • Turned various arrays for world map into 1D arrays to better support ability to change world size.
  • Worked on placing grass & flowers less randomly and instead try to grow "patches". (needs more work)
  • Removed the dirt mound I was displaying with grass and trying a shading on blade base instead.
  • Output vegetation map to bmp file.
  • Started getting concerned about memory footprint from all the vegetation objects being created.
  • Returned to 256*256 island size. Memory use turns out to be reasonable still but frame rate still lower due to all the additional objects displayed.
  • Added a splotch of different terrain type in island center to go with potential game element idea.
Hey, if anybody has any interest in maybe seeing this thing finished a little sooner as the warrior's adventure sort of thing I mentioned, please let me know. If there's a little interest then maybe I'll try and get something going parallel to this project going. If there's a lot of interest... well I don't think I get enough readers to have a shot at "a lot" of interest but in general more input will influence my direction more.

RPG Project - Post 8

Posted by , in RPG Project 10 July 2013 - - - - - - · 934 views

I'm not all that sure what area of my project I should be working on next. So I thought I'd procrastinate a little and do up a journal post since it's been awhile. I wanted to have a video to go with this post but I don't have the capture software handy and when it is handy I never think of it. So here's a quick screenshot:

Attached Image

It doesn't look much different from anything I had before. The only obvious difference is the slimes. They sort of lunge about in random directions at the moment and if they collide enough times with a tree the tree disappears as if the slime has eaten the tree. They also "eat" any flowers or grass they come into contact with. The "eating" doesn't seem to occur exactly when you expect them to though and I think that's due in part to the collision boxes being smaller than the sprites.

Right now you can attack the slimes though they don't attack back. When you hit one it's sort of pushed off a bit in the direction of the attack. They can take somewhere from 1 to 4 hits before they just disappear.

The lunging movement of the slimes was kinda fun to work on (a video would be really good here, sorry). At first they looked kinda like they were just gliding along the ground, about what you might expect from a sprite being updated in one direction with no acceleration or anything applied. The lunging movement was just done such that when processing movement and there's a speed in some direction, before actually moving you first play through an animation where the bulk of the slime shifts to one side. Once that animation completes, you start to actually move the slime for awhile before essentially starting the process over again.

Other stuff I've done since the last journal post:
  • Load various settings (like season and some world gen stuff) through xml file.
  • Added half-assed progress indicator in title bar for island generation.
  • Added grass sprites and made grass mounds change colour depending on season selected.
  • Considered changing colour of leaves for seasons and otherwise making tree sprites a little more dynamic.
  • Some work on layering bugs (still not perfect but better).
  • Added a "schedule event" queue.

There's a lot of stuff that I would like to do yet, some little things and some quite a bit larger. Like:
  • See about getting a sky box in instead of the black background.
  • See about planting flowers on a more regional basis rather than the current technique.
  • Give a purpose to flowers and grass.
  • Create some sort of inventory system.
  • Create a player health system.
  • Fix up attack swoosh locations and ranges.
  • Implement PC's floating hands.
  • Make it possible to descend into the caves.
  • Leave logs when a tree is chopped.
  • Make it possible to build a structure (maybe).
  • Create a monolithic marker stone in the center of the island.
  • Do some work on the scrolling boundaries.
  • Get some path finding stuff added.
  • Refactor code.
  • Improve timing code.
  • Lots of other stuff, I could go on and on and on.
There is so much to do but none of it really pushes me towards having an actual game. I still just have this world populated with a bunch of stuff with a little bit of interaction available but no game. I know what my overall goal is, at least for the first iteration (escape the island by creating a portal), but I'm not sure yet how to go about making it an entertaining experience. The slimes were supposed to be enemies to contend with but with the general goal and story I have in mind they're more likely to be a form of wildlife than a full on threat. I need some sort of underlying challenge other than just getting the stuff together to form a portal and escape.

It kinda sounds like there's been quite a bit of development since my last post but there's been about a month where no work has been done at all. Having recently become the father of twin boys, I took 4 weeks off in June for parental leave to figure out what the new life routine will be. Other than having a lot of stuff crammed into our house that we don't really have room for and a sort of sense that I'll perpetually be worried about their future, everything is going really smoothly.

RPG Project - Post 7

Posted by , in RPG Project 02 May 2013 - - - - - - · 547 views

About a month ago I wanted to have a post that included a video (and I have one now here). But when the video capture software I used came across very choppy, I figured it was due to inefficiencies in my code. And with the controls generally feeling sluggish, I just thought it made sense to spend some time focusing on finding ways to improve my rendering.

I figured the problem was that I was doing a significant number of blts for the trees per frame and that was slowing things down. So the plan I had was to do a pre-rendering of the tiles that made up the current display. I would let one frame be a little slower when I prepare a bunch of buffers for the tiles that would be displayed. Then subsequent frames would just use those buffers to do one blt that would include all the trees and flowers on a tile that would otherwise each require there own blt. That way, I would only have to do a full redraw of the tiles where something changes. I seem to remember hearing that redrawing only what changes is the right way to do things so I felt like I was on the right path. With only a short amount of time on any given day, I spent the past month or so working on this and early this week I got the basic fundamentals of the functionality working. It was buggy as hell but it worked sufficiently that I could compare the change to an older version.

It turns out that the original video I tried to capture was choppy because of poor settings I had the video capture software set to. And all that work for the past month didn't result in any real performance improvement. Though apparently during all that work I pulled out one small unused piece of code from my game loop and that was enough to improve the sluggishness that I noticed before. So, I'll be rolling back to more or less the code I had a month ago. Maybe that whole tile buffer idea was the right way to try to go or maybe it was completely misguided. But in either case the old code works better for the moment and I want to work on something for awhile that will feel like I'm moving forward.

Anyways, here's the video of what I have so far. All you can really do right now is walk around the world and chop some trees until they disappear. I don't want tree chopping to be a major part of the game but the code that works behind it should be useful for other functionality. The scroll position jumping was my answer for the flickering issue that I was experiencing before. It still needs some work so that there's less confusion about where you are but I'm thinking that it's just a matter of tweaking when (or if) the slower scrolling takes place as you approach the screen edges.

Which leads to the question, what next?

The plan for this game was to be centered on the discovery of magic. I still want to aim for that but I'm not even close to starting work on a magic system yet and I'm realizing that coming up with just the basic ideas for discovery paths of multiple elements and types of magic is a lot larger of a task than I realized. It would be years before I see anything close to what I had planned. I want to have something playable and somewhat interesting within the year. I don't mind being flexible but it just means I don't really know for sure what direction this thing is going.

A quick thing I think I'll try is to add in some sort of long grass. It would essentially be the same object as the flowers and for the time being it would only be decoration. Grass in a winter setting is a little out of place but the idea is in my head and I might as well put it in as it shouldn't be too much work. And I can always switch to the summer setting anyways. The idea is that grass provides a bit more decoration, possibly a low level of camouflage for critters, and could maybe work as one more ingredient for putting things together. So it's not like it's entirely pointless.

But I think the next main thing I'll look at is adding some critters. I'm thinking of starting with adding various slimes as they should be easy enough to draw as well as create an excuse for their aggressive behavior. I'm thinking at first I'll have them wander around slowly and randomly and if the player gets within a certain range they will charge the player. Since there's no health system at the moment, any sort of exchange between player and slime would just be a pushing match of sorts.

RPG Project - Post 5

Posted by , in RPG Project 08 March 2013 - - - - - - · 752 views

Memory leaks have pretty much been at the center of my focus for this project for the past few weeks. There really isn't a lot that's interesting to post about while trying to hunt these things down. And up until about two days ago, the only posts I would've been making would've been appeals for help and possibly questioning the help offered. I had thoughts of just living with the leaks and hoping they don't cause problems down the road or abandoning the project entirely. But now, I'm glad I stuck to it and found the bugger that was giving me issues.

Don't know if anyone will find any of this interesting but I figure I might as well take the opportunity to vent about the non-sense my own code inflicted upon myself.

The line where the error would occur was

CSwooshEffect * pItemTemp = new CSwooshEffect;

From this line I experienced weeks of being confronted with "Windows has triggered a breakpoint in [program].exe". Google searches that all pretty much say the same thing when other people ask about it, "You're probably writing to memory that's already been freed." I figured I'd get about the same response if I posted a question here or anywhere so I began painstakingly started going through code to try to find such a situation. I plugged in Paul Nettle's MMGR code into my project which helped find the source of a bunch of leaks. But after fixing them, that damn message still came up even though the leak report came back "No memory leaks found!" Clearly I didn't really have them all. But I just couldn't understand it. All I was doing was instantiating a new object, how could that be writing to memory that's been freed?

Trying to battle that one message resulted in me rewriting my animation class that I've been using for almost a decade now, it resulted in finding 2 other locations causing leaks, revealed that I forgot to change some code for a few objects so they're created using new() instead of being members of another class, it resulted in the realization that some sorts I'm doing on my object lists weren't sorting correctly. I found a variety of things I was doing wrong and yet despite all that the message wouldn't go away.

As fascinating as I'm sure all this is, I'll skip ahead now to where the problem finally was. (my dev notes have the details of how I came to this point, I can post them if anyone's interested but I'll skip ahead).

I keep a few lists that are used to track instances of objects. I was investigating a tile's list of objects and comparing it to a main list of objects. Checking that an object was being created and being properly set to the tile's list of objects. I wanted to make sure that everything was the same when that object's pointer later got removed from the tile's list and the object deleted. The object itself was indeed the same however completely by chance I noticed that the tile that I thought was working with wasn't actually the one I was working with. It all went a little something like this:

- From my main list I'd determine which object required deletion.
- Using the object's world co-ordinates I'd calculate what tile that object was associated with.
- This calculation was producing a rounding error causing me to look at the wrong tile's object list.
- The wrong list of objects isn't actually affected.
- The object is removed from the main list.
- The object is finally deleted from memory.
- The tile with the list that should have been examined now has a pointer in it pointing to freed memory.

That memory gets accessed later on in my paint routine. Undefined behavior due to accessing invalid memory sounds like an appropriate description of the trouble I've been having.

I dealt with the problem by adding the tile co-ordinates that the object is on to that object. Not terribly creative but it got the job done.

This annoying issue has taken so much attention I don't know what's next now.

RPG Project - Post 3

Posted by , in RPG Project 14 December 2012 - - - - - - · 925 views

Mostly just wanted to post a screenshot of what I currently have.

Attached Image

The purple terrain colour is temporary and the black empty space will likely be replaced with some sort of skybox. But the basic idea for how things will look is all there.

I've replaced the green snark character I was using as a place holder with a human character. This is actually the best human sprite that I have ever drawn which may seem a little ridiculous given how simple it is. But I plan on having it so that you can change the colour of the skin, shirt, and shoes to various textures. And in a paper doll sort of fasion, I also have some bits and pieces I'm thinking can be used for some facial features that the player will be able to select from resulting in characters that look like these.
Attached Image Attached Image

The blue circles are the hands. I'm thinking they'll be sort of free floating to allow for a wider range of hand motions without having to worry about animating arms. Maybe not blue though.

But that's all a ways off as I'm still working on the game world. Until now, I didn't really have an appreciation for how quickly memory can get used up when you're working with a 3d array of objects and you start adding data members. But I think I have the beginnings of a system that I'll be able to use to add and position objects in the world. That would be all the flowers in the first screenshot. It doesn't look like much but there's actually 14k flowers scattered across the surface of the world. It may very well be that this is the beginning of running into a memory management wall that makes further progress impossible but I'm actually pretty optimistic as all the flowers didn't add significantly to the memory that's used. When I'm happy having enough basic plants I'll look at adding critters of some sort which I hope will make the world feel more alive.

Probably will be quite awhile before I get much more done, what with the holiday season and all.

RPG Project - Post 2

Posted by , in RPG Project 27 November 2012 - - - - - - · 1,210 views

When I started this project I thought I'd go with a top down 3/4 view , figuring that it should be easier to do. I've spent the past two weeks fighting with what I though should've been some simple layering.

I had hoped to be able to quickly get a video going of a character walking around the game world. It didn't take long to get an old sprite up and modify the code I had from the platformer I was working on before to work for a top down sort of world. Fought with collisions a little bit but ended up with a few improvements to the code and generally feeling happy about progress. Then I set about fixing up a little display issue I was having layering tiles and my sprite.

To start, I was just painting the terrain tiles and then my old snark sprite right on top (I'll be using a different player character eventually). Which is fine for some general testing but I wanted to have it so that the snark could hide behind the walls a bit. So I add in the code to redraw the appropriate tiles and fringe pieces and I kinda got what I was hoping for.

Attached Image

But also quickly found that I wasn't redrawing all the pieces I needed to be.

Attached Image

I thought about the problem a bit.
- The lower fringe pieces need to be redrawn on top so the snark appears behind a wall.
- The left and right fringes need to be redrawn on top so that the snark appears to emerge from behind the wall.
- The upper fringes should not be redrawn so that the snark always appears on top.

When I coded for this I found that as I travel up through a 1 tile wide hallway, the snark is hidden by the left and right fringes. Not really a problem until he approaches a turn or dead end where the upper fringe is displayed. At that point you find yourself with the same sort of layering issues you see in the second picture above (sorry I don't have an image handy).

I think I went between redrawing and not redrawing the side fringes once or twice and was getting frustrated. I tried to remember what I've seen in games with a 3/4 view with this sort of hiding behind objects thing. I don't know if my memory isn't reliable enough or if I didn't Google hard enough but I couldn't really think of examples of what I'm trying to do. I could only think that if anything came close, you were probably able to hind behind a wall but you wouldn't be obscured by left and sides of fringes. Either your character is always drawn on top or the sprites are such that they will always fit between any corridor walls
with no fringe layering taking place.

After a few of tries at techniques I could think of, I ended up approaching the problem with acceptance that you won't be able to hide yourself as completely by a wall. You could walk behind a wall fringe but that fringe's depth is small enough that you don't end up walking down far enough to start worrying about the left and right side fringes. This means that the space that a wall tile takes up is effectively greater than 1 tile. This ends up with a just bit of a depth effect and means I don't have to figure out all my tiles again. In order for it to work right I also had to expand the collision rectangle a bit and track whether or not a character's move was successful or not. If the character is unable to move left or right as intended, he appears on top of the fringe pieces that he'd otherwise appear behind. So far, so good. At least, it's good with only 1 character to worry about.

I'm not really sure what completely hiding stuff behind walls would really add to game play anyway. That might be just a sour grapes thing, but other than looking kinda cool, what am I really going to do? Make chests you need to complete a quest impossible to find? Maybe hide such that they leap out and kill you with no chance to react? I'll take the little bit of appearance of depth I got out of it and leave it at that.

Gonna have to get a YouTube thing set up so I can link in the videos better. In the mean time, I'll have to add it to my gallery this way I guess.
20121124 2310 37

Starting another project

Posted by , in RPG Project 04 November 2012 - - - - - - · 822 views

Creating an RPG has been something I've taken a stab at a couple of times before and I've decided to have another go at it. Like before, I'm probably overly ambitious and overly optimistic but like before I'll probably have fun giving it a go.

The focus for the past few weeks has been world generation. I'm going with this idea where you play on isolated islands. To generate the island I'm using the Accidental Noise Library to generate the shape and establish the depths you can descend. I'm also using it to establish a few levels of caves that you would go adventuring in.

I have a video of what I got so far that I'll try to attach it here (haven't done this before). It doesn't seem to come up when I view this post but the video is in my gallery if you click on where it should be. If anyone can tell me how to fix this, please let me know.

RPG World Overview

But... um...

I do think there is a bit of an awkward thing to mention though. The plan I've had for this game seems remarkably similar to a couple posts I've read here lately. I know that given the same idea, two people are unlikely to come up with the same result. Especially if you're working on a solo project. But I hate to give any sort of sense that I might be stealing someone's idea. I've actually had this idea for some time now and it so happens that this is the time that I have anything to show. I wanted to do a journal post where I could show a video with a character running around on the island surface and descend into the caves. But I figured maybe writing now might be the better way to go.

The Game Idea
The main direction of the game is magic and its discovery. I was initially thinking a rougelike sort of a thing where you'd have to figure out how to put together randomized recipes for potions and randomized rune combinations for casting spells. You would find and collect the various componants and through experimentation and by periodicly revealing clues to recipies, the player discovers spells and they are then available for memorization and use while exploring.

I'm also planning to include some survival and construction elements. Yeah, I know, who isn't these days? But I'm hoping to use both resource collection and their use as driving factors in the game. I think scarcity is an interesting element and I want to use it as a driving factor in the game. I'm hoping that I'll have something where it will get more interesting as the player seeks to become more powerful. There will likly be a way to leave your starting island to seek additional resources but it will probably be expensive and have defensive drawbacks.

Anyways, that's the basic plan for the next while. If none of it comes to be, I hope at least I'll end up with various elements that will be useful for future projects. The next step is to have a character that you can have running around the island. Then I think need the beginnings of an item system which I'll use to get some landscaping in. Where things are likly to go wrong would be that I'm flying by the seat of my pants here. I have an idea of how I want the magic system to work but I'm much less sure about the spells themselves. And though survival is planned to be a driving element, I'm sure I'm going to need something that can be thought of an end.

January 2017 »

1516171819 20 21

Recent Entries

Recent Comments

Latest Visitors