Chadwyk.com

The ramblings of a developer

Early Roadblock

So… It turns out, loading graphics is hard!

 

My goal is to be able to make a basic texture loader class that I can use on any node class in my engine.  This is kind of how Cocos2d-iPhone worked, in a simplified manner.  If I could only find one that was already created someplace that I could utilize…

I was able to get SDL to load images, though it was pretty complicated, and not optimized what-so-ever yet.  Plus if I go this route, I can’t use cool lighting effects.

I think my preferred route is to use OpenGL for that purpose.  However, I started playing with OpenGL and that’s waaaay harder then using SDL.  Though there are some image libraries that are supposed to make it easier.  I am currently trying one called SOIL, but I can’t find much documentation on it at all and the last time it was updated was years ago.  I might look at trying out a different one and seeing if I can get it working with OpenGL.

 

 

The Beginnings of a Game Engine

Over the past 2 nights, I have been researching and watching tutorials on SDL and OpenGL.  So far I believe I have the beginnings of a game engine.  It is starting to feel a bit like a very primitive version of the Cocos2d-iphone engine, which is my goal because that is what I am used to.

 

It is really basic, but so far I have it opening an SDL window, then instantiating OpenGL as the renderer.  I have an event handler class created to detect key presses or mouse clicks.  I am able to draw a basic OpenGL polygon using shaders and move it via keystrokes.  I was able to create a scene manager with different scenes so I can have a menu scene, game scene, etc. I also created a resource manager which can load files into memory.

 

Like I said it’s all super basic stuff, but I’m actually really fascinated by how it all fits together.  Previously I just used other engines that other people created.  Now I’m getting a better idea how it all works.

 

The internal debate I’m having is using the OpenGL renderer or SDL.  SDL is good for 2d graphics, but is lower performance due to not talking to the hardware directly.  OpenGL does do that, but it is more complicated and difficult to learn, but I can do more with it like lighting effects and particles.  It also has a good chance of not working with console ports in the future.  I’m hoping that I would be able to switch it out with a different renderer if I ever get a chance to port it to Nintendo, Playstation, or Xbox.

 

My next steps are to get it to load textures so I can display images so I can start to do meaningful things instead of just a blue square. Then I’d like to figure out how to do scene transitions – fade out / in, etc. I also need to verify that they remove from memory properly when switching.

 

All in all, this project is still exciting me and for not touching c++ in years, I feel like things are coming along great!

Diving in!

Well it’s been just over a year since my first post here, and I have no progress to show.  Eek!

 

Since my last post, I’ve kind of been waiting for Nintendo to post their Switch SDK on their developer portal, but they have yet to do so.  I was planning on starting dev work in Unity since I know that is a supported engine and is multi-platform. However, I emailed Nintendo’s indie team and they replied back that in order to be considered for access to Nintendo Switch development resources, they require an overview of my planned project as well as my development experience history.

 

Since I do not have a planned project yet, I decided to hold off on responding back to them.  I had done some Unity tutorials in the meantime and for whatever reason, I just don’t like using it.  Yes it is easy, and yes you can create something fast.  However, I don’t like the lack of control.  I feel like it’s not programming.  As I’ve stated here before, it’s like cheating.

 

So this past weekend I purchased Thimbleweed Park for the Nintendo Switch (available for most other platforms too). https://thimbleweedpark.com  I soon realized this game was made by the same people that created the old Lucas Arts games like Maniac Mansion and Monkey Island.  I never played Monkey Island, but I loved Maniac Mansion as a kid!  I played Thimbleweed Park for 10 hours straight and beat it on casual mode.  I’ll have to go back and play it on advanced mode to see the harder puzzles.

 

After I beat it, I decided to go back and look into the game more, and found out that it was a Kickstarter project.  Ron Gilbert, the main developer behind Thimbleweed and Maniac Mansion, documented the whole process on the game’s website and it is super fascinating.  I was hooked.  I watched Youtube interviews with him and started listening to his podcasts which detailed his processes.

 

