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

More engine stuff

Sign in to follow this  
baldurk

99 views

Well the engine base is about done now. I've got most of my old code moved over, the things I haven't move over I'm planning on rewriting. The only really interesting thing I've done since (aka screenshot worthy) is my new texture filtering/generation stuff:



That's generated from the wood texture only. All I do is print out the 4 to a texture (using freetype), then copy it to another texture, blur it, invert the colour and offset it to create the drop shadow. Finally just put it all together.

As a shortcut I have the 4 saved as a file, so the code is as follows:


// ...
TextureData data, data2, data3;
Texture gentex3;

data.Load("4.png");
data2.Load("4.png");
data2.Invert();
data2.Translate(Vectori(8, 8), Vectorf(0.0f, 0.0f, 0.0f, 0.0f), false);
data2.Blur(8);
// data = white 4, data 2 = shadow
data.Blend(A_ALPHA, A_INVALPHA, data2);
data3.Load("wood.tga");
data.Blend(ONE, A_INVALPHA, data3);
gentex3.Load(data);

// ...




I also have a perlin noise generator in there for use.

The next plan is to reimplement my scripting language which will then pave the way for console support, as well as a scripted particle system. After that, who knows. I'd like to play around with some shadowing techniques, or maybe some more advanced lighting with normal mapping etc, but I might make sure my engine works just as well for 2D rendering and non-graphical programs.
Sign in to follow this  


1 Comment


Recommended Comments

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!