| CODE EXAMPLE FOR TOUCHSCREEN DPAD USING LIBGDX |
|

|
Hello! Now that you had a lot of time to play with the code i wrote on my previous post, here's an example Eclipse project that uses that same code of my class GameDPad for you to test and use as reference. (Well it is not the SAME code, because the first one used the fourth quadrant of the cartesian coordinate system, and this one uses the first quadrant.) Why the change you ask? Well, the first time i was using the Canvas API where the origin is at the top left corner, and this example uses the Libgdx Framework which starts with the origin at the bottom left corner. Note that it really is basic stuff, and maybe it's not the best implementation but it works nice enough, although i intentionally left some gaps for you to fill. I'm sorry if you expect me to write down EVERYTHING you need, but i'm the kind of person that thinks that you will learn more by yourself than having it all do... |
| Read full post and comments |
TAGS: PROGRAMMING JAVA ANDROID TIPS THINGY GAMES |
|
| HOW TO MAKE A BASIC DPAD FOR TOUCHSCREENS |
|
|
As i told you on an earlier post, Starship Constructor is a puzzle game (maybe i didn't state puzzle but you can infer that from the text), but that doens't mean that i don't test other genres. I wanted to test something really basic for a platformer and i needed to use a directional pad or DPad. That being said, as usual, i didn't know how to do it.
So, i looked at 2 games i bought from the Play Store, Eternity Warriors 2 and N.O.V.A 3. The way they made the Dpad was "wherever you touch, there you'll have your pad". Of course this is not entirely true, because there's only one restriction, "only if you touch on the left side of the screen". So, that's two things to have in mind. The second one is the easiest, because you can just check if the TouchEvent X coordinate is between the boundaries.
X = [0 ... screen_width/2]
Now the first one is tri... |
| Read full post and comments |
TAGS: PROGRAMMING JAVA ANDROID TIPS THINGY GAMES |
|
| RSS FEED FOR YOUR NEEDS |
|

|
By now you should have noticed that most of the times i like doing things myself, without any pre-made tools like WordPress, Blogger, Tumblr, etc. Not that i have anything against them. I just like to know how to do them, the best way is doing them myself.
Today i'm going to show you how i made this site's RSS feed. I had never done one before, and it is surprisingly easy to do. I'm not going to give you the introduction to what RSS is, because probably Wikipedia is the best way to go for it, so let's just say that for me, it is a nice standardized xml format which will let your "feed" to be read by content aggregators.
I will use PHP to build the XML, and MySQL to get the content. Just so you know, we'll make an XML similar to this:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org... |
| Read full post and comments |
TAGS: WEBSITES PROGRAMMING TIPS RSS PHP MYSQL |
|
| USE FACEBOOK OPEN GRAPH AND INSIGHTS ON YOUR WEBSITE: PART II |
|
|
Now that you have tested the Open Graph metatags, we are going to use Facebook's Javascript SDK to get the Like and Comments Box working on your page. Keep in mind that this will cover only the basics. If you want to know much more about the topic, click here.
The first thing you need it's a channel.php on your website. Facebook kindly helps us giving us the code to use inside:
<?php
$cache_expire = 60*60*24*365;
header("Pragma: public");
header("Cache-Control: max-age=".$cache_expire);
header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$cache_expire) . ' GMT');
?>
<script src="//connect.facebook.net/en_US/all.js"></script>
So, what the hell is a channel.php? Well, according to Facebook having it "greatly improves the performance of the JS SDK by addressing issues with cross-domain communica... |
| Read full post and comments |
TAGS: GOOGLE OPENGRAPH INSIGHTS PROGRAMMING WEBSITES TIPS |
|
| USE FACEBOOK OPEN GRAPH AND INSIGHTS ON YOUR WEBSITE: PART I |
|

|
Open graph is a protocol that will help you "integrate" your website with Facebook, letting you like, comment or subscribe to an URL. For a complete list of Social Plugins you can click here. Using Facebook Insights you will see the statistics of by date and how many likes or comments you have.
I'll tell you the truth, i think i still don't know how to use it to it's full extent, but this two part "guide" can help you with the basics. This will show you how to customize the information that will be shared when you post to your Wall an URL of your website, and how to put a Like Button and Comments Box.
The first thing you need to know is that for everything to work, you'll need to use these metatags on your HEAD section of the webpage (the example used is waldou.com so you should change it accordingly:
<meta property="fb:admins" content="81... |
| Read full post and comments |
TAGS: GOOGLE OPENGRAPH INSIGHTS PROGRAMMING WEBSITES TIPS |
|
|