https://github.com/acaranta/achievementgenerator
CGI to create/show achievement XBOX/PSN Style with custom text/Score/etc
https://github.com/acaranta/achievementgenerator
Last synced: about 1 year ago
JSON representation
CGI to create/show achievement XBOX/PSN Style with custom text/Score/etc
- Host: GitHub
- URL: https://github.com/acaranta/achievementgenerator
- Owner: acaranta
- Created: 2014-07-29T09:02:12.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-29T09:35:10.000Z (almost 12 years ago)
- Last Synced: 2023-06-29T23:10:21.563Z (almost 3 years ago)
- Language: Perl
- Size: 699 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Requirements
---------------
Software :
- debian/ubuntu : perlmagick
- other/CPAN : Perl::Magick
- and obviously apache2 with perl module enabled
Rights :
the only really needed right is theon the cache directory which must be readable AND writable by apache
Usage
---------
point your browser to
`http:///generateimage.pl?`
where parameters are :
- Common Parameters :
- mode=(xbox|ps3)
- locale=(en|fr)
- text=
- size=[0-9]+ ... Sets the output image width
- date=[0-9]+.[0-9]+.[0-9]+ ... Adds the date entered as a watermark
- XBOX Specifics :
- point=[0-9]+ ... this allows to show a GamerPoint earned score
- PS3 Trophies
- level=[0-3] ... this allows to change the level of the trophy ranging from 0 to 3... which is from bronze up to platinum
if the parameters are omitted then they are set like this by default :
- mode=xbox
- locale=en
- size=about 450px
- point=0 ... nothing shown
- level=0 .. bronze
How it works
--------------
It uses ImageMagick, several pieces of images and fonts to generate mockups of achievements/trophies well known of gamers.
The image is directly returned as an 'image/png' with transparency.
The nice trick is that if the image is asked (with its parameters) asked for the first time, it is generated, stored in the cache directory and returned to the browser.
Every other time the same image/parameters are asked, it is read from the disk insted of regenerating it completely
Examples
---------
- `http://example.com/genachievement.pl?text=XBOX Rulez&point=5&date=08/04/2014&locale=en&size=400`
- 
- `http://example.com/genachievement.pl?mode=ps3&text=PS3 Rulez Too&level=1&date=08/04/2014&locale=en&size=400`
- 
Future / TODO :
----------
- Allow easy configuration
- [XBOX] Allow change of logo
- [XBOX] Allow differente Player LEDs configuration
- write a generator wrapper, html forms etc
- [PS3] Allow easy change of the logo used
- Allow a way to return directly an url to the cached generated image
- add a nocacheparameter
- add a way to empty cache (?)
- review system to deliver static urls ?
- Add XboxOne/PS4 Styles