• entries
    743
  • comments
    1924
  • views
    580416

Graphics working

Sign in to follow this  

385 views

tbs2.jpg

Got graphics working properly now. Just using some place-holder stuff I drew a few years ago for some daft RTS I was working on.

Decided to go with the slightly-Y-offset approach a la old school RPGs. When rendering, I have the map grid and also a bucket grid of vectors of IDs of characters. Before I render, each character places itself in the bucket on the basis of the following:


void Creature::AddToBucket(BucketGrid &Grid)
{
int X=Pos.X/48;
int Y=Pos.Y/48;

if(Offset.X>0) ++X;
if(Offset.Y>0) ++Y;

Grid(X,Y).push_back(Id);
}


Then when rendering each map cell, after rendering the cell I render every character whose ID is in the bucket for that cell. Seems to work okay.

There is now a list of creatures on the map and you can select any who are on the player's side and move them around using the path-finding mechanism. Enemy players block routes but not line of sight and you can click on an enemy to walk to the closest adjacent square.

Currently trying to scheme some way to improve the fog of war effect using shaders but no real clear plans on that at the moment.

Load of old bollocks really. Now going to play Splinter Cell: Chaos Theory for a bit. Just been speaking to my phone provider and begging them not to cut me off for non-payment of bills and they were quite helpful really. In the process of getting a debt relief order sorted to clear the GBP3k+ that I owe but at least making positive steps forward. Can't lose the phone number though.
Sign in to follow this  


0 Comments


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