Warning: Cannot modify header information - headers already sent by (output started at /home/schwizn1/public_html/blog/index.php:2) in /home/schwizn1/public_html/blog/wp-includes/feed-rss2.php on line 8
Schwiz Logcat http://schwiz.net/blog Thoughts, feelings, code samples, and more from an aspiring videogame programmer and Android enthusiast. Mon, 15 Mar 2010 23:17:24 +0000 en hourly 1 http://wordpress.org/?v=3.0 GDC ’10 http://schwiz.net/blog/2010/gdc-10/ http://schwiz.net/blog/2010/gdc-10/#comments Mon, 15 Mar 2010 23:17:24 +0000 Nathan Schwermann http://schwiz.net/blog/?p=247 What to Expect

I really wasn’t sure what to expect while attending the Game Developers Conference, as a first year attendee I had heard quite a bit about the conference but you can never really know for sure until you make it there.  I was actually expecting for the conference to be much more centered on heavy talks about programming, designing, etc but I was rather surprised to see that the GDC is more focused around networking and connecting with others in the industry.

Jack Palevich schools the crowd on how to port native code to Android.

I had bought the summits and tutorials pass because I am really interested in mobile phone development, especially Android and there was a handheld summit this year featuring speakers from Google’s Android team.  I wasn’t fully aware that the summits were over after the first two days and I would be locked out from any future sessions once the expo opened.  However it wasn’t a complete loss, while there were a handful of talks and tutorial offered only to those with a main pass I found there was still plenty to see, do and learn on the expo floor.

Schwagstock!

When traveling to GDC it is important to pack light, or better yet bring an extra empty suitcase. From what I understand this year had a relatively low amount of schwag density compared to previous years. Never the less I couldn’t walk more than 15 feet without someone, from somewhere, trying to give me something. I literally had to walk back to my hotel on the first day of the expo just to unload my bag so I could refill it with more glorious crap! It isn’t all crap as you can plainly see there were some gems mixed in with the various coasters, stickers, bad shirts and bottle openers.

The Schwag, not just the name for a crappy Grateful Dead coverband from the midwest.

When it came down to it though I had to make the decision of what stays and what goes. I left many soldiers behind in my hotel room after carefully and craftfully packing my bag to fit as much as humanly possible. My bag was literally bursting from the seams, and while it fit in the overhead compartment on the way to GDC and I was flying on the exact same model of jet on the way back my bag would sadly no longer fit in the overhead compartment. I embarrassingly had to lug it up to the front of the plane and ask the stewardess to stow it beneath. Actually, I wasn’t embarrassed but rather proud of my ability to pack a suitcase so full it actually grows in size.

Invaluable Advice

While the core benefit of attending GDC is centered on networking, for me as a student with a few years left to go I found the advice I received from those gracious enough to give me their time in the career pavilion to be the most valuable part of my trip.  While some of the constructive criticisms I received on my resume and portfolio may have been harsh I found them to be the most valuable part of my trip.

Christian Allen giving very valuable networking advice.

One industry veteran was kind enough to snatch a resume out of my hand saying “I’m sure it is crap but lets take a look” after a 5 second glance he said, basically said my resume was horrible, nothing on it was interesting.  He didn’t care what languages I knew or what schools I attended.  “What is it that you have done? You need to list your projects and say exactly what it is that you did on them.  You need something on your resume that is going to make me interested in you.”  I was quick to tell him I have a portfolio for that online, but he asked; why would he waste his time looking at my portfolio when there was nothing interesting on my resume to begin with.
Last but not least was the Game Career Seminar, I had really wished I had booked a later flight because I had to miss the last few sessions but I found each of those sessions to be extremely helpful as well as highly entertaining.

In the End

I can’t recommend enough for anyone interested in getting into the game industry to make the trip out to GDC every year. It is by far one of the best investments I have ever made in my future. You can spend all of the money in the world on a college education but it won’t make a difference if you don’t know what your future potential employers are looking for. I am glad I could make it out my first time this year and I look forward to my many returning trips in the future. Hopefully someday I’ll be giving the advice.

***

GDC 2010 Album
]]>
http://schwiz.net/blog/2010/gdc-10/feed/ 4
My GDC Schedule http://schwiz.net/blog/2010/my-gdc-schedule/ http://schwiz.net/blog/2010/my-gdc-schedule/#comments Tue, 09 Mar 2010 05:56:18 +0000 Nathan Schwermann http://schwiz.net/blog/?p=243 I have the summit pass this year so here is my schedule for Tue/Wen, on Thurs/Fri I will be exploring the career pavillion and expo. Hope to see some friendly faces, I will be checking twitter if you want to meet up!

