🎉 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!

Balking it up: Why I am doing this?

posted in The Dev Journal
Published December 10, 2013
Advertisement
Chapter 3 - Questioning my demo.

Expecting some sort of ideas, guidelines, or tips for improving arbitrary concepts, instead, I get asked about why I'm using Java AWT and pixel manipulation techniques, and not graphics libraries, such as libgdx, jMonkeyEngine, etc. Good question, folks, good one. You can see the questions yourself: here, here, and here.

The answer to this question lies in the way I learn Java, the principles of my lessons. I learned Java in my sophomore years, all thanks to Minecraft. The forum I represent has a member who posted a thread about the game in 2010, which introduced me to the Classic multiplayer version (Minecraft Classic v0.30) on the Mojang website. It was there that I was in awe about the aspects of the game, and what it was made out of. The creator, Markus "notch" Persson, created the game out of Java.

gallery_114901_716_14109.jpg

Minecraft Classic v0.30, being classy.

At the time, I was adamant on using C++ to write up a game. I never learned how to use Java, other than the fact that it was too hard to use, and you have to memorize long names. Thinking back, the C++ standard libraries all have names that are too concise for me to comprehend. I was used to asking, "Hey, what's this 'ios'?", or "Hey, why are we using Hungarian notations?", but I digress from that.

After getting involved with the Minecraft community, I started to learn a bit more about Java. I also realized the appeal to using Java was the fact that its standard library is unified for multimedia. You have the audio library, image library, standard utilization library, graphics library, network library, window/container library, file saving/loading library, and more, all mashed up together in a neat way. Unlike the counter-part, C++, I have to find the libraries I wanted to use, learn the libraries' API and functions, and try to make sure I don't forget to organize which library does what. Even more painful to learn C++ is the usage of Win32 APIs, which I have to search high and low in the MSDN References.

It was when I was about to have enough of C++, I saw a thread about notch's Ludum Dare entry, Prelude of the Chambered. The biggest WTF moment was that it posted a Ustream livestream of notch programming the game. I sat there, with my midnight snack in hand, ramen noodles in the other, attentively at the screen, trying to understand WTF is going on.

You guys probably remembered that I used to post a thread in GameDev.net about livestreaming yourself writing code, and used notch as an example. Then rip-off would say something like, "Hm, I don't know who else would do this, but it seems interesting. You get to understand what the developer is trying to think, and you get to see the codes in action.", or maybe something like, "I don't know, this is rare." That guy, I have no idea what he would say about me if I mentioned him like this. rolleyes.gif

Anyway, notch switched to Justin.tv, then switched to the gaming-community-friendly Twitch.tv. I followed his livestreams, got pissed that Ustream would not keep deleted accounts' old archived livestreams, and watched his archived livestreamed videos. It was then I started learning Java, besides having college courses that teaches me beginner's Java programming, that I was radically improving myself and inching closer to writing games. Actual games!

The first thing I watched was his Prelude of the Chambered archived livestream, where he uses ray casting techniques to create his engine. I followed along by writing/copying his code I saw in the livestream in Eclipse, and got amazed by it. I fuddled it around for a bit, before I got stuck on the part where he's starting to erect a wall of static white noise. In the livestream, the wall he created moved just fine along the x-axis and z-axis, but in my code, the wall moves at a slower pace than the rest of the objects, which causes a distortion. I just couldn't find a way how to fix the problem.

That put me off of following along with the livestream, as I'm unable to fix/debug the actual math problem, but from that experience, I learned how to write up a basic Game Component that runs a game loop of 60FPS per second, and pixel manipulation techniques.

Instead of continuing to study notch's livestreams, I tried learning more about pixel manipulation, and sought to improve/hone my Java coding skills by learning more classes and objects that were used in the livestreams. Then I went back for more notch's live programming sessions, and his another livestream, Minicraft. Writing RPG Java games is now more practical since the Minicraft engine is somewhat more closer to being an actual RPG engine than some mathematics library.

I felt that by investing in these livestream sessions, learning a language gets more fun, more practical, and more easier to learn, but that's just me. I speak for no one of this opinion, though. Thus answering the good question above, this is how I learned Java, and this is how I'm strictly following up by writing games with blocky graphics. I never learned how to use a Java graphics library, nor learned the basics of writing games. I just skipped ahead, all thanks to notch.

Livestream of notch coding Prelude of the Chambered, part 1, now on Youtube.
Twitch livestream of notch coding Prelude of the Chambered, continued.
Notch's past livestreams, some of which contained programming sessions.

Answering that good question is enough for me, on to the next chapter~~~~~!



Chapter 4 - Adding a new ability.

It started off with me playing around with the player unit, selecting it and moving it around while the enemy unit follows it uninterruptedly. Clearly, the player unit needs some sort of ability or power that can attack or fend off the enemy unit. I started visualizing what kind of attack the player should have, it could be catapulting something, shooting something, missiles, guns, bullets, force fields, etc. Ideas kept pouring in, and suddenly, I'm overwhelmed.

Ignoring the fact that I was questioned about my preferences and not the demo, I started to wondered about my "experiment." That "experiment" is that I'm unable to make others brainstorm concepts up for me, even without putting up an actual proof of concept in my demo. That thought is short-lived, as I began to start writing up a new ability, the Aeon of Strife area of effect attack. In other words, "A circle that expands from the player unit's position."

(And yes, I understand fully and completely about this in the comments section of my last entry. Please don't bring it up. Pretty please!)

So, I wrote it up. You can see the source code here, along with the instructions on how to play the demo.

gallery_114901_716_501.png

Yes, the same old thing... But wait!

gallery_114901_716_58.png

gallery_114901_716_586.png

So, there you have it, a new ability.

I was quite happy with it, and uploaded the results to my project thread. I ended up with a serious discussion on how I'm writing messy code, how I'm ignoring optimizations, etc. sad.png Damn, no crying emoticons.

-----------------------------------------------------------------------------------------------------------------

To be continued...

-----------------------------------------------------------------------------------------------------------------
2 likes 1 comments

Comments

polyfrag

Didn't know Notch had a dev livestream. Got to check that out.

December 10, 2013 09:07 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement