Adventures of an Entrepreneur
  • Creating a Mobile Apps/Games Company

What are Imagesheet and Sprites?

4/24/2014

1 Comment

 
If you are starting in game development, you may find yourself lost in some terms that you never heard before. In this post I will talk about 2 of them: Imagesheet and Sprites.

Imagesheet

Imagesheet is simply an image file that has several independent images inside. Here is an example:
Picture
Source: Corona Blog (Dinamically Optimized Sprite Sheets post - 10/09/12) - Link #2
As you can see, inside of 1 image file there are several independent image files. In this case, all independent images are of a boy, but it could be any other image (like bird, lamp, boy, ... everything together in 1 file).

Why would I use an Imagesheet?

There are mainly 3 reasons.

The first reason is performance. Loading an image is an operation that access a file, so it degrades performance. One way of dealing with the performance issue is pre-loading all images when your app/game starts. You could do that by loading each image file, but imagine doing that for 50+ image files? It is much easier if all these images are inside of just 1 image file, so you do only 1 image loading. 

The second reason is optimizing file size. Having several images inside of just 1 image file allows a better use of image compression, resulting in smaller file size.

The third reason is to create animation. If you noticed, the images inside of the imagesheet above are frames of the boy walking. If you go thru these images within a certain speed, you will see the boy waking. That kind of animation using an imagesheet is what we call sprites (we talk about sprites just below).


How do I access an image inside the imagesheet?

That depends on the coding language that you are using. But the main principle is always the same: you pass the imagesheet file and some extra information about the position of the image that you want.

Sprites

As mentioned above, we usually refer to sprites as set of images that together create an animation. Each image that is part of the total animation is called frame and when we pass thru the frames at a certain speed you see an animation.

Below is the animation of the boy walking. It was done using the imagesheet above using the first two images of the 3rd row, at the speed of 2 frames per second. 
Picture

Create Imagesheets/sprites

You can create a imagesheet manually by putting all your images together in the same file, but doing that way is time-consuming and you will not benefit from compression improvements.

So, there are a lot of tools that you can use to create a imagesheet, These tools makes you life easier and you just need to pass the image files and it creates the imagesheet for you. One software that I like and use is the TexturePacker. It is very simple to use and it also allows you to create imagesheets directly from swf files.

Imagesheets/Sprites on Corona SDK

If you are using Corona SDK to create your app/game and want to learn more about the code specifics, just read the links below:

[1] http://coronalabs.com/blog/2013/05/14/sprites-and-image-sheets-for-beginners/
[2] http://coronalabs.com/blog/2012/10/09/dynamically-optimized-sprite-sheets/


That is it for today. 
1 Comment

PR Hacking - Different approach for marketing/PR

4/4/2014

0 Comments

 
I recently saw a video about PR Hacking, which talks about a different strategy to get PR about your product/startup. 

Basically, it tells you to approach the media not only with information about your product, but trying to relate your product with something that media might already be interested or looking for to write about.

In the video, is given two examples, both very interesting in terms of the strategy used but mainly about the outcomes. I will summary the first example for you.

The first example is about a startup/app called Klooff, which is basically a Instagram focused on pets. So, the user takes a photo from his/her pet and uploads it using the app.

Trying to get media about such type of app may not be easy, since the market is overloaded with Instagram-type apps. So, after some brainstorming, was decided to relate pets with relationships, which is a topic which the media is much more willing to talk about that.

They tried to find some survey about what a dog breed can say (or at least gives the impression) about his owner. They didn't find any so they did one survey but their own.

With the survey result, they approach the media and had a great coverage.

For more detail about that example, just watch the video.

That method of trying to get PR is interesting, but as you can see, can be very demanding also. But in any case, you now have one more way to think about your PR. 
0 Comments

SSL Certificates + Adding SSL certificate on your Website

4/2/2014

0 Comments

 
Nowadays, the use of SSL on your website or internet communication is a must. So, in this tutorial I will show the common types of SSL and how can you add it to your website.


What is SSL?
SSL means Secure Sockets Layer and it has the objective of protecting (via encryption) your communication over the internet.


If you use internet banking, you should be familiar with seeing a "Lock" icon on your browser, indicating that your communication is secure. This is usually done automatically when you access your bank website using httpS instead of the normal http. This happens because the browser identifies that the server is using a SSL certificate issued by trustful company (called Certification Authority - CA). You can create own your SSL certificate (instead of one issued by a CA) but the browsers would not recognize you as one of their trustful companies, so even thought the communication will be encrypted, the "lock" icon will not appear and probably an alert will be given by the browser to notify the user about that.

So, having a SSL certificate issued by a CA is the best way to show to the users/visitors of your website that their communication is secure and your website belongs to you.