Session Title Date Start Time End Time Location
Maximizing Sales and Downloads for Indie Mobile Game Developers 2010-03-09 11:15:00 12:15:00 Room 309, South Hall
Bootstrapping Games on Android 2010-03-09 13:45:00 14:45:00 Room 309, South Hall
Social Networks: The New Marketplace for Mobile Games? 2010-03-09 15:00:00 15:30:00 Room 309, South Hall
5TH Cell: From Mobile to Handheld & Beyond 2010-03-09 15:30:00 16:00:00 Room 309, South Hall
Application Stores: What You Should Know Before You Get Started 2010-03-09 16:15:00 16:45:00 Room 309, South Hall
Publishing Mobile Games in a Multi-store, Multi-platform Environment 2010-03-09 16:45:00 17:15:00 Room 309, South Hall
AI Developers Rant! 2010-03-09 17:15:00 18:00:00 Room 310, South Hall
Introduction 2010-03-10 09:45:00 10:00:00 Room 305, South Hall
Bring Your Games to Android 2010-03-10 10:00:00 11:00:00  
Step Into The Future Of Gaming: A Practical Approach to Design Handheld
Augmented Reality Games
2010-03-10 10:30:00 11:00:00 Room 309, South Hall
Get the Most Out of Android Media APIs 2010-03-10 11:15:00 12:15:00  
Profiling for Mobile GPUs 2010-03-10 12:15:00 12:45:00 Room 309, South Hall
Next-Generation Social Games 2010-03-10 13:30:00 14:15:00 Room 305, South Hall
Savvy Indie Solutions to Difficult Development Problems 2010-03-10 14:15:00 14:45:00 Room 135, North Hall
Android Office Hours 2010-03-10 15:00:00 16:00:00  
Grand Challenges for Game Developers 2010-03-10 16:15:00 17:15:00 Room 132, North Hall
MMO Retention – Learning from the First 25 Years 2010-03-10 16:15:00 17:15:00 Room 131, North Hall
A Sea Of Mobile Devices 2010-03-10 16:30:00 17:15:00 Room 305, South Hall
Who’s Got Game? 2010-03-10 17:15:00 18:00:00 Room 305, South Hall
Agile: No Silver Bullet 2010-03-12 09:00:00 10:00:00 Room 303, South Hall
]]>
http://schwiz.net/blog/2010/my-gdc-schedule/feed/ 0
Mac’s Ipad http://schwiz.net/blog/2010/macs-ipad/ http://schwiz.net/blog/2010/macs-ipad/#comments Thu, 28 Jan 2010 21:38:42 +0000 Nathan Schwermann http://schwiz.net/blog/?p=189 Apple did really push the envelope with the release of the iPhone and the iPod touch. At the time there was absolutely nothing at all like it on the market, sure we had seen touch screen PDAs and whatnot before but none quite as intuitive and responsive as the iPhone. Apple opened many doors, the most important in my opinion is that they showed other companies that allowing easy access to their SDK and allowing virtually anyone to post apps to their market, is actually a business model that works, and it works well.

How does Apple expect a giant to use this phone?

Sure the iPhone has its short comings but it was a ground breaking device laying the groundwork for future Apple products as well as competitors. However, the iPhone had one MAJOR flaw, it was entirely too small for giants.
Luckily after three long years of waiting Apple has finally remedied this problem with the release of the iPad. Finally a device that humans and giants alike can enjoy. At a cursory glance the iPad looks nothing short of amazing, it is like an iPhone but it is giant-sized!  As you can see Willie the giant looks quite intrigued, but will the device live up to the hype?

Could the iPad be the device giants have been waiting for?

Short answer, no.

After a few short minutes with the device Willie quickly realizes that all of the short comings from the original iPhone are still there. While these short comings were forgivable back in the day when Apple dominated and paved the way for the market. Today it is a different story, simply taking a device you market and making it larger is not what I would consider innovating. In fact, it is practically taking a step backwards as typically the goal is to make devices smaller!