He recreated the SCUMM engine which he used to create the old Lucas Arts games.  From what I can find, the new version of his engine is in C++ using SDL to create the game window, he used his own renderer, and used a modified version of Squirrel for an imbedded scripting language.  Apparently he really needed it to be multithreaded, so he modified it to support that.

 

I always wanted to make an adventure game which was point and click.  I have fond memories of both Maniac Mansion and some of the Sierra games like Police Quest, Hero’s Quest, and King’s Quest.  So this game, Thimbleweed Park has reignited my passion to create an adventure point and click game.  Now that I have a genre, I’m doing research on what I’ll need to do to create an engine.  I’m leaning toward using C++ and SDL.  I know nothing about rendering so I’m hoping that it will work on console ports.  There is little info out on the web due to NDA’s on console dev.  I’m not entirely sure if I need an embedded scripting language as I’ve never used one before.  I’m not entirely sure what I’d use it for, but they seem like they are all the rage and people love them.  I’ll need to play around with it and see what I can do with one!

 

My goal is to be able to make a simple prototype of a couple rooms so that I can prove to myself that I can make this sort of game from scratch.  If I can pull this off, I’m diving in with both feet.  I don’t have a story yet or anything but I just want to know if it’s possible first.

 

Wish me luck!

Procrastination is my worst enemy…

If you read my last blog post, way back in September you saw that I wanted to start a new game project. I listed a whole bunch of brain stormed ideas and thoughts about what I wanted to do.  Unfortunately I was still working a bit on contracted work so most of my free programming time went to that.  Now that my work on that app is winding down, I’ve been spending most of my time collecting and playing games rather than doing research and making prototypes of games.

 

Today that changes.  For this new project, I am going to settle on using Unity3d.  I really don’t like this idea very much.  For some reason it feels like cheating to me. Even though you are scripting a lot of code, so much is done for you automatically.  I guess this is good, and I should just accept it.  There are so many benefits to using Unity3d rather than something like cocos2d.  A couple are that it’s multi platform so it is easy to port to other systems (Xbox, ps4, iphone, etc).  Also, lots of companies are using it so experience may be good in it if I am looking for new work.

 

The final thing that is swaying my decision is that it was announced this week that a developer’s kit for Nintendo Switch is only going to be 50,000 Yen, or roughly $450. That’s a huge difference in what it cost for WiiU (thousands of dollars).  That alone makes me want to learn Unity. It’s always been a dream of mine to program and play a game of my own on a Nintendo system, and this price point actually puts that in my grasp! Nintendo finally is learning something to get more indy developers on board with the Switch!

 

So where does this leave us? It will probably be a few weeks yet before a Switch dev kit is available.  In the meantime I need to come up with a simple idea for a game.  I’m thinking I am going to keep it simple so that I can learn the basics Unity3d. More than likely I will publish this to the Apple Store with my other apps.  One reason for this is that it is my theory that if you have new apps in the store, your chances are higher to get tickets to WWDC, but we’ll find out. Once I learn the ropes of Unity3d, I’d like to make a new 2d game for the Switch!

 

Hopefully procrastination doesn’t kick back in!

 

 

A New Game

Last night I sat down with the white board and decided to brainstorm some ideas.

Whiteboard game ideas

Style

First I listed the type or style of games that I am interested in making.  I narrowed it down to 4 types.

  • Tower / city defense (Command and Conquer / Clash of Clans style)
  • infinite or dungeon runner (Sonic / Flappy bird style)
  • 3d open world (Minecraft style)
  • top down (Zelda / Final Fantasy / Diablo style)

Genres

  • Midevil
  • Space / futuristic
  • horror (Zombie, Vampire, Ghosts, etc)

Multiplayer

