Jump to content
  • Advertisement
  • entries
  • comments
  • views

Textures and fighting with the editor

Sign in to follow this  


Fairly quick update today. I've added support for basic diffuse texturing to both the level editor and the game. The editor is very much bodged to support, but the game is handling it properly.


I've added Texture and TexScale properties to the StaticMesh entity type. You can see them ringed in the next screenshot:


At the moment in the editor the available texture (grass) is just hardcoded loaded, like the proxy meshes, but can add some UI for this later on.

So you just set the texture string ID on an object ("grass") and set the TexScale to size the texture correctly, and its good to go.

What I have had to do is, on export to the game file format, output multiple "internalmesh" objects, grouped by texture so that you end up with a mesh per texture. The game was already set up to load multiple internal meshes and static mesh instances, so this was pretty seamless from the game side.

I've also added a feature to the editor so that whatever object(s) are selected shoot a ray down from their centre to the nearest floor.


Makes it a lot easier to see where things are in the world and was a pretty trivial change, since I already had all the ray casting against entities code working for the select tool.

That's all for now. Thanks for stopping by.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!