I really like the idea of a tablet, perfect for relaxing on the couch (or the kitchen according to Steve Jobs) and browsing the web, checking emails, twitter, and what not. While this device is capable of those things I don’t see it pushing the envelope in the way like the iPhone originally did back in 2007. Yes it has cool software like the iWork and iBooks, but who honestly wants to make a spreadsheet on a tablet, and is the extra premium over the Kindle or Nook worth it? I personally don’t think so. While I would be happy if someone handed me one of these as a gift (hint hint) I just don’t see myself actually wanting to pay for one. I don’t like the proprietary connections, no flash is a huge mistake on Apple’s part, and the cost is just plain to high. Perhaps a future model will change my mind but for now I am sticking with a laptop.

]]>
http://schwiz.net/blog/2010/macs-ipad/feed/ 5
Android – new line, shmew line http://schwiz.net/blog/2010/android-new-line-shmew-line/ http://schwiz.net/blog/2010/android-new-line-shmew-line/#comments Wed, 27 Jan 2010 05:33:33 +0000 Nathan Schwermann http://schwiz.net/blog/?p=185 In a previous blog post I talked about how to avoid having your users make a new line when the press enter on an EditText view in your Android applications. It was a hack way where you had to make your own EditText class and override onKeyDown. It works just fine but since then I have found a much easier way to achieve the same goal.

First your activity or dialog needs to implement OnEditorActionListener, set the onEditorActionListener in onCreate and…. thats it!!!! Right out of the box the implemented method automatically cancels sends a null character instead of a new line character when you press enter.

public class AdjustStringDialog extends Dialog  implements android.view.View.OnClickListener, OnEditorActionListener{

	private EditText editTextView;

	public AdjustStringDialog(Context context, UnderlinedView mV) {
		super(context);
		setTitle("My Dialog Box");
	}
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.adjuststring);
		retisterViews();
		editTextView.setOnEditorActionListener(this);
	}
	private void retisterViews() {
		editTextView = (EditText)findViewById(R.id.editString);
		findViewById(R.id.finishedAdjustString).setOnClickListener(this);
	}
	@Override
	public void onClick(View v) {
		closeDialog();	

	}
	private void closeDialog() {
		//do what you want with the entered text
		dismiss();
		//update UI with new text if needed
	}
	@Override
	public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
		closeDialog();
		return false;
	}

}

Of course you can detect any key that is being pressed aside from the enter key with the event argument, and you can handle cases like the ‘Next’ button with actionId as well. Know any other ways to accomplish this, or care to share something you implemented with onEditorAction feel free to comment!
Cheers and happy 2010!

]]>
http://schwiz.net/blog/2010/android-new-line-shmew-line/feed/ 0
Android WolframAlpha Launcher http://schwiz.net/blog/2009/android-wolframalpha-launcher/ http://schwiz.net/blog/2009/android-wolframalpha-launcher/#comments Thu, 17 Sep 2009 05:45:27 +0000 Nathan Schwermann http://schwiz.net/blog/?p=160 Ahoy Ahoy it has been way to long I need to write you more often, but I have been busy with school, and before that I had video games to play. Being busy with school is what ultimately let to the project I want to talk about today. Recently, while studying for my Calculus 2 class I found this amazing website WolframAlpha which is what they call a computational engine. It can do all kinds of awesome stuff I have barely scratched the surface on playing with its different capabilities. I mainly use it to quickly look up integrals and sums while doing Calc homework.

Long story short, I ended up using my G1 daily to look up integrals on my phone and I wanted a faster way to do it. After applying for a code to access their online API and never hearing back I decided the next best thing was to just make a quick launcher similar to the one Wolfram released for Vista.

It came together pretty quickly I think its the first program I was able to finish in one day, and bug free to boot (it seems).
WolframAlpha Quicklaunch

It was pretty hassle free but I did run into a little snag I want to talk about. By default when pressing the enter key in the edit text box Android will make a new line, I wanted to launch the website. Getting this behavior was by far the most challenging thing to do in this project.

In order to pull this off you need to make your own EditText class that inherits from Android’s EditText class. Then, you have to override the onKeyDown function for the EditText class.

	public static class MyEditView extends EditText {
		//ref to the nesting the view
		walauncher launcher;

		public MyEditView(Context context, AttributeSet attrs) {
			super(context,attrs);
			this.launcher = (walauncher)context;
		}

		@Override
		public boolean onKeyDown(int keyCode, KeyEvent event) {
			switch(keyCode){
			case KeyEvent.KEYCODE_ENTER:
				launcher.launchWebsite();
				break;
			}
			return super.onKeyDown(keyCode, event);
		}

		@Override
		public Editable getText() {
			// TODO Auto-generated method stub
			return super.getText();
		}
	}

