Saturday, May 3, 2014

Update

I've decided to work full time on a game right now for IndieCade as well as for release on mobile (Android, iOS), so all my time will be devoted to that for the next few weeks.  I will return to this once I feel I have sufficient development time invested in the other game.

Saturday, April 26, 2014

Week 6: Gravity Ball

Well, it looks like the Game a Week is turning into the Game Every Ten Days.  Well, that's okay, because I'm proud of this week.  I delved into the mobile development tool Moai (http://getmoai.com/).  It's a very nice open source solution to writing games in Lua and publishing for multiple platforms.  The backbone of the system is C++, and there are multiple hosts that can be used (Windows, Android, IOS, etc).  I used the Windows host which uses GLUT is a back-end (not my first choice, but I see that the newest version uses SDL).

When I initially downloaded from the Git repository and tried to build it, I got nothing but erros in Cmake.  After scrounging around a while, I managed to get an older stable version which only uses the Glut host for Windows.  I quickly learned Lua, and also wrote a simple parser using Tiled map editor (http://www.mapeditor.org/).

The player can move a ball around and can jump.  Also, the player can rotate gravity to the right, left, or up.  The ball will fall in that direction, and when it lands the camera will rotate to orient the up direction.  The goal is to get to the yellow.  Red squares will reset the character.  I'm actually looking to ramp this up a bit, polish it, add a few more features.


Monday, April 21, 2014

Gamedev post

Just wanted to let any readers know, I have collected a few links from the web and forum posters on various resources relating to game a week/2weeks.  The original Gamedev.net post is here http://www.gamedev.net/topic/655333-game-a-week/

Here are the links from the post, in no particular order.


Adriel Wallick's blog: http://adrielwallick.com/
Jayenkai's website: http://jayenkai.socoder.net/
Mondongorongo's blog: http://mondongorongo.wordpress.com/
Jonathan Gaiser's blog: http://gameaweekchallenge.tumblr.com/

Some articles about GaW.


Other contributions from forum posters:

One game a month -- http://onegameamonth.com (Thanks BHXSpecter )
ManTis' Gamedev Journal -- http://www.gamedev.net/blog/704-crawling-with-ideas/ (Thanks slicer4ever)
11 day level design process overview -- https://www.youtube.com/watch?v=pj8cbC2YnwU (Thanks Tutorial Doctor)

Thursday, April 17, 2014

Week 6: Preview

Okay, so I haven't really gotten a lot of time with my previous games.  The first few were created using low-level C++ and OpenGL.  The next few were with GameMaker: Studio.  I think this time I'll be trying the Moai API (http://getmoai.com/).  It seems to offer a solid framework for mobile, AND it's opensource.  The competitor, Corona SDK (http://coronalabs.com/products/corona-sdk/faqs/) offers a fulle bundled solution (everything is in the SDK, physics, in-app purchasing options, graphics, etc), whereas Moai lets you use other tools to get the job done for development.

The idea for this game is to play with gravity.  It will be a little platformer jumper, where the player must jump from box to box, but only a subset of the sides of the box will be land-able, the other sides will cause the player to die.  The player must manipulate gravity during jumps in order to land on the correct side.

Week 5: Mole Messiah

Wow, this week was crazy.  I had a paper deadline for a conference I was submitting to and didn't get but 4 hours to work on the game this week :-S Despite that, I managed to build something (thanks to the fast prototyping capabilities of Gamemaker) and I learned a little more about Gamemaker Studio as well.  I wouldn't really want to use it for production games, but it's great for fast prototyping.  The reason I wouldn't use it in production is that I would like more control over things, such as object hierarchies, being able to use other tools in the pipeline, more control over the logic of the game.  I think I'll end up purchasing it in the long run since I can make some decent 2D games from it, but I for production games I'll probably require something a little more heavyweight (or lightweight depending on how you look at it.  I mean heavyweight in the sense of control).  Next week I'll be examining the Moai API for building (http://getmoai.com/).  I'll probably return to Gamemaker and test out some more advanced features later.

Anyways, this week was a Whack-a-Mole game where the moles appear and disappear very fast.  Additionally, there is a "Messiah" mole that , when hit, will end the game.  Also, when the timer runs out the game is over.  You will notice the lack of graphics and user interface :-)  But, fun little experiment with GM:S.


Tuesday, April 8, 2014

Week 5: Preview

Whack-a-mole -- This is a simple idea I had that I might eventually port to other devices.  I want to make a whack-a-mole style game, where you gain points by whacking the moles the fastest.  Most moles are good, but every now and then a special mole type pops up that, if hit, will end the game.

Week 4: Powerup Inverse

This week, instead of using my own tools, I'm tested out Gamemaker: Studio to test out its prototyping abilities.  This week I wanted to experiment with a modified handicap system.  I created a space shooter where the player is rewarded for killing by NOT giving him powerups.  Powerups will decrease the player's score if they get a kill, so when the player is doing well, it means he has no powerups and is getting the maximum score.  When the player dies, he receives a powerup making it easier to kill the enemy, but decreasing his score each kill.  When he gets a kill, the powerup level is decreased.It's basic, and I'm sorry for the random mouse cursor in the way!! I made a really simple and horrible AI for the enemy ship.  I might extend this game later.  This is the first time I have used GameMaker: Studio free edition, and after the video I will talk about it a bit.



Ship and nebula image were found with Google image search.  The ship came from someone on Stackoverflow: http://stackoverflow.com/questions/15342083/algorithm-to-make-a-polygon-from-transparent-png-sprite and

I used Gamemaker this week to make the game because I wanted to experiment with something different.  I've found that Gamemaker is amazing at allowing somoone to quickly create a prototype, but it definitely has some deficiencies which make it harder to use for full-scale games.  Perhaps some of those deficiencies arrose because I wanted more control, more power, or more programming language expressive power (I am a programming).  But all-in-all, I will probably end up purchasing the pro version of Gamemaker in the future for fast prototyping and iterating.  Once I use Gamemaker a bit more, I'll post a full review, but here are some things I've noticed that are lacking in it.

1. Organization
This is a primary concern.  I wish it would let you see relationships among objects and variables assigned to them, or let you quickly see which objects have what scripts attached to thim.
2. GML
The Gamemaker programming language is a fusion of scripting languages such as Javascript and C++.  While the syntax is mostly C++, the types and variable system are dynamic.  The biggest issue I have with the GML so far is organization.

The GML is a fusion between Javascript and C++.  While it does have the concept of objects, there is no way to create object methods or private obj data, or anything like that.  Also, there is no way to easily craft polymorphic objects (even though there is a parent-child component that can be used).  I wanted to create a gun class, then subclass this for the individual powerups and give it one virtual function: shoot.  This would have allowed me to encapsulate all my gun variables in the gun object and also prevent any powerup logic other than swapping out a new gun from being in my ship objects' code.  Well, this isn't quite possible.  In fact, if you do want to have object methods, you need to use the provided userevents instead and somehow trigger them.  I'll have to look into using the parent/child relationships a bit more.

Variables are a bit hectic. First, if you were to assign a variable like this:

This code will actually create a variable named shipSpeed (if it doesn't exist) and attach it to whatever object  instance the current script is running on.  As far as I can tell, there is no way to see the variables on an object, so if you declare some variable in another script, you will have to remember where you declared it, what it is named, which script it was named in, etc.  I kind of like more organization, like being able to see variables on an object or having some method to add variables to an object outside of the scripts so I can keep it organized, then if a variable is referenced in the script that doesn't exist, it throws an error.  Anyways, this is kind of like what Javascript does (and I don't like it there either).

To make a variable local to the current execution of the script, use the var keyword.  This will create a local variable that will be destroyed once the current script is done executing.  And finally, globalvar is used for global variables.

What would make the variable system a bit better?  Use this to explicitly say that you are accessing an instance variable.  That way I don't accidentally create one by leaving off the var keyword for a variable in a script execution.

The with keyword is a way to switch contextsand allow you to operate on another item's data structures.  The problem is it can get confusing if you are just reading somone's code.  For example:

The second assignment to x and y is done on the objShip object (or the instance that it finds), whereas the first x and y assignments are done on whatever object instance is executing the script.  You can see, this can get a bit confusing if you just want to read the code and you forget that the current block you are in is in some giant with statement.  This is a better way to do it:

Also, you can't really define pure programmatic structurs, such as classes or the like.  In fact, there isn't even a simple object that encapsulates a point (x, y variables).  All functions are essentially C-style in that they operate on one piece of data and return some output.

Built-in variables -- The color coding of built-in variables in the code is nice, but I would like to make sure I'm not accidentally assigning something to a built-in variable which is going to modify some substate of my game (such as the speed variable).

Again, I wish GM was a bit more organized in code structure and variables, and would at least have some GUI allowing my to view objects and their properties, but I guess it's not really too advanced (maybe later versions). Gamemaker does a lot of things well though: 1. Fast prototyping: It automates many of the subsystem routines you would have to manually create, such as effect loading, timestepping, etc. 2. Visual interface: The visual interface is fine for 2D games and I kind of like how easy it is to add rooms and such to correspond to levels. 3. Very very easy scripting and world building manipulation.

Takeaways:  Use tools like GameMaker or Unity 2D for quick prototyping.  I have been a programmer and have resisted the urge to use these tools because I wanted to do everything myself, but when you are the only programmer in a game team, building everything yourself, no matter how simple some of the things are, is very time consuming.  I would rather focus my time on designing and iterating on a game design to show the other developer instead of focusing on hours programming boilerplate code without anything to show for it.  Again, use tools like GameMaker for quick prototyping, even if you don't want to use them in the end.