2016

Archive for 2016

Rocambolli and other good things from 2016

So, I have been working in this javascript game for almost two years now! The first A Glass of Lores post was in 31 january 2015! So I have been learning, and you can say some piles of javascript code has been lying around. 😁

I have been learning a lot for the past years, I have recently read A Theory of Fun, for more input on how to make fun games, and I also needed some help on code, so I've read Game Programming Patterns, and a long list of web articles that I can put on a new post once I can find all of them! Also, with Influence: The Psychology of Persuasion and Contagious: Why Things Catch On I started my foray in understanding basic marketing. I am trying to also learn WebGL by reading WebGL Programming Guide: Interactive 3D Graphics Programming and at last I decided to install Unity in Ubuntu and try to learn C# - I am approaching this in a slow pace since I plan to finish my main game before diving too much on it. Let's see things done...

Rocambolli

Rocambolli The Game


Recently I participated in Ludum Dare 37, which had the theme One Room. It has been a ton of time since I participated in similar events, and this one was marked by going outside of my home during theme announcement, and meeting the really great Rafael Giordanno who motivated me a lot by talking his previous 7 short games, his learning, and his teaching. I was a bit unsure if I would be able to do something, going compo, which means doing a game alone, and doing everything, planning, level design, code, graphics, music, sounds! But after he told me how prepared he was, and that he was curious to what I was going to do, damn, I was going to start and finish something in that weekend.


What followed next was some crazy fast coding, in javascript, and 25 hour later I had a really ugly code, that generated this platformer game, Rocambolli, with sounds and everything working. Oh, and a Itch.io account! And the github with everything is here. This was awesome, and I want to do this again!

KTG - Keyboard Touch and Gamepad

Under heavy time constraints I coded a spaghetti interface.js, this code is awful, but it worked, and was great with keyboard and gamepad working! Rocambolli could be played. Two days later I had an idea to do this proper, and I created the KTG - Keyboard, Touch and Gamepad project. The idea is to have a simple javascript library that could unify how a simple javascript game would deal with keys, be them on touch screen, a keyboard or a joystick. I really like it! If you are doing something with javascript, this could be a simple drop in solution. I plan to mature it and migrate it into my fgmk project! Now after Ludum Dare I have moved KTG to Rocambolli so it can be played in mobile too!

Fullscreen Button

Also, when doing a tiny javascript game, I find myself often in need for a fullscreen button, since going fullscreen is still not easy on mobile without adding the page to home screen. So if you are ever in need of this, I got you covered now!

A Glass of Lores



I will leave just a link to a youtube video of a somewhat recent status of the first scene in A Glass of Lores, just so people can know the project is going forward! Here's something: making a RPG takes a long time.

Happy holidays, Merry Christmas, and see you next time. 🙌



png-font.js

using a bitmap font to write text on canvas. 

When I made the game engine, my first idea was to make everything in English. But then I noticed most people really like localized text, and supporting more languages is as important as supporting many platforms.

When I started writing what you have to be different so I could support different languages, at the end point, I had a problem with my selected pixel font, which didn't supported many characters. And fonts with more characters just were too big in size.

After asking on Twitter, people pointed me to the GNU UNIFONT, and since the Font is awesome and actively maintained, I decided to use it! Paul Hardy sent me a lot of material so I could learn the basics on fonts, which I knew nothing.

Instead of using the true type font, which is around 12MB, I got it's source bitmap, converted it to png, and wrote a js script to allow me get the glyphs from the png and place on html canvas, with the minimal things for a sane use - like word wrapping. Total size is now 840kB, which loads faster!

This lead me to build this tiny js script, the png-font, which you can get here: github.com/ericoporto/png-font .  I sent an email to FSF regarding licensing, but I read the GNU embedding exception clause and interpreted that it's ok to use it in this lib with MIT license.

There is also a demo here: ericoporto.github.io/png-font


Just a video demonstration

This is just a video of the FGMK making a chest by modifying the tile map.

One of the important concepts is that you are free to edit any tile - the building blocks of the these 2D world - in any place in the map, and it's ok to do it.
FGMK 

FGMK is my first attempt at a game maker

Since the post A tilemap in PyQt for a bigger game Project I have been working in something that at the time I wasn't quite sure of what it was. And now I think I am going somewhere. I present you my game maker, named FGMK.


At the time of this writing, I am at version 0.5.3, I have a huge backlog of things I want to implement: scripting, plugins, monster design, hero design, skill design, scripted battles, ...

So what's this? Well, a long time ago, I participated in the 2012 edition of the Global Game Jam. At the time, the game we made (with Unity) could be played in the browser, but required plugins. So the person that wanted to play your game had to install the Unity plugin. The Unity plugin was available only to Windows, so not only you had to convince the user to install it, he had to use the specific system to play the game. 

At the same Global Game Jam, a guy made a game with HTML and Javascript. The game was great, and you only needed a browser to play the game. And no plugins. I was impressed. Small code, that worked well anywhere. And the code at the time was just there, no license. I talked to the single developer of the game, asked if I could take the code, look at it, and build something VERY similar. This guy is Lino and the game he made was Redo. He said "sure, code is fine, the assets I have to ask to not to use because I am using in a game I am publishing".

So at first I made a simple python visualizer for the maps in Redo (this was around August 2014). And then I decided, ok, time to make an engine I can freely script. The engine evolved, I decided to try to build a map editor... And after lots of commits, and lots of refactoring to have something that you could run in most operating systems (Win, OSX, Linux)... Now I have something I feel it's ok to be kind of proud.

So FGMK was to be an acronym of Fan Game MaKer. It's also easy to type in the shell, because I typed this string a lot.

The Github page is github.com/ericoporto/fgmk . If you have Python3 (and pip), you can install using:

pip3 install fgmk

And that's it. When I reach a nice 1.0.0 I will release real packages for the three main operating systems.

If you are only curious about the engine, the code is in github.com/ericoporto/fgmkJsEngine and there is a demo here. The demo should run in anything that has a keyboard or a touchscreen. And you only need a browser.

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.
Powered by Blogger.