Finally, some good tile art

Published January 25, 2006
Advertisement
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.
Previous Entry Two in a day!
0 likes 2 comments

Comments

Stompy9999
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.
January 25, 2006 09:42 PM
Sir Sapo
Thanks, it's nice to be working on something other than an action or shooter game, its like a breath of fresh air[grin]
January 26, 2006 05:56 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

!

1181 views

'Roids

1525 views

Post Dva

1302 views

Untitled

1139 views

I'm a sad panda...

2154 views

Untitled

1042 views

Progress

1085 views

Angels 2X!!!!!

1506 views

T3H Progress!

1331 views

ZOMG!!!!

1210 views
Advertisement