Thursday, November 17, 2011

You Gotta Pay Your Dues If You Want To Sing the Blues


"I am the entertainer,
And I've had to pay my price.
The things I did not know at first,
I learned by doin' twice." 
                    - William Joel

A couple of weeks ago, I wrote at length about the 10000 Hour Rule, which can be stated as follow:

To master any non-trivial field requires 10000 hours of dedicated practice and study.

The previous post was about the rule and why I think it's a true thing. I also wanted to write a bit about how this rule applies to the creation of computer games, which, believe me, is an endeavor that takes many years to master.

How the Rule Applies To Professional, AAA Game Development

Big game companies are infamous for eating their young. They scoop up young people that don't know any better, make them work insane hours for crap pay, discard them when they burn out, and harvest a new crop of workers. There are few elder statesmen who stayed around long enough to get really good at what they do. Alas, most of the rank and file get driven off before they put in the years necessary to get really good.

So if you've ever wondered why games tend to be so derivative and make so many of the same mistakes again and again ...

How the Rule Applies To Indies

When an indie developer nobody cared about suddenly breaks out and releases a hit, kickass game, you know what I love to do? Find out how that sudden superstar spent the years learning to make a good game.

Every successful indie developer has a pile of relatively rough old games they cut their teeth on. Notch (Minecraft) does. Jonathan Blow (Braid) does. Petri Purho (Crayon Physics) does. I sure do. John Carmack and John Romero made a pile of games you never heard of before they created Wolfenstein 3-D and Doom.

It's necessary. You can't just make a good game from scratch. You have to spend years working at it, writing stuff that you probably won't be very proud of. I count myself very lucky that, when I was writing my early RPGs, there was pent up demand for them. Enough so that even my rough, subpar goods were able to generate a living.

One More Example That Amuses Me

I only just heard about an upcoming Indie RPG called Driftmoon, being developed by a small company called Instant Kingdom. Hey, why shouldn't they write an Indie RPG? Everyone else is.

I'd never heard of them, but I looked at the gameplay video and the screenshots and thought, "Hey, this looks really nice. I bet this isn't their first game."

Then I looked at their older games. Five of them, each one a little nicer than the one that came before. It's awesome to look at. You can almost see the learning.

