NIK Filters in GIMP, Wallpapers, a book and some more!

Been a long time since I've written something here. So I thought I should post some small things I've done in the mean time.

Running NIK Collection filters on GIMP

I am slowly transitioning to use GIMP more. It's far easier once you've made it to look just like Photoshop - look this guide or this theme - if that's what you are coming from. 

Recently, Google made some filters from NIK, a company it acquired that also makes the app Snapseed for Android, available for download for free. If you look the website, the filters seem awesome. Looking on the web you will findout that people have made it run with GIMP in Windows.

But I also ditched Windows some time ago, and am using Ubuntu. So I decided I would use them in Ubuntu. There isn't much to say here other than, yeah, I've done it, using Play On Linux, both the script for Play On Linux and for Gimp are available for download in the repo below.


This was very useful and allowed me to use them on some images...

A Repository for my Wallpapers

So I don't have a Camera. I mean, a real one, with lots of fun manual controls. My smartphone recently died and I changed to using a Moto X Play - which I feel it's an awesome phone. And it has a 21 Megapixel camera, that although isn't the best on market, can take decent photos on good lighting.

With this, and the new filters, and the fact that I am learning how to use Darktable, I decided to post online the photos that I feel are nice enough to be used as wallpaper by other people. Link below.



And that thing about a book...

Writing is something I am very slow. Like I take a lot of time between writing, reading, rewriting, rereading... But I decided to write something that I think should be easy for everyone, which is building your own computer. I know, desktops aren't exactly the hottest topic in 2016. But building PCs is something I really enjoy doing, reading on the trends, benchmarks, looking up YouTube videos showing the fps for games. Yeah, so hey, it's right here, How to Build A PC.



And what more?...


I feel like I have less and less free time in life the older I get. So there isn't much more. I've made a gist in github in the mean time to throw some homeless scripts and texts, maybe some stuff there will grow in the future. There is a link to my gist down here.


bye for now!


A new blog for fast command line hacks



So I plan to post here and update on what I've been doing. But since I don't really have the time, today I'm just going to link to a small side project!

This side project is Command Line Erico, a small blog, to which I post through a bash script to Github Pages. This script is a fork of the bash script from Carlos Fenollosa, available here.

The idea of this blog came from giving a use for my old Asus EEEPC 701 4G as a distraction free production environment. Since it's too slow to do much bells and whistles stuff, I've been using it as a way to work on small projects. Because it's silent, small and robust, it's also something I can carry on.

So since every once in a while I do some stuff with very simple command line commands, I'm planning on documenting the results on there. That pc also makes as a very good way to access and manage a Raspberry Pi remotely, so stay put for some Raspberry Pi tips appearing there. The only con I've found on using it to blog so far is not having spell check, and since English is not my first language, expect grammatical aberrations.

A Glass of Lores

Hello. This a different post… Nothing was lying around...


I’ve read in a book recently - Steal Like an Artist - a phrase, that’s attributed to a cartoonist named Tom Gauld, “that once the computer is involved, ‘things are on an inevitable path to being finished. Whereas in my sketchbook the possibilities are endless.’”

Since the Moleskines brought the paper as something cool again - I use most the less expensive alternatives -, my sketches proved this to be true.

Ok, so in the post long before I talked about how I was wanting to make a game, then came some programming stuff later. Ok, so a lot of the basic programming stuff is now finished, someone somewhere in the internet said that at the conception a game needs gameplay, and not story. So I followed this advice and worked without story and few graphics to get some gameplay. But I’m making a RPG. A RPG needs a story that connects very well to it’s gameplay.

Ok, so, to this RPG I’m making, I needed some basic background, the story of my world, to build the player story on top. Here I’m presenting a small but significant portion of this story. There is probably a lot of spelling and semantics error, and the names are inclined to change.

A Glass of Lores

My mom told me this story when I was very little, maybe some parts I modified, hearing others in the village. We came from the Unseeable Continent, where existed three small cities, each one with different focus, so near one from the other, with a plain plaza in the heart, where people gathered to discuss their dilemmas, drinked for love, wrote poems, stories and pursued the reason of their own existence. Novatetks produced wine, Ecteletikos focused on the rice crops, and Ykiniantopi breed the Yaks. Their texts travelled the world, and their readers got interested in these small cities.

One of this readers was an Emperor, from a far away land. That emperor was very young, and very impressed with the quality, and requested a visit to Trisan. The emperor visit was not well received by the citizens, who appreciated the isolation from the rest of the Unseeable Continent. The emperor came and went, and during his stay in the land, he noted, looking in the sand, a bright mineral, a very rare one, that he had not seen before in the vast amount as it was there available to the citizens of the three cities. 

Unfortunately, not only did the people from Trisan knew no way of how to extract that mineral from the sand, they had no army, and no way to defend themselves. The emperor sent a messenger to deliver a big floured text that read as threat, “send the mineral or I will send my troops, and I will send my troops to bring your three cities to ashes in less than ten years”.

