Inspired by the great folks at despair.com
What “The Land Before Time” taught me
17 05 2009Comments : Leave a Comment »
Tags: demotivator, despair, great valley, Land Before Time
Categories : Hobbies, Huh?
Best oldschool RPG ever: Exile III
4 03 2009Exile III was one of the most amazing, nostalgic games which I still play. It’s based on old D&D character creation, but with some unique differences in skills, etc. The point is that you level up your party while you are exploring the surface world. You’ve been banished to the underground “pit” civilization called “Exile”.
You are an adventurer party which explores the surface, reporting back to your Exile coordinator about the things you find up there.
Things get complicated as the story progresses, but it’s very heavily open-ended in the game play style. You literally go where your little heart leads you, finding out more and more about the surface in a very non-linear way. There are tons of “side” plots that you can discover. As time progresses, cities and towns literally become overrun and sometimes destroyed by the forces at work in the world, keeping you interested in the world you’ve become a part of.
The game came as a trial, which impedes you from travelling further north than an predefined invisible line. I won’t promote pirating a serial key or an EXE patcher, but let it be known that I have seen one of the latter once upon a time, and the game was remade as Avernum (which I didn’t like nearly as much, for several reasons) and so Exile III has been cast aside.
The game comes with a save-game editor, which is pretty sweet. Most of the good stuff is enabled only after registering, but you still get several freebies like “heal hp/mp”, or “make towns forget you” (for those times where you decided to lead an assault on those innocent citizens of the town, thereby invoking the never-dying wrath of the town’s guards). Of course, no game is fun if you cheat your way through it, but at the same time, no game is fun if it is mercilessly hard with no hope for success if you’re ever in a weird jam.
Some notes about the playing the game:
- The installer you download from the Spidersoft page is actually more like a self-extracting exe. So, when you run it, it will expand the *real* installer into the same directory, so make a temp folder first and place the “exile3v10.exe” file into it before running it. After extracting run the “INSTALL.EXE” program to begin.
- The installer is a bit archaic, and defaults to the C drive, no matter what your main drive is.
- The installer can’t install to a directory with spaces or hyphens in its name. It’s no problem though, if you install it someplace easy first, and then just move the installed folder to the spot where you want it (including paths with spaces).
- All of the graphics are just bitmaps in the local game directory, so you can edit them to be whatever you want!
This makes for some fun edits, like making one of the characters a giant Yoshi, or something. My personal idea for a character set will be posted soon for anybody to download
- Vista and Windows 7 sort of molest the game, so I just set it to run in compatibility mode for Win95, and everything got better.
I guess that’s all for now
Comments : Leave a Comment »
Tags: Exile III, Ruined World, Spidersoft, vista, windows, Windows 7
Categories : Games, Hobbies
LINUX: Set root password
31 01 2009So, this isn’t tough stuff, but any gui-loving user will find themselves in shambles when put in front of a l?[ui]n[iu]x (pardon the regex) terminal. That is to say that it’s OKAY if you’re good “at computers”, yet you can’t fumble your way around a unix-style terminal.
I recently set up my own headless (no GUI) Ubuntu Linux, 8.10 server edition on an old computer I have lying around. I decided that making it run Apache and my personal SVN repositories (while doubling as a 160gb backup drive
) was a good idea. Problem is, after I got it all set up, I of course have no decent programs, and suddenly find myself wanting to browse the web on my new server box, to find the appropriate urls to feed to the ‘wget’ command. And I’m tired of pushing my monitor’s “switch input source” button.
By default, Ubuntu tries to abstract the root account from you by letting you perform “root”-ish operations with your own account, using the sudo command. But sometimes I just want to be root for an effing minute while I do stuff. By default, Ubuntu comes with no password on the root account, meaning that it also won’t let you sign in with it directly. Blank passwords are a no-no.
$ sudo passwd root
^^ that ‘$’ is the intrawebs’ way of saying “this is the start of a unix command-line thingy”. And that’s the technical term, trust me.
This is actually the command to change ANY user’s password, but it just so happens that you’re changing the root password, so you of course need the all-powerful pixie dust of the “sudo” command. If you were root already, or some other empowered user, you would only have to type:
$ passwd USERnameGOEShere
And it would prompt you for the new password. But again, if you don’t have good enough authentication, it’ll make you do “sudo” in front of it, or be root altogether.
As pointed out by Dave in the first comment below, the “sudo -s” command is a way to obtain sudo permissions for a more extended period of time. If that’s all you want, then go for it. But if you’re looking to actually give the root account a password, then you’ve gotten your instructions already.
Comments : 2 Comments »
Tags: Linux, passwd, root, sudo
Categories : Hobbies, Linux, Ubuntu
Java: Count instances of a substring
6 01 2009Despite my distaste for Java, I work in it every day at e-kiwi (author of software Screen-Scraper).
As usual, I was surprised to find that Java has no easy way to count the number of occurances of a substring within a given String variable. I Google’d it and was surprised at the first result’s poor coding. It had a ‘while (true)‘ loop with a goofy break statement tied to a misleadingly-named variable.
Try this:
public int countIndexOf(String text, String search)
{
int count = 0;
for (int fromIndex = 0; fromIndex > -1; count++)
fromIndex = text.indexOf(search, fromIndex + ((count > 0) ? 1 : 0));
return count - 1;
}
Pardon the ternary operator in there, but Java doesn’t like making boolean-casting-to-int easy.
If there are any errors you encounter, just let me know and I’ll fix it. My use for such a function doesn’t require the ‘border’ cases where substrings are at the beginning or end of the main string. If you know that you don’t need to match a substring which will begin at the first character of the main string, you can change the ternary part from:
fromIndex + ((count > 0) ? 1 : 0)
to just
fromIndex + 1
Sorry to the dude that I flamed on his blog, but poorly written code is easy to find these days. Idioms are the way to go. Java’s slow enough as an interpretted language that it doesn’t need extraneous if-else statements in ‘while (true)’ loops and incessant variable assignment to immutable values.
You might argue that it doesn’t really matter if you lose a few cycles on today’s machines, but programs should be as efficient as possible when it’s worth the time. You may as well take a few minutes (or even an hour) and figure out the best way to do something. Forethought with save you an amazing amount of time in the future when you develope real programs and not just school assignments.
Comments : 7 Comments »
Categories : Hobbies, Java, Programming
Python, MySQL, and a dictionary
19 12 2008Here is a line in python that should be recorded for posterity…
Some background. I have a multilingual database where several tables exist. Each table is named after a particular “vocabulary” for my website. For instance, there’s a “forums” table for all the terms that are used for pages related to the forums. The purpose of having this table is so that I have all the needed terms very isolated into a nice hierarchy. The SELECT * sql would look like this.. (pardon the fake spanish translations)
mysql> SELECT * FROM forum;
+---------------------+----------------------------+------------------------------+
| ID | enUS | es |
+---------------------+----------------------------+------------------------------+
| Audio Review | Audio Review | |
| by | by | [by] |
| complete | completed | [completed] |
| current | current | [current projects] |
| dropped | abandoned | [dropped] |
| loading | Loading... | [Loading...] |
| no | no | no |
+---------------------+----------------------------+------------------------------+
As you can see, there is a column “ID”, which is what I use site-wide to access a term, and I select only one other column, according to the language code the user has his/her preference set for. Thus, a general select for such a thing is …
mysql> SELECT ID,enUS FROM forum; +---------------------+----------------------------+ | ID | enUS | +---------------------+----------------------------+ | Audio Review | Audio Review | | by | by |
… etc, etc. Then, I just used PHP to fetch these results into an associative array. I would then have to loop through each record, saving whatever is in the $row['ID'] spot as a key to this array, and whatever is in the $row[currentLanguage] spot as the value to said key.
So anyway.. I was trying to achive this effect in python; a Dictionary-type object where I can simply index into it with the term that I want, in order to get the language-translated value represented by the term. I knew there had to be a way to do a famous python one-liner, and since those one-liners typically clock much faster than manual loops..
resultSet = (map(None, row.values()) for row in rows)
Seems simple, but it’s a hassle to work it out when your data is a tuple of dictionaries
Comments : Leave a Comment »
Tags: forum, map, MySQL, MySQLdb, php, Programming, Python, translation
Categories : Hobbies, Programming, Python
Miko’s Blog, straight out of Hamamatsu, Shizuoka, Japan
15 12 2008One of my interests is languages. Included in that is Japanese. Perhaps some of you may shun me for claiming I like Japanese, yet I don’t fit that anime-addicted mold that tends to be the basic framework that Japanese groupies persue. Truth be told, a person can like, and even love, a language without fitting such a mold. I prefer not to deign to any insulting level, though, so I shall move on before my tounge starts cutting people.
My wife speaks japanese. I’ll leave it at that.
Each week I read a blog by a japanese woman named Miko, who has a talent for posting just the sort of stuff that I find interesting… it’s not the web-log (blog) of an uber l33t hackzor with an anime collection to rival those that I would insult in paragraph 1. Instead, it’s a normal person with normal experience, yet who finds fun things that are (in reality) little jewels of interest. I think the blog is great
http://en.challenge-coin.co.jp/blog/
Enjoy, if you choose to so do.
Comments : Leave a Comment »
Tags: japanese
Categories : Hobbies
Music
5 08 2008I’m a muscian, normally, but I’ve been on holiday as of late, since I no longer have a guitar to work with, and my sound board is far far away. I moved to Utah a few months ago, and I don’t yet have all of my stuff with me. *sadface*
I had been doing some songs to put together a CD I was calling “What Have We Done With the Keys?” The tracks I have recorded (at least in part) are as follows:
- Maudit
- And You’ve Gone and Told Love’s Secret (You Fool)
- Lock Down, Move On
- Acutally, ‘Sorry’ Wasn’t the First Thing that Came to Mind
- Aspirations
- The End of Tribulation
- Thievery Sends its Best Regards
Other tracks have been “in the works”, so to speak, but without my tools, I can’t build anything of any use. That last track, “Thievery Sends its Best Regards” was done in FL Studio, since I don’t have my actual instruments.
Check out my music page a BandAMP.com for the whole song listing page. It’s a nice little forum-based community. My songs are set to only allow members to download them, but signing up is drop dead simple, and you won’t get a shred of spam from them. I helped build up the site, I know
Comments : Leave a Comment »
Tags: BandAMP, FL Studio, guitar, Music, recording, TonightsLastSong
Categories : Hobbies, Music
Finite Dreams 0.1.23
5 08 2008I’ve recently taken on some 3d programming with a set of libraries called “panda3d“. They’re quite nice, and I’ve been impressed with it all so far. The main interfacing language is Python, although many of the libraries themselves are written in C++, for speed’s sake.
Ever since (about) highschool, I had this vision of creating my own RPG. Originally, my naive idea was to make a sequel to the beloved SNES game Chrono Trigger, but then it hit me one that day that…
A) I’d be an idiot for trying to make a “sequel” to a copyrighted video game produced by a largely successful company based out of Japan
B) I felt silly for trying to be “new” and “on the edge of discovery” while only (at best) attempting to extend the ideas of a genius other than I.
C) You don’t just “make a sequel” to your favorite video game. That’s childish.
While all of the above sound pretty similar in nature, all three hit me differently, and I ultimately decided to completely redo the “story” that I had invented. I had been drawing characters for use in the game for a long time, yet I still decided that even those needed a make over.
And over the next 3 years, the idea for Finite Dreams (FD) had been in the making. (The name is kind of tentative, since I came up with it a while back, and I don’t think that I like it much anymore.) Games from all over the spectrum (a few of the more relevant examples: Kingdom Hearts, Dark Cloud 2, and Final Fantasy XII) had developed ideas at the same time as myself, and I constantly found myself playing a brand new game that had come up with my ideas before I had. *grr*
But now, I’m creating “my” game. I’m not recreating someone else’s ideas, or implamenting them differently, or even doing them “better” than in some other game. I’m making my own ideas, and it’s coming along nicely… Unfortunately for me, I had to begin learning Python, but now I love it. It makes me *hate* Java all the more. *shudder* ooooOoooOOOo, Java, how I loathe you. But the guys at work hear me rant enough about Java, so I shan’t do it here.
I’ll be sure to post some actual content eventually. For now, I’m getting the engine up and running. While I’m a one-man team, I do hope to make some good progress, even if it takes me ages. I’m an artist, muscian, programmer, modeler, and storywriter, all wrapped up into one. I love every single one of those elements. I can’t wait to hit every milestone along the way.
Comments : 5 Comments »
Tags: c++, Finite Dreams, game engine, java, panda3d, Programming, Python, video games
Categories : Finite Dreams, Games, Hobbies, Programming, panda3d