Types of SSL Certificates
To have a SSL certificate issued by a CA, you just need to go to a CA website or one of its representatives (usually the Domain Providers are) and buy one. The CAs sells different types of Certificates, each one with different objectives and types of verification and even warranty.


For our purposes, we will restrict ourselves to Domain Validation purposes, that is when you just want to have your domain using a SSL Certificate issued by CA without further validation (like Organization validation).


A SSL Certificate can be issued to validate 1 domain (like www.redbeachgames.com) or several domains. So, CAs have several packages with different prices. One package that is pretty common is the Wildcard SSL certificate, that is when 1 SSL certificate can be used for validating any subdomain variation, like redbeachgames.com, www.redbeachgames.com, news.redbeachgames.com,.... Usually we indicate wildcard domain using "*" as *.redbeachgames.com.


Prices of a SSL Certificate issued by CA
SSL Certificate price varies a lot among CAs. So, I recommend you to do a extensive search to find the best cost-benefit for you.

The place that I found to have the best price was on Namecheap that is a Domain Provider that sells SSL certificates issued by several CAs like Comodo, Verisign,...  The SSL certificate is totally independent from where is your domain is parked, so you can have a domain from GoDaddy and buy the SSL Certificate from Namecheap, after all, what matter is the CA issuing the SSL Certificate and the provider that is running your webserver/webpage.

Just to give you a range of price, you can buy a single domain validation for ~9/year or a wildcard domain validation for ~$95 / year.

You may think: "So, if I have 10 different subdomains or less, it is better to buy separate certificates instead of 1 wildcard certificate". That might not be true. Some website providers also charge you for using SSL. Example, right now Windows Azure charges $9 per month (prorated hourly) per certification. Besides that, having several certificates just add more work, since you will have to manage them all separately.


How to add a SSL Certificate to my website:

The overall process is:
1) Choose a SSL Certificate package from a CA
2) Create a CSR (Certificate Signing Request) on your local machine
2) Send the CSR to the CA (Certification Authority - the company that will create your SSL certificate)
3) The CA will send you the Certificate. Now, you just need to configure your server to use it.


So, let's go the step by step tutorial:


1) Choose a SSL Certificate package from a CA
Prices varies a lot. I found that if you buy the SSL directly from the CA website you might not get the best price. Usually Domain Providers sells SSL issued by CAs and they have a better price.

As mentioned before, the place that I found to have the best prices was Namecheap. And their customer support is also great. 


2) Create a CSR (Certificate Request) on your local machine
On your MAC (if you use Windows, click here and follow the instructions of "Get a certificate using Certreq.exe"), open your terminal and type: 
openssl req -new -nodes -keyout myserver.key -out server.csr -newkey rsa:2048
After running the command above, you will be asked some information that are straight forward to be filled. The only attention that you need to have is when filling the "Common Name" that should be filled with the website address that you want to use the SSL like "www.redbeachgames.com". If you are using a wildcart SSL, you can fill it with "*" in the subdomain, like "*.redbeachgames.com".
Country Name (2 letter code) [AU]:BR
State or Province Name (full name) [Some-State]:Rio de Janeiro
Locality Name (eg, city) []:Niteroi
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Red Beach Games Ltda
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:*.redbeachgames.com
Email Address []:admin@redbeachgames.com

Please enter the following 'extra' attributes to be sent with your certificate request
A challenge password []:
An optional company name []:


3) Send your CSR to your CA
This is step is usually pretty simple. Usually the company from you bought the SSL certificate (the CA or its representatives like Domain Providers - GoDaddy, Namecheap,...) will ask you to upload or simply paste the CSR content on its page. 

If you used the command above, your CSR will be the file server.csr.


4) Configure your web server to use the SSL Certificate
Each server has its own way of being configured to use the SSL, so I suggest you to look on your server provider for instructions.
If you are using a Windows Azure Website, you can find the instructions here.

That is it. Hope that you find this tutorial useful. If you want to know more about a specific tech/mobile topic, just let me know on the comments.


Another useful links:
SSL on Azure Web sites: http://www.windowsazure.com/en-us/documentation/articles/web-sites-configure-ssl-certificate/

CSR generation on different systems:  
https://support.comodo.com/index.php?_m=knowledgebase&_a=view&parentcategoryid=33

0 Comments

    Author

    This blog it not updated anymore.  

    Archives

    February 2015
    June 2014
    May 2014
    April 2014
    March 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013
    December 2012
    November 2012
    October 2012
    September 2012
    August 2012
    July 2012

    Categories

    All
    Data
    Event
    Fun
    Games
    Key Success Factors
    Management
    Marketing
    Mobile
    Monetization
    Movies
    Startup
    Statistics
    Technical
    Tutorial
    Videos

Powered by Create your own unique website with customizable templates.