The people from Trisan decided they needed to be capable of defending itself, they looked the old texts on how to build weapons and started reading on how to fight a combat. A small explorer group was united to find the resources. The scouter group decided the near islands were safer places to explore, because it was known they were uninhabited.

A big island turned out to be the perfect finding - a big mountain made almost solely of iron, so hot in places that it melted to the surface. Weapons could be forged there easily. The island had no fertile ground, and the water there only existed in small lakes that were created by rain. Since the mountain was very tall, clouds always stood over and the rain was certain even if not constant. To make use of Forge Island, the same ships that went to land to bring weapons had to keep returning providing food.

People on Forge Island became united on the task that brought them there. A Forge is a very unsuited place to be working straight, but since work was all that was there, and small tasks, like caring for the crops were not needed anymore, and discussing politics suddenly didn’t seem to matter. But they were very aware of their importance, and they felt like a big family.

Forge Island was unfortunately very open, had a deep sea and with no rocks to protect it from ships that could some day reach it in the imminent war. The people on Forge Island, which was by then a village already, decided to send a small group of people, in two ships, to the nearest and most rocky island, to build a fortress and a lighting post there to warn and defend the people on Forge Island.

This was a very risky thing to do because the nearest rocky island, that was so perfect to have a fort, was so good at it because it has very hard to successfully dock in. When the ships reached this island, was already night, and rain started to pour. The ships crashed near land, and started to sunken, people fled, swimming. Most survived. At the beach they gathered, with much enthusiasm for being alive. But that enthusiasm was soon to vanish.

You see, right after this gathering, which was at night, they turned their heads. Still a little deafed by the accident they didn’t realized that the rain in the island they now were was a storm in the island they come. Forge Island, that was mostly a volcano, erupted, and the night turned red, with white flashes from the distant lightnings.


That eruption lasted for days, we don’t know what happened after in the Unseeable Continent or if there were any survivors in Forge Island. What I do know is the people who survived the crash were too outnumbered to care, and with their knowledge and with what was salvaged from the ships they found this village. We do know we’ve made no contact with people outside this small island. And we did learn how to sharpen our remaining blades to defend from the monsters that inhabit this island with us.
---

We came to the island with the task of building a fort to defend Forge Island. It seemed to matter. We started to built it because it made we feel we had a purpose. We finished it to defend ourselves.

-The book of memories, Chapter 2.

Making an engine to run with custom game code

So, I'm working on my game and decided to share some simplified version of my code here. I'm making a game engine in javascript, and needed some way to code some actions.

The code is here, you can save it as example.html (http://jsfiddle.net/e3b0kocc/):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
    <!DOCTYPE html> <html> <body> <script>
    var engine={}, actions={};
    engine.atomStack=new Array();

    engine.runatomStack = function(){
        while(engine.atomStack.length > 0){
            var actionToRun = engine.atomStack.shift();
            actionToRun[0](actionToRun[1]);
        } 
    };

    engine.action1 = function( param ) {
        //execute something param[0]
        console.log("executed action 1, param " + param[0] ); }

    engine.action2 = function( param ) {
        //execute something param[0] and param[1]
        console.log("executed action 2, params " + param[0] + " " + param[1] ); }

    actions.action1 = function( param ) {
        //do something param[0]
        var params = param.split(';');
        engine.atomStack.push([engine.action1,params]); }

    actions.action2 = function( param ) {
        //do something param[0] and param[1]
        var params = param.split(';');
        params[1]=parseInt(params[1],10)+2
        engine.atomStack.push([engine.action2,params]); }

    translateActions = function(action, param) {    
        actions[action](param); };

    eventActivate = function(event) {
        for (var i = 0; i < events[event].length ; i++) {
            var action = events[event][i];
            var actionAndParam = action.split('|');
            translateActions(actionAndParam[0],actionAndParam[1]);
        }
    };

    events = {
        1: ["action1|5","action2|2;2","action1|2"],
        2: ["action2|5;2","action2|2;2"],
        3: ["action2|5;2","action1|2"] };
    </script> </body> </html>

Something happens, and I need to run the actions inside an event. I call eventActivate passing the event that should happen. The function translateAction read this information and calls the function that set up the actions. My logic is based that a level contain events, an event can contain actions, and each different action contain atoms.

So, for example, at some point you call eventActivate(1) and that will push the relative events on the stack. Then from time to time the engine is used and calls engine.runatomStack() to execute whatever is there. Below is an example using f12 to call developer console and insert javascript (used Firefox).

//engine.atomStack is Array [  ]

eventActivate(2)
//engine.atomStack is Array [ Array[2], Array[2] ]

engine.runatomStack()

//prints:
//   "executed action 2, params 5 4" example.html:18
//   "executed action 2, params 2 4" example.html:18

//engine.atomStack is Array [  ]


I decided to make this post because I asked a question on stackoverflow and had to make a simpler version of my code to show there and thought that it could be useful to show here too!
Powered by Blogger.