Archives: Uncategorized

Making a mobile 2D shooter game

Making a mobile 2D shooter game

Today I started working on a simple shooter game. It will be a fast and fun 2D shooter that is easy to learn, imposible to master! The art comes from the Kenney.nl donation package. I want to take advantage of the accelerometer to create some cool gameplay mechanics. It runs on mobile devices (android and iOS) and is built using Lua and CoronaSDK.

Continue reading

How to change delay for Dock autohide – OSX

A nice trick to make the autohiding mac Dock appear almost instantly.

  1. Open Terminal.app
  2. Type in this command:

defaults write com.apple.Dock autohide-delay -float 0 && killall Dock

If you ever want to revert these changes and get the delay again, use this command in the terminal:

  1. Open Terminal.app
  2. Type in this command:

defaults delete com.apple.Dock autohide-delay && killall Dock

 

A better NSLog!

While using objectiveC, try this macro to get detailed information with each NSLog, like line number, function name. It takes multiple arguments and can replace NSLog without a problem. Here is the macro:

//A more detailed NSLog by josellausas.com
#define NSLog(__FORMAT__, ...) NSLog((@"\n\t {LOG} %s -[Line %d]=> " __FORMAT__ "\n\n"), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)

The resulting console log will look something like this:

2013-06-18 15:12:07.062 AppName[12172:c07]

{LOG} -[ViewController viewWillAppear:] -[Line 67]=> A Log Message

 

A Better SlideView for Corona SDK

I was making an app that needed 2 SlideViews on the same scene, but there  is a problem with the sample code for a SlideView in Corona SDK: You can only have one SlideView per scene.

I modified the code to make the SlideViews independent from each other, enabling the creation of more than one instance for a single scene.

This simple tutorial will guide you on how to create a GroupObject that contains images to slide through, and implement the “touch” listener that will scroll through the images.

Continue reading

Back to top