Category Archives: Uncategorized

Rendering my first 3D object in OpenGL

Summer means longer days and shorter nights, but it never appears that way to me. It goes by quicker and quicker every year.

 

In the past few weeks I’ve taken an interest in learning OpenGL. I’ve dabbled with WebGL a year ago but the concepts weren’t really sinking in. Now a year later, I wanted to learn OpenGL because I wanted to do some work in C++ to see what it’s like developing games for the desktop.

 

So far it’s been pretty good and I’m beginning to understand how OpenGL works. I’ve been told to steer clear of the fixed-function pipeline, which has been deprecated and I believe was removed sometime in OpenGL 3.x, so I’m using the programmable pipeline which involves shaders. I think I have a decent understanding of the basics and the basic knowledge of “modern” OpenGL has been easily transferrable to WebGL and OpenGL ES considering they both use the programmable pipeline. Although I haven’t done anything advanced yet, I’m enjoying it so far. Yesterday I rendered my first 3D object. It was a colored prisim rotating around the Y axis based on time. It has a FPS-like camera too, it’s not much but here’s the executable if you wanna check it out (use WASD and the mouse to move):

http://www.speedyshare.com/2BfpY/sfml-test.zip

 

For the window, sounds, and input I’m using a library called SFML. I like it so far. I thought about SDL but since I’m writing in C++ I thought it’s best if I use SFML as it’s written in C++ as opposed to C.

 

In other news, I had an interview with NVision’s Patrick Shaw this summer. If you haven’t heard of NVision, it’s a cool app that delivers the latest news about gaming, movies, pretty much any entertainment in general.

 

Shaw posted an article about Stellar Alien and it was great. There was even a spike in the game’s installations on Google Play, so I thank Patrick Shaw for taking an interest in the game and posting the article.

Want to read it? It’s right here

 

A thank you

Lately some great gaming journalists have taken interest in my experience developing and designing a game as a young teenager. It’s really nice of them to allow me to share my story and experience as I know lots of other developers can be overlooked by the media, I appreciate the interest a lot.

Answering interview questions have been interesting. Generally, there tends to be a question about how it all got started: the game, my interest in programming, etc. It’s cool going back in time and realizing all the things I did to finally get my first game Stellar Alien from a small little physics simulation to a published video game.

Here are a couple links to the interviews and mentions if you’re interested in reading them:

Developers increasingly turn to enterprise apps to make money
June 28, 2013 | By Shane Schick

Posted July 2, 2013 by Amy
The Ageless Art of Development: An Interview With Maximillian Polhill

Chris Khoo from Wappworks

Cori Smith from BiasBear

A post from devMaster

And thanks to Ludei, for their great team and giving me tons of support.

Once again, thanks everyone! :)

-Max

A bright future for mobile HTML5: Firefox OS

A few blog posts back I talked about my experience as a teenage developer writing a HTML5 game from scratch and how I thought it was ready for some pretty sweet games. My opinion hasn’t changed: HTML5 is still ready for great applications. It may not be the best for all your applications, but it is should be an option to consider. HTML5 allows for rapid development, cross-platform, and it’s open. However, there are always the critical performance projects that must be native.

The Consumer says: HTML5 is too slow, I’ve heard about it!

Even if you aren’t a developer, you probably still have heard the buzzword “HTML5″ and how Mark Zuckerberg has said it is one of “Facebook’s biggest mistakes” to be relying on it. Let me tell you something, some of the media (un-shockingly) took this quote out of context. And I’m sure some of them know this, but they keep on using it.

Here’s a quote attributed to Zuckerberg from the W3C Mailing List:

“When I’m introspective about the last few years I think the biggest mistake that we made, as a company, is betting too much on HTML5 asopposed to native… because it just wasn’t there. And it’s not that HTML5 is bad. I’m actually, on long-term, really excited about it. One of the things that’s interesting is we actually have more people on a daily basis
using mobile Web Facebook than we have using our iOS or Android apps
combined. So mobile Web is a big thing for us.”

Per the quote above, he is not saying “HTML5 sucks”, “HTML5 is bad”, or “HTML5 is slow”. Not that at all. Comparing HTML5 to Native, what Facebook’s mobile app really needed was native. That’s all. No big deal.

I’d like to point out something because I found this the most interesting part of this quote:

“One of the things that’s interesting is we actually have more people on a daily basis
using mobile Web Facebook than we have using our iOS or Android apps
combined. So mobile Web is a big thing for us.”

Again, per the quote above, they have a large amount of users on their mobile website instead of their mobile applications. This is quite funny, as a lot of the media talks about how slow HTML5 is. Yet the majority of Facebook’s users are using their mobile website which is ran completely on HTML5.

So the question is: “what was wrong with Facebook’s native application if HTML5 works fine on a mobile browser?” I’d say the WebView was the issue. Using a WebView was my first attempt at making my HTML5 game a native application. The WebView is insanely slow. It is so slow. Your brain will begin to process thoughts in an incredibly slower rate if you think about how slow that WebView is. Seriously, it’s slow!!!

Developers may be able to optimize the WebView by configuring certain settings (high rendering priority, enabling hardware acceleration, caching behavior). But there have been some great developments that offer fast alternatives to the WebView.

A blazing fox decides to make his own open-source mobile operating system

firefox-os

For the past couple of years, Mozilla has been working on a huge project: FIrefox OS. Firefox OS is an open source Linux-based mobile operating system written in HTML5 & C++.

I’ve recently been playing with the operating system using the simulator and I can say it is going to change the perspective of HTML5 applications for the good. Firefox OS will allow HTML5/JavaScript to communicate to the mobile device’s hardware directly.

HTML5 Applications on Firefox OS will work as if it was written in native code. I believe Firefox OS will burn Chrome OS into ashes (cause you know, the fox is on fire). Most Firefox OS applications do not require internet connection which is great.

When I talk about HTML5 Applications on Firefox OS, it is not the same as if they were running on a browser and dealing with all that extra stuff to get it working. HTML5 Apps on Firefox OS will run on an native runtime. We’re talking about some deep stuff here guys.

Firefox OS is currently pumping out:

  • Web Telephony API – Phone call state & control
  • Web SMS API – Text Control & Interact
  • Screen orientation – Control & Detect
  • Network Info, Power Management, Battery Status

This is all the sweet stuff you’d expect in an native Android application. I think Mozilla is going to hit the mark with this one and I’m honestly very excited.

Firefox OS is already hitting it big with device makers, LG Electronics, ZTE, and TCL Corporation reported plans to create devices shipped with Firefox OS on them. LG is already thinking about making a smartwatch with Firefox OS. Wouldn’t that be pretty cool, for users to use your HTML5 App on their smartwatch?

hacking-firefox-os-slidesFirefox OS is a fully open source ecosystem which is really great. You’re not closed in, my friend. I can download the Firefox OS source code and start hacking away & start adding new features, fixing bugs, and more.

We’ll see how it turns out, but I am quite sure that Firefox OS’s future is going to be swell.

Conclusion:

Now is a better time than ever to consider HTML5 for your mobile application. With the specification maturing, better browsers like Firefox & Chrome, Firefox OS packaging your HTML5 App into working like a native, and native wrappers dropping the Webview and becoming hardware accelerated, HTML5 is a viable option to choose for your mobile application, and it’s just getting better.