Last week I released a game called Friendsheep, and open source repositories generated during game development. It’s a project I’ve been working on from 2015 until now. It is a mobile game for iOS- and Android phones. When this post is being written the game has got around 300 installs (rounded down). I got help releasing this game from Science Park here in Jönköping. Thank you very much!
“A deranged professor and farmer wanted to grow his two pigs, Baconesse and Porky, larger because of his unstoppable food cravings. But in his lab, the professor accidentaly spilled the bottle of toxic waste into the pigs’ food supply. The pigs mutated into Supersheeps with the amazing ability to fly. At first everything seemed alright, except for the pigs being mutated into Supersheeps. As time went on the Supersheeps needed constant feeding to stay alive and the professors food was running out. It was in this time of chaos the sheeps bond and friendship grew stronger. When the food was completely gone they decided to fly away to find food elsewhere. Now you must help them survive for as long as you can!
That is where you, as a player, comes in. The two supersheeps are out hunting for superfood in the form of clovers. They can only be gathered up in the air since they are very light weight. The mission is to keep both sheeps in the air at the same time, if you miss a clover the sheep will loose energy and loose their ability to fly. The clover is also color coded so the sheep with the red cape can only eat red clovers, and the sheep with the blue cape can only eat blue clovers. They are allergic to each others clovers.”
Although not all of the code from Friendsheep is open source, some components from the game has been released into the wild. You can check out the Object pooler and an example project (containing three tutorials now but more to come) on Github.
Object pooling is used to tuck away already instantiated game objects instead of destroying them.instantiating and destroying objects cost a lot of resources for the device running them, this i specially important on phones. So instead of instantiating a game object you as the object pooler to do it for you. When you are done using the object all you need to do is deactivate it. An example where this is used could be when firing bullets from a gun. When the bullet has hit its target(or not), the bullet is disabled and put into the object pool until the player fires again.
The unity examples repository currently contains three different examples: Saving and loading data in unity tutorial, Toggling sound on and off tutorial, DontDestroyOnLoad tutorial – Keep music playing when reloading scene.
You can automate screenshots in mac os x with Screenbar. It’s a menu bar application from where you can start and stop a timer that takes a screenshot on a set interval of seconds.
I’ve written before about a terminal script found on TrickyWays that takes a screenshot every 5 seconds and saves it to your desktop. That is what Screenbar does. But you get a user interface in the menu bar where you can start and stop. You can also set how many seconds the program should wait before taking the next one. I needed this program myself when taking screenshots for a game i’m working on.
To start taking a series of screenshots you click on the Screenbar icon and select Automatic Screenshot. They will we saved on your Desktop.
To stop the automatic screenshots go back to Screenbar and click Stop automatic screenshot.
This program is open source so if you know your way around swift you can fork the project and send pull requests back if you’d like!
Need to check your twitter feed without anyone noticing? Tell your IDE to display the tweets as a python class! Sublime Text productivity plugin shows your twitter feed inside Sublime text without having to browse twitter.com.
The Problem to be solved
This plugin started as a joke between me and a colleague. We sit in an open office at work. I’ve always had my desk in a corner before, and no one could see whats on my computer monitors. One day this changed and i got a desk in the middle of the room, with my monitors facing a way so that all prying eyes could see what i did all day. How do i check my social medias without being caught? Well… you mask the tweets as a class in your IDE of course :=)
What it does
This plugin adds a new menu called “Productivity”, and asks twitter via oauth to get your twitter home feed. Then the plugin creates a python class(that is trying to follow the PEP8 standard). This way you don’t have to open a browser and go to twitter.com.
Installing and testing it
At the time of writing this post the plugin needs to be installed manually. But don’t worry, adding it to the package manager of sublime is to be done.
1. Download the repo from Github.
2. Extract the repo into the sublime plugin path of Sublime:
- (OSX): Users\”Username”\Library\Application Support\Sublime Text 3\Packages
- (WIN7): C:\Users\”Username”\AppData\Roaming\Sublime Text 3\Packages
3. This step will be unnecessary in the future, but for now you need to create a twitter app.
Open up the the file \Sublime Text 3\Packages\Productivity\twitterapicall.py and add the consumer key, consumer secret, access token and access token secret to the lines 8 – 11.
Currently there is a bug that stops the plugin from running the first time starting Sublime. But the work around this is to open \Sublime Text 3\Packages\Productivity\productivity.py and just resave it. This should be working in the latest version now.
Now you are done and can use the menu Productivity -> Twitter
This plugin is open sourced at Github and i’ve got a few issues that needs to be fixed. You are very welcome to fork it and help me with them. Or you are just as welcome to add your own ideas to the plugin.
Screenshot from the plugin
You can add Flattr button to markdown on your github repo’s (or any other service that uses markdown). Here is how.
Support this open source repo by using [![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=ChristianEngvall&url=https://github.com/crilleengvall/GitUndo&title=GitUndo&language=&tags=github&category=software)
And this will give you a Flattr button looking like this:
I myself has started using flattr, if you want to support the posts shared on this blog you can use the Flattr button at the top of this post.
Git undo is an extension for git that adds convenient,and easy to remember, commands to undo commits, applied stashes and pushed merges.
Currently there are three commands you can run to undo things. git undo commit, git undo stash-apply and git undo pushed-merge <merge-commit-hash>.
The installations is quite simple right now, download the project and copy git-undo to /usr/local/bin/ if you are running Linux or mac.
On Windows you put the file into C:\Program Files\Git\mingw64\libexec\git-core or C:\Program Files (x86)\Git\mingw64\libexec\git-core depending on where git is installed.
git undo commit
the undo commit command undos the latest commit made and stages the changes from that commit, so you will not lose the changes, but can for example add files you forgot before committing. You can also do changes before committing again. To read more about how this command works you can read this post.
git undo stash-apply
the undo stash-apply, does what it says, if you have applied a stash on for example the wrong branch you can use this command to undo that, this command comes from this blog post where you can read more.
git undo pushed-merge <merge-commit-hash>
the undo pushed-merge helps you undo a git merge that is already pushed to the origin. run a git log to get the merge commit hash. Read more about how this works.
This is an open source project, if you would like to add some undo method you can fork the project and send a pull request!