🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Time for some python scripting...

Published August 27, 2014
Advertisement
Tonight my daughter went to bed early, and my wife want to do her stuff, so I have time for working on my project.

Now I rework how I generate my bitmap font. Generating the font sprite sheet is quite straightforward, but I was stuck at generating the sprite list description file : it's not easy to write a bash script that generate a bunch of lines computed using the same formula except for two lines shuffled in the middle.

So I was idly browsing the net, distracting myself, until it crossed my mind that I am not obligated to use bash for any scripting : in my case, python is more suited, as i can loop through a range of number and do a special processing if the value is in a list of special values. As it remains some basic scripting, I just add to find how to get arguments from the command line, and verify the syntax to use on the go. It is still very crude, but I am not writing an application here, so as for me it's ok like that.

I have now a working script, and more importantly, I used the right tool for the task (well, at least a tool that fits better than bash).

It's time to get some sleep now (=.=)
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement