Jump to content
  • Advertisement


Sign in to follow this  
  • entries
  • comments
  • views

Verts as a seperate class

Sign in to follow this  


I have decided to put the verts (the graphics that are below the 'tile', or the sides off the tile) in a seperate class. This ends up making it so that if people want to have a graphic that is bigger than 8px they can.

I just tried to implement it and completely messed up my code... had to load from last night's backup it went so badly. So I'll try again tonight. But by putting the verts in a seperate class it makes it so that you can have a tile that is 1px high, right next to a tile that is 15px high. This will mess up my tile shading, so I tried to implement a new way to shade by hight in pexels.
Overall by doing this it will make the engine lots better.

So in my Tracker class (the class responisble for keeping track of the tiles, verts, and actors, not their graphics, but rather where they are) I will have a new HashMap for the Vert Objects. Then, in each of the Tile object there will be a reference to the Vert that it uses.

By adding verts into its own class it means that I will also have to add a way of editing each of those verts (currently each tile has a vSck (VertSpriteCacheKey), and a height (usually a hardcoded value of 8).

Anyway.... back to school...


Alright! got it working! Now each tile can have it's very own vert with different Heights. But oh no!!!! now all my walk paths need to be set up on a per pixel basis.... arg...
Sign in to follow this  


Recommended Comments

There are no comments to display.

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!