Every game or project I create, I like to add more features, and one that I’ve never worked with is multiplayer support.  I thought of ways to do this.  I thought of 2 obvious methods. The player goes to a list of available users in area and can challenge them, or the server auto assigns a match.  This would probably work the best in a tower defense or runner game the best as the game won’t have a in game avatar to display on screen.  Which brings me to my second method.  Either in the 3d open world, or Zelda style graphics, it could show all the players in the area of the map on screen.  There could be some fighting mechanism to attack or start a battle by tapping on them.

Regarding the battle mode, I haven’t decided if I like alternating turns or just striking whenever the player commands should be better.  I am leaning toward alternating turns, like a typical RPG.

Graphics

A couple ideas I’ve been throwing around are making a 3d game. I don’t think I want to model any artwork though. That is quite a bit to learn how to do.  However if I do go down this path, I may go with the blocky voxel art which brings the retro look and is also easier to do.

With 2d graphics, I’d probably draw graphics with my iPad Pro and Apple Pencil and bring them in to animate using something like Spine.  I could also use voxels or pixel art for a retro look. Pixel art is something I’ve always kind of wanted to get into, but it looks like it may be pretty time consuming.

Another option I thought of was doing something like I did with Lumps of Clay.  That app was completely made with stop motion animation and Play-doh.  I could go the same route, and try construction paper, something like the first episodes of South Park.  However, that sounds like a nightmare, and I really don’t want to go through editing that many photos again.

Level Style

Next I thought about how the graphics should best be rendered for the world itself.  Lumps of Clay was tilemap based and it was pretty easy to do. This of course wouldn’t work with a 3d game. This would require 3d or voxel models of everything. The other option is to have large sprites for everything. I think this would only really be needed in something like an infinite runner for the platforms etc.

Platform

Moving on, which platform or engine do I want to develop this for?  Obviously I want it to run on iOS and I know Swift pretty well at this point. However, it would be pretty nice to be able to build it for other systems like Android, XBox, Wii, PS4, etc.  For this solution I’d need to learn Unity.  Unity seems really cool, however it basically requires me to learn a whole complete new scripting language, and programming interface.  A benefit though, is that a lot of companies are looking for experience in Unity.  For Lumps of Clay, I used Cocos2d and I liked it a lot.  However, the project is barely alive any more and is an uncertainty that it will survive much longer as a viable solution. Spritekit seems to be a pretty good alternative if I want to stay exclusive to iOS.

Revenue

Money! Everyone loves it. Everyone wants it. The question is, how to get it?! With Lumps of Clay, I made 2 versions. Premium with no ads, but still had in app purchases. Also a Free version with ads and in app purchases.  No one has ever made an in app purchase. Most people have downloaded the free version, with a handful of people on the premium.

For this reason, I will only focus on one version. I want to decide this early because I want to incorporate it better in the game play.  For instance, if I make it freemium, I will want to make a game mechanic which limits them from doing certain actions so many times in a period of time.  They would then be able to make purchases to skip this time for example. I’d probably sneak ads in as well.

Database

The last big topic I have on the list is the server side database for multiplayer game play.  I’ve been doing a bit of research on which type may be best to create.  I have a lot of experience in MySQL and it seems pretty basic to me.  However I am told that it isn’t scale-able across many servers if the app blows up big.  Also with large databases it is supposed to be “expensive” on processing.

On the app I am working on for IMVD, the API utilizes REST and JSON commands.  It is pretty simple and seems like something I’d like to implement.

The API also uses noSQL. I wasn’t involved in setting it up or creating that side, but I am told it is scale-able to multiple servers and is pretty quick with large databases. This may be the solution I need – but yet again something else I’d need to learn how to create.

The last solution would be to find a 3rd party service that is meant for this.  The downside to this is that I would then be reliant upon them. If they ever chose to change payment plans, or go out of business, I’d be kind of out of luck.

Final thoughts

Those were my initial brain storming thoughts.  I still have a lot of thinking to do about it.  I think my next steps are going to be to investigate the graphics side of things and make some prototypes.  I’ll go from there and decide what I like best or what will be the easiest for me to proceed.  That should help me decide the style of game.