Jump to content

Texture based Advertisement System alpha


jyrno42

Recommended Posts

Something i'm making for Phoenix. It consists of a module which can create a texture archive from png sources with lua, and two scripts, one of them is just a container for images and the other does the work.

The module is a compilation of TexureWriter and helper classes by me & JorX and gd libary for the image creation part. I also used a libary called squish to compress the textures in archive to DXT1.

Anyways heres the video of what i already have... :)

Link to comment
  • 3 weeks later...

Is it just text on blank images, such as the one in your video, or can any image be used? This is pretty awesome, and honestly could even lead to some pretty interesting new systems. I've heard of companies paying to advertise in video games, so this could open up something similar to that for server owners that wish to make a little money to help pay for the upkeep of their server. This could also be very useful for certain gamemodes and events, not to mention helpful in RP servers. :)

Very nice work man. That's impressive!

Link to comment

GD libary offers various functions to deal with images so you could indeed use various background images and even drawing or etc. So to answer your question, yes, any image can be used to create the ad... But since i haven't ported all the functions the module only has the following ones...

  
bool/int createTxdContainer( void ) 
bool txdContainerAddImage( int container, string name, string filePath[, bool compress, string alphaname] ) 
bool saveTxdContainer( int container, string fName ) 
  
bool/userdata imageCreateTrueColor( int w, int h ) 
bool/userdata imageCreateFromPng( string File ) 
  
bool imagePng( userdata im, string fPath ) 
  
bool/int imageColorAllocate( userdata im, int red, int green, int blue) 
bool/int imageColorAllocateAlpha( userdata im, int red, int green, int blue, int alpha) 
  
bool/int imageTtfText( userdata im, int size, int angle, int x, int y, int color, string fontFile, string text) 
bool/int imageTtfBBox( int size, int angle, string fontFile, string text) 
  
bool/int imageFill( userdata im, int x, int y, int color ) 
  
bool/int imageDestroy( userdata im ) 
  

PS: Im hoping to upload another video at the end of this week which will show the first usable version of my Advertisement Script.

TO NeedSumHelp:

Eestlane jah, serveriks on Fööniks mis veel küll arendusjärgus.

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...