(Oh, and you can see the couple who runs Instant Kingdom here. I don't want to sound crass, but these are two seriously attractive game developers. If I was running some Association For the Advancement of Indie Games or something, I would put those two on a poster in a cold second. The caption would be, "Indie Game Developers - WE'RE NOT MONSTERS!")

How the Rule Applies To You. (If You Want To Create Games.)

So if you're one of the many enterprising young folks who ask me about getting into this business, learn from the above. Write games. Lots of them. Don't worry about aiming too high. Don't do your ultra-mega-epic yet. A bunch of varied, small apps is a great way to learn, and you'll get a bunch of your failures out of the way early.

It's a lot of work, but don't despair. Hey, I built a career on a game that looked like this. If that can happen, than you, a person I suspect is at least as intelligent and driven as me, totally has a shot.

Sunday, November 13, 2011

ORA-23515: materialized views and/or their indices exist in the tablespace

SQL> drop tablespace TEST1 including contents cascade constraints;
*
ERROR at line 1:
ORA-23515: materialized views and/or their indices exist in the tablespace

Now you have to drop all materialized view in this tablespace to drop this tablespace.

SQL> drop materialized view  <MV_NAME>
 
Materialized view dropped.

Elapsed: 00:00:01.70
 
SQL> drop tablespace TEST1 including contents and datafiles;

Tablespace dropped.

Elapsed: 00:00:01.37
SQL>

Thursday, November 3, 2011

Geneforge Saga Now Available On Steam!


When Steam started to carry Avadon: The Black Fortress in August, it was a big thrill for us. The money, the prestige, the ability to feel like real developers. It's awesome. And it didn't stop there.

On Wednesday, Steam released another of our games. Well, five games. You can now go to Steam and, for twenty bucks (20% off the first week) get our entire Geneforge Saga.

The Geneforge Saga is a series of five huge fantasy RPGs, telling one epic tale of rebellion, war and devastation. I am immensely proud of these games. Sure, they are old and very low budget, and the earlier games have pretty rough interfaces. They're also genuinely innovative and cool, and I'm thrilled that a bunch more people can be exposed to them.

I wanted to write a little bit about them and what I think makes them unique.

1. The Setting

People often complain, with good reason, that role-playing games are too mired in fantasy. I have always lacked the courage to totally break out of the fantasy thing, but I've tried really hard to push it as far as it will go. For example, we wrote Nethergate, which was a fantasy game in an actual historical setting: ancient Britain under Roman occupation.

Geneforge was originally going to be science fiction, until I realized that it really would work better as fantasy. It is based in a world ruled by the Shapers, a secretive sect that used magic to create life. Intelligent plants, servant humanoids, living tools. The games are about what happens when the creatures they make to serve them decide to rebel.

The player is a Shaper, and the characters in your party will be loyal mutant monsters made by you. Older gamers play Geneforge for the story. Younger gamers play it because you get to have an army of fire-breathing dinosaurs.

It's a unique setting, and I think it's really cool. And, I don't deny it, I had several strong influences when I made it.

2. The Morality

The Geneforge games are very morally open-ended. I have long been annoyed with fantasy's over-reliance on characters who are all-good or all-evil. I wanted to write a game where you could play through the whole storyline looking for this guy who is evil, meet the guy, listen to his side of the story, realize he has a point, and join him. And I did. It's called Geneforge.

The Geneforge games are full of factions you can join. Some are sensible. Some are insane. Some are peaceful, and some are violent. Only a few of them are truly bad people, trying to do horrible things. I tried to be truly even-handed when making the factions. When writing them, I always had them make the case for their point of view as clearly and convincingly as possible. When I wrote a faction, I was really trying to convince the player to join it.

This is what I am most proud of about Geneforge: I have gotten many e-mails that said, "I loved the games, but I had one problem. I joined [some faction], but I thought you made it too obvious that [that faction] was the right faction and I was supposed to join it."  They were all convinced that I was secretly supporting their own pet faction. Hee!

3. The Open-Endedness

I wanted the Geneforge games to be as open-ended as possible. Play by yourself or with a group. Use magic or melee. Use combat or get by with stealth and diplomacy. Join the rebels or the Shapers. Even play as a pacifist and never kill anything outside of the tutorial. Writing the games to allow this much freedom was truly maddening, but the result was something unique. (And I had one very specific, awesome influence.)

Interestingly, this led to what I think are the games' greatest flaw. You see, to create paths through the world for different specialties, I made some routes that required serious combat skill and other that required lots of diplomacy or stealth or tool use skill. The problem was that, to make the choices meaningful, I had to make it so that not all characters could travel down all paths. I didn't want everyone to be able to do everything, and, for any given character, there will always be some zones they can't do.

Some players hate this. Hate, hate, hate it. To be told they can't defeat a place, it drives them nuts. Infuriates them.It's not the sort of design that appeals to all players, to say the least.

Old Games For New Gamers

Yep. They're old. They're rough. They're pretty ugly. But if you like Indie gaming for it's creativity and ability to take risks, they're worth a look. They're five huge games, an almost ridiculous amount of gameplay for sixteen bucks. And, if you just want a sample to see what's going on, there are five big demos on our web site. Hope you like them!

Friday, October 28, 2011

Three Funny Links. (And Our Sale Is Ending Soon.)

So I need to write a blog post to remind people that Spiderweb Software's Glorious October Carnage 10% Off Sale ends in just a few days. But I don't have one of my standard 1000 word infodumps ready. You see I've been busy lately trying to finish our next game and playing Catherine on my XBox. (Working title ... "I Have Serious Issues With Women: The Game.")

So I'm going to post links to three thinks I really liked. Because that's what blogs are best at.

1. An Old Short Story

There used to be a magazine called Dragon. It was ostensibly about tabletop role-playing games, but who are we kidding? It was about Dungeons and Dragons. This was back in the good old days when you could play D&D and relax and unwind and keep up with what was going on without a computer, four whiteboards, and a specially trained idiot savant. (If you ever wanted me to write a review of Fourth Edition Dungeons & Dragons, there it was.)

Every month, Dragon magazine also had a short story, for some reason. One of these stories has stuck with me because it was so amazingly prescient. It was about MUDs, but in the story they were weird free for alls and if you did the right thing you could earn game cash that converted to real money. It predicted the existence of Eve Online twenty years before the fact, and other SF writers are just now catching up with the crazy possibilities.

Someone just sent me a link to the story, so here it is:

Catacomb, by Henry Melton

Henry, if you ever end up here and see this, your work had a big, big influence on one particular misfit boy.

2. A New Video

So far, I've managed to avoid writing any blog articles on the subject of The Game Industry Might Maybe Have Woman Issues, Just a Little Bit. To anyone looking in from outside, this statement is about as controversial as saying that water is wet, but it still gets gamers really angry.

Anyway. IGN made some sort of online reality show thingy called The Next Game Boss. It's about indie game developers. That someone made a reality show (even a web one with a micro-budget) about people who want to do what I do is pretty fascinating. Not flattering, but fascinating. Because, um ... watch this cruelly edited selection of highlights from the first episode ...

Hey, Ladies! They're Still Single!

(It gets awesome one minute in.)

There are things I could say about this, but there's really nothing that can be added to perfection.

3. I Like Music

Everyone who knows me in real life is sick of hearing about Garfunkel & Oates. But you don't know me! So I can just drop a link or two.

They really broke big over the last year or so and are now making actual money (plus an HBO development deal). If you poke around on YouTube, you will find that these two have been working their asses off for years trying this and that before they broke big. They are a great example of a universal truth: It takes ten years to make an overnight success.

OK, that seems like enough content to justify a blog post. So. We're having a sale. It's over in a few days. Order one of our series on CD and you can totally get your Hanukkah shopping done early.

Wednesday, October 19, 2011

The 10000 Hour Rule.


This image appeared on my Facebook the other day, and I really liked it. (The quote is killer, and it is available at a much more readable size here.) It reminded me of a bit of wisdom I value greatly, and I'll pass that on in this blog post. Lucky you.

I am a huge fan of the many Rules, Laws, and related discrete wisdom chunks you can find on the Internet. Sturgeon's Law. Poe's Law. Rule 34. (NSFW) The Iron Law of Oligarchy. But one of my favorite, as an important lesson about How the World Works, is the 10000 Hour Rule.

I would describe this law thusly:

To master any non-trivial field requires 10000 hours of dedicated practice and study.

Sometimes, this law is stated with "10 years" in the place of "10000 hours." Or, as an old saying elegantly puts it, "You have to write a million bad words before you can write a good one."

Drawing. Writing. Chess. Singing. Tennis. Designing Games. Acting. Golf. Playing the violin. Leatherworking. Poker. In each case, mastery requires work. A lot of it.

What does this law mean? It means that fantasy you have, about picking up a guitar and finding that you have a deep, innate talent for playing and that you're the next Hendrix? It's just a fantasy. Better get practicing, pal. You got 10 long years of work ahead of you. Free lunch? No such thing.

I Will Now Deal With Your Objections

People don't like this law. People hate to be told that they can't have Free Stuff, and gaining mastery without sacrifice is the epitomy of Free Stuff. But there are several obvious objections people come up with to rebut this law. I will dispose of them now.

It Doesn't Take That Long To Master Something! I Can Master Tic-Tac-Toe in a Minute!

That's why I said it takes 10000 hours to master something non-trivial. Obviously, some things are easy, but nobody cares about whether you can do them. Learning to tie your shoes is much simpler than learning to play the violin, but nobody will pay you to watch you tie your shoes.

What About Child Prodigies? Mozart Was Composing Symphonies When He was Four!

Yeah, but nobody wants to hear them. They want to hear what he wrote later. Many, many hours of work later.

Child prodigies exist, and they can do amazing things. However, the main advantage of being a child prodigy is that you get to start putting in your 10000 hours at an early age. You still have to work for it.

But Some People Have Amazing Innate Abilities!

People need to believe that they can possibly have the innate ability to do amazing things. Some sort of magical penumbra that gives you the supernatural ability to write or play baseball or whatever. Not really.

Now don't get me wrong. Some people do have the innate ability to excel at a field. It is the opportunity, resources, and drive to put in the many, long tedious hours mastering a chosen field. It's the ability (the time, money, and energy) to sit down and work. That's the only innate ability that really means something.

So I Just Have To Spend 10000 Hours On Something and I Become Awesome?

No. It has to be 10000 of meaningful practice. Learning new things. Stretching your ability. Occasionally failing, learning from your mistakes, and improving. Repeating the same lame thing for one hour 10000 times will not cut it.

I've Hardly Spent Any Time At All Learning To Do [X], and I'm Amazing At It!

Are you sure? One of the main reasons people are mediocre at a profession or activity is that they lack the ability to recognize when they have done it poorly. One of the main things successful craftspeople and artists have in common is a loathing of their own work.

I'm not saying you aren't that great. Hey, I've never met you. But are you sure?

It's an Unpleasant Rule

The 10000 Hour Rule is about crushing dreams. It's about understanding that there are limits to what you can do in the all-too-short period of time we spend on this Earth. It's about giving people who have achieved mastery the respect they deserve. It's about, before taking on a new task, honestly evaluating whether we can afford to give what it takes to complete it. And it's about forgiving yourself for not being able to play the guitar like Hendrix.

I have a lot more to say on this subject and how it applies to writing computer games. Next time.

(If you're interested in reading more about this stuff, I've heard that Outliers, by Malcolm Gladwell, is a good read. I'm not so much a big Gladwell fan, but it's a very interesting topic.)

Sunday, October 16, 2011

Setup ssh user equivalence for all RAC nodes


This Example Done on Two Node SSH Setup:
Log on as user ORACLE on nodes. Do not give pass phrase to any of the methods below.

ON NODE 1

Step 1

[root@rac1pub ~]# su - oracle

Step 2

[oracle@rac1pub ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Created directory '/home/oracle/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
b1:24:2f:8f:5a:27:4b:ce:aa:09:ce:13:bd:d8:b1:3e
oracle@rac1pub.kasb.com

Step 3

[oracle@rac1pub ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
68:0f:79:13:76:a7:a1:2e:ce:6e:1f:a6:2b:1a:15:f3
oracle@rac1pub.kasb.com

Step 4

[oracle@rac1pub ~]$ cd /home/oracle/.ssh

Step 5

[oracle@rac1pub .ssh]$ ls -ltr
total 16
-rw-r--r--  1 oracle oinstall 613 Oct 16 23:06 id_dsa.pub
-rw-------  1 oracle oinstall 668 Oct 16 23:06 id_dsa
-rw-r--r--  1 oracle oinstall 233 Oct 16 23:06 id_rsa.pub
-rw-------  1 oracle oinstall 883 Oct 16 23:06 id_rsa


Step 6

Note: The file name should be (authorized_keys) their is no chance for spelling mistake.
otherwise your ssh will be failed.


[oracle@rac1pub .ssh]$ cat id_dsa.pub >> authorized_keys

[oracle@rac1pub .ssh]$ cat id_rsa.pub >> authorized_keys

Step 7
Now we are sending node1 ssh keys to node 2 in temporary file because to get this keys in authorized_keys file of Node 2
 
[oracle@rac1pub .ssh]$ scp authorized_keys  rac2pub:/tmp/rac1keys.tmp


The authenticity of host 'storage (192.168.1.192)' can't be established.
RSA key fingerprint is 97:b4:a8:13:a1:76:57:44:e2:0b:60:c1:b8:13:db:27.
Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac2pub,192.168.1.192' (RSA) to the list of known hosts.oracle@rac2pub's password:
authorized_keys                                                   100% 1692     1.7KB/s   00:00
 

ON NODE 2
Now you can verfiy on Rac node 2 in tmp directory file(rac1keys.tmp) should be their

[oracle@rac2pub ~]$ cd /tmp
[oracle@rac2pub tmp]$ ls -ltr
-rw-r--r--  1 oracle oinstall  1692 Oct 17 00:06 rac1keys.tmp

STEPS ON NODE 2==================================================
Note: Follow same Steps(1 to 6) done on RAC node 1


Step 7
Now we are sending node2 ssh keys to node 1 in temporary file because to get this keys in authorized_keys file of Node 1


[oracle@rac2pub .ssh]$ scp authorized_keys  rac1pub:/tmp/rac2keys.tmp
The authenticity of host 'storage (192.168.1.191)' can't be established.
RSA key fingerprint is 97:b4:a8:13:a1:76:57:44:e2:0b:60:c1:b8:13:db:27.
Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac1pub,192.168.1.191' (RSA) to the list of known hosts.oracle@rac1pub's password:
authorized_keys                                                   100% 1692     1.7KB/s   00:00



ON NODE 1
Now you can verfiy on Rac node 1 in tmp directory file (rac2keys.tmp) should be their
[oracle@rac1pub ~]$ cd /tmp
[oracle@rac1pub tmp]$ ls -ltr
-rw-r--r--  1 oracle oinstall  1692 Oct 17 00:15 rac2keys.tmp


After you have done all above now proceed further

ON NODE 1

[oracle@rac1pub ~]$ cd /home/oracle/.ssh/
[oracle@rac1pub .ssh]$ cat /tmp/rac2keys.tmp >> authorized_keys

ON NODE 2


[oracle@rac2pub ~]$ cd /home/oracle/.ssh/
[oracle@rac2pub .ssh]$ cat /tmp/rac1keys.tmp >> authorized_keys


Gather ssh fingerprints of all RAC nodes.
Now get fingerprints of all possible interfaces / nodes of this RAC setup using ssh.

NOTE: You need to exit after each successful logon to avoid confusion.

On Node 1:
ssh rac1pub.kasb.com
ssh rac1pvt.kasb.com
ssh rac2pub.kasb.com
ssh rac2pvt.kasb.com
ssh rac1pub
ssh rac1pvt
ssh rac2pub
ssh rac2pvt


On Node 2:
ssh rac1pub.kasb.com
ssh rac2pub.kasb.com
ssh rac1pvt.kasb.com
ssh rac2pvt.kasb.com
ssh rac1pub
ssh rac1pvt
ssh rac2pub
ssh rac2pvt


I put two practical example for your more uderstanding that what I am trying to say in Gather ssh fingerprints of all RAC nodes.
============================================================================
[oracle@rac1pub .ssh]$ ssh rac1pub.kasb.com

The authenticity of host 'rac1pub.kasb.com (192.168.1.191)' can't be established.
RSA key fingerprint is 97:b4:a8:13:a1:76:57:44:e2:0b:60:c1:b8:13:db:27.
Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac1pub.kasb.com,192.168.1.191' (RSA) to the list of known hosts.
[oracle@rac1pub ~]$ exit
logout
Connection to rac1pub.kasb.com closed.

[oracle@rac1pub .ssh]$ ssh rac1pvt.kasb.com
The authenticity of host 'rac1pvt.kasb.com (10.0.0.1)' can't be established.
RSA key fingerprint is 97:b4:a8:13:a1:76:57:44:e2:0b:60:c1:b8:13:db:27.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1pvt.kasb.com,10.0.0.1' (RSA) to the list of known hosts.
Last login: Sun Oct 16 23:34:57 2011 from rac1pub.kasb.com

[oracle@rac1pub ~]$ exit
logout

=================================================================================

Verfication of Passwordless SSH connection
Here your passwordless connection established between both node

ON NODE 1You can see date of both nodes will be appeared without password prompt

[oracle@rac1pub ~]$ ssh rac1pub date
Sun Oct 16 23:41:29 PKT 2011
[oracle@rac1pub ~]$ ssh rac2pub date
Sun Oct 16 23:41:03 PKT 2011
[oracle@rac1pub ~]$ ssh rac2pvt date
Sun Oct 16 23:41:20 PKT 2011

ON Node 2
[oracle@rac2pub ~]$ ssh rac1pub date
Sun Oct 16 23:42:18 PKT 2011
[oracle@rac2pub ~]$ ssh rac1pvt date
Sun Oct 16 23:42:26 PKT 2011
[oracle@rac2pub ~]$ ssh rac2pvt date
Sun Oct 16 23:41:59 PKT 2011
[oracle@rac2pub ~]$ ssh rac2pub date
Sun Oct 16 23:42:06 PKT 2011
[oracle@rac2pub ~]$ ssh 192.168.1.191 date
Sun Oct 16 23:42:52 PKT 2011


Congratualtion your SSH have now Configured for Oracle Rac 10g.




Monday, October 10, 2011

LODING DATA INTO CLOB COLUMN BY SQL LOADER


THIS EXAMPLE IS FOR LODING DATA INTO CLOB COLUMN BY SQL LOADER

STEP 1  Creating lob table;
================
SQL> conn scott/tiger
Connected.

SQL>
SQL> create table test_clob(
    id number,
    ename varchar2(10),
    resume clob);


STEP 2 first create 2 text file on OS and enter some data in it.
==============================

[oracle@ocs sqlloader]$ vi resume1.txt
name Syed faraz Ahmed
fname Ahmed
dob 01 Jan 1975

======save file =======


[oracle@ocs sqlloader]$ vi resume2.txt

name zaman ahmed tatari
fname naseem ahmed tatari
dob 29 mar 1980

======save file =======

STEP 3 NOW CREATE CSV data file
==============================

[oracle@ocs sqlloader]$ vi emp.csv

1,zaman,resume1.txt
2,faraz,/home/oracle/sqlloader/resume2.txt

===========save file ================
STEP 4 Now create Control file
===============================

[oracle@ocs sqlloader]$ vi testclob.ctl

load data
infile '/home/oracle/sqlloader/emp.csv'
into table test_clob
replace
fields terminated by ',' trailing nullcols
(
id integer external(3),
 ename char(10),
 clob_file_loc filler char(100),
 resume lobfile(clob_file_loc) terminated by EOF
)
===========save file ================

NOTE: In above control if you use Blob column the syntax is same.
clob_file_loc filler char(100) this filler column in sqlloader file which will not load into the table. This is use to get filename that use in next line.

STEP 5 Load data by  SQL Loader
==============================
sqlldr scott/tiger control=testclob.ctl


STEP 6 Verify  Load data by sqlplus
=================================
SQL> conn scott/tiger
Connected.
SQL>
SQL>
SQL> select * from test_clob;

        ID ENAME
---------- ----------
RESUME
------------------------------------------------------------------------------
         1 zaman
name Syed faraz Ahmed
fname Ahmed
dob 01 Jan 1975

         2 faraz
name zaman ahmed tatari
fname naseem ahmed tatari
dob 29 mar 1980