Thats the easy part, what is tricky is how do you actually use it in your XML layout for the app? For starters notice how the class is static in the code above, also it has to be nested inside the Activity class that will be using it. Then in the XML file you need to add a View tag with an attribute called class which equals yourpackage.activityname$nameOfTheCustomClass

<view
	class = "net.schwiz.wolfram.walauncher$MyEditView"
	android:id="@+id/inputID"
	android:text=""
	android:layout_width="fill_parent"
	android:layout_height="wrap_content"
	android:layout_weight="4"
	android:maxLines="1" android:inputType="text|textImeMultiLine">
</view>

Well ok I guess that wasn’t so tuff but it took me a while to find out how to do this on the developers website, they do this in the notepad tutorial though if you want another example. If you want to install my app search for schwiz on the Android Market. I went ahead and released the source, it can be found here.

]]>
http://schwiz.net/blog/2009/android-wolframalpha-launcher/feed/ 0
Flash You Man http://schwiz.net/blog/2009/zeus_story/ http://schwiz.net/blog/2009/zeus_story/#comments Mon, 27 Apr 2009 01:50:30 +0000 Nathan Schwermann http://schwiz.net/blog/?p=24

Well, I am certainly excited to post this video to share with everyone. This is my very first flash animation and I even surprised myself with how well it came out. I did run into a few issues with the sound not syncing up perfectly, especially when doing the speech glow effect on the Heaven and Rhea characters. It seems the filters I used slowed down the frame rate causing the sound to go off sync. But enough with the technical talk this time.

I chose the title Why Hamsters Eat Their Babies and How Zeus Was Born to help set the mood and tone of the video. It seems to work because everyone who I have showed this too in person got a smile on their face when they read the title screen. I like the perspective view when reading about myths and I love when they try to explain something that we, or the Ancient Greeks, don’t understand. Which is why I decided to make Cronos a hamster instead of an image of the sky. Well I suppose a hamster is a little more interesting, but I am happy with my decision to keep Rhea an actual floating planet earth.

Now, the idea of making Cronos eat his children and for Rhea to feed him a rock instead of Zeus all came from The Theogony of Hesiod I just can’t make this stuff up. I’m giving thought of bringing some of my other favorite myths to life as well in the future. Feel free to post a comment with suggestions!

I also have to give a thanks to CartoonSmart for their great free tutorials on drawing and animation in flash. I couldn’t have done it without them! Thanks again for watching!

Don't mess with the Zeus

]]>
http://schwiz.net/blog/2009/zeus_story/feed/ 0
text wrapping with JavaME http://schwiz.net/blog/2009/text-wrapping-with-javame/ http://schwiz.net/blog/2009/text-wrapping-with-javame/#comments Thu, 09 Apr 2009 02:22:32 +0000 Nathan Schwermann http://schwiz.net/blog/?p=6 Recently I had the pleasure of remaking Hunt the Wumpus using JavaME for a school project. I didn’t think I would run into any big challenges since it is just a text-based adventure game but never-the-less I was excited to program for mobile phones. It didn’t take long before I learned the hard way that text doesn’t automatically wrap around the screen when you draw it. Being that text is the most important part of a text-based game I had to come up with a way to dynamically wrap text around the screen.

A quick Google search for ‘text wrap midp’ and I found a nice article explaining how to do it. I found it was a good starting point, but the example did have some issues. For one, the algorithm they shared didn’t take into account whether or not it started writing on the next line in the middle of a word. Second, their code had a bug in it which would stack the first few characters on top of each other when you went to a new line.

Another issue I had to think about was if the screen was small enough the text would draw right on top of my picture for the current room. So I decided to implement a simple text box for all of my dialog to help the readability. I think that ultimately it turned out looking pretty good.

Lets get down to how it was done. I made a function that took the MIDP graphics reference, a string, and a Y value for where to draw it on the screen. Drawing the box turned out to be fairly easy, MIDP did most of the work for me, other than that I just tweaked the hard coded values till I thought it looked good.


