WP Admin Notes – Quick Bit of Code

I just added a feature to one of my sites that allows me to write a “note to the admin” (me) that doesn’t show up on the site. Here’s a look at one of the widgets in my admin area:

Wp trr notes

I really don’t want a title for that widget, but I also don’t want to have to open every text widget to remember what it is (many of my text widgets are without titles). By creating that shortcode I can surround any bits of text that is a note to myself, but it won’t appear on the site.

Creating a shortcode is really easy — and this one was especially easy because nothing is really happening. WP passes me the text that’s surrounded by the shortcode and I don’t do anything with it — just pass WP back an empty string.

I put this code inside the functions.php of my current theme:

function trr_note( $atts, $content = null ) {
	return '';
add_shortcode( 'trr_note', 'trr_note' );

Because of the way shortcodes work I can also call it like this:

[trr_note foo="This is my note for my eyes only!"]

The variable named foo can be named anything — since I’m doing nothing with that it doesn’t matter what it’s called.

The only other thing I had to do was tell WP to process shortcodes inside widget titles and text — apparently that’s not standard (which seems weird to me). I added these lines of code to the functions.php file:

add_filter('widget_text', 'do_shortcode');
add_filter('widget_title', 'do_shortcode');

It’s not rocket science, but it makes my admin duties easier since I can tell at a glance what specific widgets are for. I can also use it to “comment out” text on pages that I want to save for later.

Content Creation Programming

WP Plugin for WLM – Sell Bundles

I created my first WordPress plugin last night. It allows me to sell “bundles” of courses on my site. WishList Member is an awesome way to handle my membership stuff, but doesn’t have any way to let you sell a bundle of courses at once. So I changed that.

Using their API I dusted off my PHP skillz and created a plugin that allows me to create bundles — I can specify as few or as many courses as I want and when someone buys it, they are added as members to those specific courses.

Besides bundles, it also allows me to add on a course as a bonus. The old, “Buy X now and I’ll also throw in Y, for free!” As far as the plugin is concerned, that’s just another type of bundle.

Selling Bundles in WLM

That link will take you to a 4-minute video that shows what it’s all about. It also allows you to grab the code to make it all happen. It’s free. It’s also *not* the plugin version, but I do tell you how to incorporate it into your site. (Warning, it’s a solution for people who are more technically-oriented.)

Content Creation Game Development Programming

Poked at Javascript or PHP? Want to Try Game Development?

I have a “Crash Course” video tutorial in game development using Corona SDK (a 2D mobile framework) that’s hosted on Udemy:

Game Development Crash Course

The course is free and even better, can be done using the free trial version of Corona SDK. This is for beginners, but I assume you’ve played around with programming at some point, maybe with QBasic back in the day, or done some Javascript coding on your web site, or similar.

It’s fun, it’s quick, and it should whet your appetite for more game development. 😉

Game Development Gaming Programming

Game Development for Homeschoolers

It doesn’t matter whether a kid is in public school or whether he or she is homeschooled — almost every kid loves computer games. And there’s a certain percentage of those who not only want to play video games, but they want to make them, too.

With the game engines available today that’s completely possible to do at home — and for much less money than most people think. As a homeschooler you don’t have an unlimited budget for curriculum, so I’m going to cover one of the better low-cost options. (And what’s really cool is that option may be lower cost, but it’s the same option professional studios use to create games you see for sale today.)

Creating Your Home Game Studio

While a separate room might be the nicest option, just about everything you require is digital and lives on a hard drive, so even a laptop you carry around here or there will work for your studio. A specific place is nice because having a whiteboard for brainstorming is a great help as well as having wall space for posters that spark your creativity.

While an internet connection is a complete requirement, it comes close. It helps your productivity to be able to look up information in online documentation, or see a sample video, or ask questions of experts online.

Assets: What Your Game Is Made Of

While the source code you’ll write may seem to be the heart of the game, there are two other assets you’re going to need: artwork and audio. It’s fairly easy to make your own simple sound effects, and if you’re talented in drawing or painting you may be able to do the artwork, too. But in many cases the game developer write the code and then plugs in art and sound created by someone else.

That’s one way a group of friends can work together in making a game. If you’re talented in art, maybe you’re the artist for the game while your musician friend creates sound effects and background music. But if you’re a “lone wolf” there are still options.

Hiring someone to create a set of art or game sounds can be done cheaply, but you’re probably going to end up paying at least a few hundred dollars (or a few thousand) for something that’s good quality. If you have the funds for that, it’s a great option because you’ll get exactly what you need.

Limited funds? No problem, there are artists and musicians out there who create game assets that can be used for free. No purchase up front, no royalties later. All you have to do is give them credit in your game, such as in the About box. Just make sure you check their license agreement before using the assets — you don’t want to be surprised later because use wasn’t permitted.

The Game Engine: 2D or 3D

While 3D games such as first-person shooters are very popular, I don’t recommend 3D for beginning game developers for the simple reason that they are very complicated to put together. Not only do you need to write the code, add artwork and sounds, but your artwork relies on 3D models that have to be created. Modeling is a skill that requires at least as much time as programming itself.

Plus, by creating a 2D game first (or always – some people prefer 2D games) you’re learning principles of design and development that will help you no matter what type of game development you do in the future.

Programming: Cranking Out The Code

While there are game development tools that require no coding at all, they’re typically much less powerful than those that require some actual programming. Even someone starting from scratch can quickly learn the necessary commands if the right game engine is chosen.

While some engines use C++, Objective-C, or even Javascript, probably the fastest language to pick up is called Lua. It’s been used for game development for years and now there are several 2D game engines available that use Lua as the language.

The best game engines make it quick and easy to get pictures on the screen and animating. The engine I’ve used for the last half dozen mobile games can draw the picture with one line of code, and animate it across the screen with a second. It’s a great balance of ease-of-use and power.

The Best Way To Learn To Make A Game

First choice is to find someone who knows and have them teach you. If you’re lucky enough to live close to someone like that, take advantage of it! For others, there are books and video courses. I usually suggest video tutorials because seeing how to do something is often the key to really learning it.

Discover how to create your own game for iOS or Android with the Beginning Mobile Game Development video course. shows how easy it is to make your own mobile game.

Game Development Miscellaneous Programming

Free Corona SDK Code and Tips

I have a full video tutorial course on making Business Apps Using Corona SDK (a framework better known for making 2D games) but for people who look at it and are on the fence, I created an email list where they can get new Corona SDK tips and code every few days…

…along with a sales pitch for the full course, of course! 😉

Free Corona SDK Code + Tips

Use that link to get to the sign-up page. Completely free, and the tips are *very* useful.

Content Creation Miscellaneous Programming

Making Mobile Business Apps with Corona SDK

I’m finishing up the last of the videos for an online course, “Business Apps Using Corona SDK” and just finished the sample app for Lesson 7.

The Lesson 7 videos should be done and online today, and then all I have to do is put up the 3 bonus videos and the course is completely done!

I think it’s turned out pretty well. I wish I’d had something like this available last year, I would have had a lot more apps available! 🙂

Game Development Programming

Programming Moai SDK with Corona Project Manager

For those people who are using CPM for Corona SDK but would like to dabble with Moai SDK, I’ve created a short video that shows how to use CPM with Moai:

And yes, you can even use the free version of CPM for Moai SDK programming. See the Download page on that site.

Content Creation Game Development Programming

iPad – Programming on the Go

While some folks continue to claim the iPad is a “consumption device” other people are using it for creation. And not just the artsy-fartsy types who use it for cool “finger paintings” but more and more programmers are getting into the act.

Apple still has some rules in place that keep the iPad from being a total portable software studio, but it’s really close now — depending on what kind of programming you’re into.

Game Development

Probably the leading tool for game programmers is Codea ( It uses Lua as the language and includes a graphic framework that allows you to “easily” create games, from simple to complex. All of the games you write have to run right inside Codea — that’s part of the Apple restrictions I mentioned earlier.

However, the guys behind Codea created a “wrapper” that can be used with a Codea-based game and fed into Xcode — and out pops a native app that can be submitted to the App Store. With that addition you can now work on a game on the go (Riding the train to work? On your lunch break?) and when it’s done, convert into a native app.

Web Development

There are a lot of text editors on the iPad that cater to programmers (Textastic and Diet Coda are my two favorites) but there’s a new app available that’s aimed at PHP programmers — and even allows you to run PHP code on your iPad. Offline. You don’t have to be connected to the internet.

That’s an awesome advantage to those of us who have wi-fi iPads and are running from place to place and writing bits of code here and there.

It’s called Kodiak PHP and is brand new on the App Store ( Full disclosure, I was given a pre-release copy to play around with but it was with the understanding that I wouldn’t promote it unless I really liked it.

And I do. It’s a very cool tool for anybody who does PHP programming (or wants to get into it). The editor does syntax highlighting and includes an extra row of buttons along the top so you can get to things like $ and ; without needing to switch keyboard layouts.

It’s only $10 after the launch special, but even if you miss the sale it’s worth the price for the ability to code and execute PHP right on your iPad.

If you’re into web development/programming and find yourself away from your desk with time to kill, Kodiak PHP is a cool tool to have at your fingertips.

Look at one of the examples in the screenshot below — grabs info from a Twitter URL in JSON format, decodes it, and displays it on the screen. In PHP, on your iPad. Just way cool.

Kodiak php screenshot1 480

Game Development Programming


I’m just starting work on a new product for game developers. While there are a lot of game development tools out there, I don’t think any of them are doing it right.

Here are some of the best of the bunch (oh, I’m talking about 2D mobile development for the most part – 3D stuff is a whole other kettle of fish (and a kettle I care nothing about)).

Stencyl – one of the oddest game development tools I’ve seen because while it’s based around a visually-oriented IDE, the logic of the game is created by dragging little blocks together to form a kind of flow chart. It’s really kind of fun and Stencyl seems to have a pretty hardcore community around it. The downside is that typing the equivalent lines of code would take a fraction of the time.

Corona SDK – Another odd one in that while they are targeting newer people, there’s no IDE of any kind included. You use your favorite text editor to write the code and then test it in their simulator. One of the nicest things about Corona SDK is how fast it is to get up and running. From a coding standpoint you can get a lot of mileage from just a few lines of code. One con of Corona is there’s no way to expand it – what you can do with it is what you can do and if you want to do something more you have to hope the guys behind the scenes add that functionality at some point.

Moai SDK – Just a month or so out of beta at this point Moai SDK has attracted a lot of attention lately by being chosen as the framework of choice for a couple high-profile games. The big deal about Moai is that it’s open source, which means if you want added functionality you can download the source code and add it yourself (or hire a smart person to do it for you). The worst thing about Moai is the learning curve can be pretty steep.

There are three game development tools, all with things to recommend them, but I’m the sort that’s often dissatisfied with the status quo (I think 200 years ago I would have been one of the guys heading West to see what was there). I want something that combines the best of all three.

And so I decided to write it. It will have an IDE that makes it drag-and-drop easy to create games like Stencyl, with the ease of coding like Corona, and the extensible power of Moai.

I call it Renegade and it will ship in late Q4 2012.

Fast, easy, and powerful cross-platform development (Windows and Mac) for cross-platform games (iOS, Android, Windows, and Mac).

I’m really excited about the possibilities and can’t wait to show it to you.

[Update Nov 20, 2012] — (Warning: drama alert) People are asking about the status of Renegade, seeing as how it’s now the middle of Q4.

The death of my father and the disappearance of my 16yo daughter this summer basically blew 3 months to smithereens. About a month ago is when I finally got things shifted back into Drive but I’m still playing catch-up. (We know my daughter is alive and physically safe, but not much more than that.)

That’s the biggest downside to being a “lone wolf developer” — when life happens there’s nobody else who can take up the slack.

Renegade is still on my list, but pushed back because the scope of Outlaw is in flux. While today Outlaw is a rebranded copy of CPM, I’ve come up with some ways to get about halfway to Renegade — while still allowing it to be used in it’s current form.

Renegade is going to be a complete switch — if you want to use it, you *won’t* be able to write your program any way you want like you can now with Outlaw/CPM. But what I see Outlaw morphing into over the next 2-3 months is something that allows both methods.

The biggest difference between Outlaw and Renegade is the “new stuff” in Outlaw will be using Corona SDK under the hood — I still plan on using Moai SDK for Renegade.

Why not just get to work right on Renegade? Because I think at this point the market for a Corona-based tool is bigger than the market for a Moai-based tool. And I have to pay the bills. My “funding” for tomorrow comes from whatever sales I make today, basically.

But if someone threw a big bunch of money at me? I’d dump everything and focus on Renegade. In a heartbeat.

Content Creation Feature Game Development Programming

Mobile Game Development: Crash Course

On May 5th I’ll be teaching a 2-day course for beginners who want to get started in mobile game development.

Have you ever wanted to create your own game for iPhone, iPad, or Android? This weekend course will show you exactly how to do that!

Get all the details here:

Mobile Game Development: Crash Course