Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Finally, some good tile art

Sign in to follow this  
Sir Sapo


Hey everyone!

Well, I wrote this post last night, but because someone (*cough* Mark *cough) uploaded the images to the wrong directory, and I couldn't find them, I decided to wait. Anyways, while browsing through our server out of boredom, lo and behold I found the images, and was able to integrate them into the game, which is all I needed to make today's screenshot.

So now I'll talk about how my work on the coding front has been going. I've spent the last 2 days working on two problems: Animating Ship Movement, and Calculating if a path is valid.

Animating Ship Movement
You couldn't tell in the screens, but until now, whenever a ship was moved from tile to tile, it transported itself instantly, which was an unfortunate byproduct of the way the maps are handled. The maps are made up of a bunch of tile structs, each one containing a pointer to a "Ship" object. This system makes it easy to attack, move, etc, because all you have to know is the origin tile, and the destination tile. Unfotunately, when I tried to get the ships to animate from one tile to the next, I ran into a bit of trouble, but after a lot of thinking I discovered the way. Now, whenever a ship is moved, it finds the pixel offset from the destination tile to the origin tile, and then offsets the drawing of the ship back to it's old position, even after it has moved tiles. Then the offset is reduced, until it reaches 0, meaning the ship has reached it's destination. It may sound simple (or stupid...), but it took me hours to get that working.

Calculating if a path is valid
This took me so long, I don't even want to talk about it, all you need to know is that for some reason, casting a 2D ray took me 2 days to perfect... Yeah.

Other Little Things
Today I wrote the code that displays movement and attacking radii, or whatever the hell the plural of "radius" is. Anywho, you can see the results in the screen at the bottom of the post (minus the attack radius, I had some trouble with it and it looks crappy right now). I also finally fixed an elusive crash bug that crashed game when a ship moved. Turns out that the problem was a null pointer reference in the pop-up menu system, which is checked when an action is performed... yeah that one took me awhile.

Anyways, Mark figured out a way to quickly scale down the large-scale detailed images, and make them into tile images, so lucky you, you don't have to look at my crappy images anymore! He also is working on the sidebar, but we haven't finalized the stats yet, so that may take awhile to get a screen of. Well, enough talk, take a look at the newest screen showing off fancy stuff such as... the smart cursor (saying go), a calculated path(the green line), a move radius(the green blocks), and movement that you can't see because its a picture.

You may have noticed that the asteroids are now gray, thats because the "Fact Police" cornered me the other day and explained that asteroids aren't actually brown, what kind of bullsh*t is that[wink].

Well in other news, I watch the movie Hostel yesterday, and it was pretty gross. It actually wasn't as nasty as I was expecting it to be, but it still makes me cringe to think of what happens in the movie, but all in all it was pretty cool.
Sign in to follow this  


Recommended Comments

I'll say it now, and I'm quite sure many more times in the future, looking great. Keep it up, I'm excited to see someone here working on a Turn based strategy game.

Share this comment

Link to comment
Thanks, it's nice to be working on something other than an action or shooter game, its like a breath of fresh air[grin]

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!