public void drawDialog(Graphics g, String text, int Y){

int outerX, innerX , arcValue, Boxwidth, Boxheight, outerY;
outerX = 10; //arbitary
innerX = 12;
arcValue = 5;
Boxwidth = curCanvas.getWidth() - 20;
Boxheight = (g.getFont().stringWidth(text) / Boxwidth ) * g.getFont().getHeight() + g.getFont().getHeight();
outerY = Y - Boxheight - 10;

g.setColor(243, 234, 172);
g.fillRoundRect(outerX, outerY, Boxwidth, Boxheight, arcValue, arcValue);
g.setColor(135, 53, 53);
g.fillRoundRect(innerX, outerY + (innerX - outerX), Boxwidth - (innerX - outerX)*2, Boxheight - (innerX - outerX)*2, arcValue, arcValue);
g.setColor(255, 255, 255);

Next I decided to use the StringTokenizer class to break my string up into words and use the string length to determine if it is time to draw on the next line yet, instead of characters like the article I found.

Font font = g.getFont();
int fontHeight = font.getHeight();
int idx = 0;
int width = Boxwidth;
int lineWidth = 0;
int wordWidth = 0;
int y = outerY ;
int x = innerX + 1;
String curString;
String words[] = new String[500];
StringTokenizer st = new StringTokenizer(text, ' ');
while(st.hasMoreChars()){ //break text into words
words[idx]=st.nextToken();
idx++;
}
for(int stct = 0; stct < idx; stct++){
curString = words[stct];
//measure the word to draw
wordWidth = font.stringWidth(curString);
lineWidth += wordWidth;
//see if new line is needed
if(lineWidth >= width){
y += fontHeight;
lineWidth = wordWidth;
x = innerX + 1;
}
g.drawString(curString, x, y, Graphics.TOP | Graphics.LEFT);
x = lineWidth + innerX + 1;
}

This worked great, however since I am new to programming in JavaME and Java all together. I didn’t realize that you can’t use generics in JavaME, I’m not sure why NetBeans let it slide, it ran fine in the emulator, but I ran into troubles trying to deploy it to a real cell phone. In fact I couldn’t even compile my project on the Sprint SDK because of including the StringTokenizer class. So ultimately I went back to using individual characters, and I thought of a real easy way to see if I should be drawing on the next line. The only catch is I had to be mindful not to use any words larger than 10 characters, because that was the arbitrary value I chose to check for a new line. At any rate I wish I would have thought of it in the first place because it would have saved me a lot of work.


Font font = g.getFont();
int fontHeight = font.getHeight();
//change string to char data
char[] data = new char[text.length()];
text.getChars(0, text.length(), data, 0);
int width = Boxwidth;
int lineWidth = 0;
int charWidth = 0;

int y = outerY;
int x = innerX + 1;
char ch;
for(int ccnt=0; ccnt < data.length; ccnt++)
{
ch = data[ccnt];
//measure the char to draw
charWidth = font.charWidth(ch);
lineWidth = lineWidth + charWidth;
//see if a new line is needed
if (lineWidth >= (width - 10) && ch == ' ')
{
y = y + fontHeight;
lineWidth = charWidth;
x = innerX + 1;
}
//draw the char
g.drawChar(ch, x, y,
Graphics.TOP |Graphics.LEFT);
x = lineWidth + innerX + 1;
}

All in all it was a good learning experience and I’m happy to share it with all of you. Thanks for reading.

]]>
http://schwiz.net/blog/2009/text-wrapping-with-javame/feed/ 0
Hello world! http://schwiz.net/blog/2009/hello-world/ http://schwiz.net/blog/2009/hello-world/#comments Sat, 04 Apr 2009 02:32:56 +0000 Nathan Schwermann http://schwiz.net/blog/?p=1 Well my search for a suitable host to deploy a game I made for JavaME enabled devices ultimately led to my buying my own server and namespace. I figured it would be a nice place to host my portfolio and resume, and I figured I might as well make a blog as well. Web design has gotten so much more complicated since the last time I made a web page back in 1998. I have no idea about all this CSS and PHP stuff, looks like I have a lot to learn. Luckily my school is offering a free PHP boot camp lesson in 2 weeks. Well I hope you subscribe to my feed I’ll try to write about lots of interesting stuff. In the mean time if you have a JavaME enabled phone (thats pretty much any phone besides iphone, g1, and blackberry) I invite you to try and install my game. Some providers wont let you install games this way, but what you do is goto this site on your phone and then click the download link.

]]>
http://schwiz.net/blog/2009/hello-world/feed/ 0