Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 1 more developer from Canada and 12 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!






RPG Project - Post 7

Posted by kseh, in RPG Project 02 May 2013 · 311 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.




September 2015 »

S M T W T F S
  12 3 45
6789101112
13141516171819
20212223242526
27282930   

Recent Entries

Recent Comments

Latest Visitors

PARTNERS