Fun on a saturday evening

Guess who’s back from a trip and is also done with school? Yup, you guessed it, it’s me. The good thing that is that I have time to work on side projects now. Which also means posting more often(hopefully).

So last saturday evening I had some free time and was bored a bit. So I decided to boot up Visual Studio and have some fun. I’ve been wanting to do some image manipulation for some time. Very basic image manipulation. I got inspired by how the old console managed to used the same texture in multiplayer games, while having distinct colors. So I thought, why not try something where I can select the color of an image and change it. And this is what I’ve done with TexCol.

TexCol as it is right now

As it is right now, TexCol allow to load an image given as an argument, select a color from the image by clicking on it and change the occurence of that color on the image with a new color selected through an ImGui window. The way it works behind is very simple. It makes a copy of the current texture, replace every pixel it finds that match de original selected color by the new color, replace the old texture with the now modified texture and voila. Nothing really complicated. The system works using SFML and ImGui and is a single source file.

Where I want it to go

There’s a few thing I would really to change with it. First of all, it’s really incovenient that it loads only through an argument passed at launch. It would be nice to have a way to change the image at runtime, inside the application. It would also be nice to be able to save the now modified image. But more than everything, I really want to change the way the application changes the texture. The it is doing it right now is very consuming from a CPU and memory point of view. It’s not really efficient. What I want to do is do this through a shader. This would shift all the computation onto the GPU instead of the CPU and it would be much faster and efficient. After all, GPUs are made for that kind of manipulation. It would also be a nice exerice and learning experience for me. I do intend of changing the code soon so it works with a shader.

If you’re interested in the code, you can find it here, on my GitHub.

Have a nice evening!

TexCol

It's done: CS Games 2018

Wow, what a weekend it was. Full of surprises. Full of unexepcted turn of events. And one song that played more than 250 times over the weekend(gotta thank my good friend Jesus for that). But we did it. We won the CS Games 2018. Brought back the cup. More than that, I had 3 competitions, and I got a podium on each(sadly no first place for those). But for the team comptitions such as Puzzle Heroes, we got that well deserved first place.

So what are the CS Games? Well it’s the Computer Science Games, a series of 3 hours long competition of different computer science subject, with a few exceptions(such as Participation, Video Games and Sports). It’s the occasion to meet incredible people, have fun, and push ourselves beyond our limits.

And I’m really proud to say we won. A perfect ending to my degree that arrives very soon.

DCIETS With The Cup

Still Alive

Hey there everyone!

It’s been a while no? Now why is that? Well I’ve been real busy with a new job, school and tons of other personnal stuff. I’ve let go a bit about programming in general, and I’m kinda bummed about it. The good news is that I’m still alive. The other good news is that next winter will be my last semester and things should go a bit more smoothly after that. Also, I’ll try as much as possible to keep this blog updated about the project I will be doing during the semester. I don’t know yet what I will do, but you’ll know as soon as I know.

Meanwhile, keep programming!

rsm_utils becomes rsm and is now version 1.0

So recently, I worked on rsm_utils again. Why? Mostly because I worked on another project that used it. And I came to realise that I’ve never released an official version 1.0. So what did I do? Well exactly that. I tagged a revision of git to Version 1.0. Isn’t that cool? And with that came a small renaming. I removed utils. I’ve been using rsm, RSM, Really Simply Made for a while. I’ve never really liked the “utils”, and even the namespace was only rsm(or RSM at first). So bye-bye utils.

What’s next?

Well I decided to a project in GitHub called Version 1.1. It will contain fixes, enhancements, new features. So make sure to report any bug, problem or ideas you’re encountering.

Have a good night friends and have fun with rsm!

Update on The Followers

Hello everyone!

As some of you already know, I have recently decided to open source most of my old projects. As such, I went back to my old project I made back in 2012: The Followers. I had made a small update in 2014. Removing some dependencies, porting the code to Cmake and making it compile on other platforms(it was previously only on Windows). Now we’re 3 years later. And guess what? The code doesn’t compile really. So what did I do? Well I fixed the compiling mecanism with Cmake. To do this, I’ve decided I was gonna make SFML a submodule of the project. I also cleaned the repository.

And now, for the source code: GitHub repository

Have fun!

The day I decided to open my code

About 10 years ago, when I started programming(okay I started doing php 13 years ago, but we don’t talk about the dark ages) I remember reading about Open Source. I was curious. Why would anyone want to share their secret? I was young and the code I was making meant so much to me. It was written BY me. I was proud. Even though the code was bad. To me, it meant revealing the secrets, if a vulnerability was present, could be exploited. I didn’t see any advantages and did not understand the interest.

Stepping into sharing

Fast forward to a few years ago(maybe 6). My point on open source has changed a bit. I understand the concept and why people would do so. By then, I had a few time the occasion of posting on forums and helping other as well. When you have a problem, you find out quite fast that explaining the problem without showing some code, at least a Minimal, Complete and Verifiable example. I remember the first time I showed some code, I was scared and ashamed. I thought people would judge my code. God was I wrong. People were friendly, helpful. Telling me what was wrong, but also what was good and how I could make it even better. This was my first step into this world.

Open sourcing my code

In the last year, I took the decision of opening most of my projects. What has changed? Well for one, I realised that the hardest judge is always ourselves. Sure, there might come someone who will judge your code and treat you like nothing, but that’s the kind of people you ought to ignore. So I’ve decided to open the source of projects that dates of 3years ago, and maybe even further. The code is mostly awful, I was learning, there is so many bad practices and security issues. But it’s also the occasion for me to show the evolution of my knowledge through time. It’s also for me an opportunity to update old code and make it crossplatform. A lot of what I did was not crossplatform and mostly on Windows. Now that I know the power of CMake, I just have to update things. It’s also, and this is probably the most important part, the occasion to share code with friends and collegues, to get their opinion and feedback so I can not only learn and progess, but get better.

The advantages of open sourcing your code

There are many advantages to opening your code:

  • Learning
  • Feedback
  • Security
  • and more..

Like I previously said, it’s a fantastic occasion to get feedback from people and to learn. But what about security? How is it an advantage you might ask? After all, it might exposes security risk. Well the truth is, even if it’s not open, someone might try to break through you things. And the chances of him succeeding if there is a security issue are higher than you think. That is if you’re an interesting target. But let me tell you open sourcing your code for security is an advantage. Because if someone spot the security flaw, he can tell you, or even suggest a fix. There is more chance you’ll have help and support than problems.

So go ahead, open your code. No one will judge you, and it’ll only be beneficial.

Travis is back

Hey there everyone! Two weeks ago, I posted that I updated RSM utils. I also said that I removed Travis CI from the project because it couldn’t build correctly. Well it’s back. Thanks to a my friend eXpl0it3r, I was able to get the right configuration and I am now able to build and run my test cases correctly. Awesome right? Well yeah, and no. Because if you take a look, you might notice that I have a test case that sometimes segfault, only on clang. A single one. Now you probably have figred out where I’m going with this. You guys are more than welcomed to review my code, and do pull requests. I’ll review it and if it’s good I’ll merge it. So test my stuff, use it. Have fun with it!

Ubisoft Game Lab Competition 2017

Hello everyone! So guess what just started? You guessed it. It’s the Ubisoft Game Lab Competition 2017. Last year, I took part in the 2016 edition of the contest. And it was an incredible experience. So what else could I do this year but take part again in the contest? I’m eager to start making this game. And once again, we’re going to be using Unreal Engine.

So what are the rules this year? Well the theme is simple: Playing with time. Sounds simple right? Not really. Because with that comes certain constraint such as: Networking(2 players), AI, Asymetric gameplay. This will be an incredible challenge and I can’t wait to see what is going to come out of it.

During the contest, I’ll try to keep this blog updated with stuff about the contest(and not about it), but I won’t be able to say anything that his more or less private and secret concerning the game. After all, it is a competition and I wouldn’t want someone from another team finding out what we’re doing.

On such, have fun people!

Ubisoft Swag 2017

RSM Utils Update

So some of you might know this, I have this utility library that I’ve started a while ago to help me with a few things. Mostly it’s stuff that I repeat over and over in every project. I also add a few things here and there. But one thing was bothering me. I was tired that it was causing a certain dependancy with a dll/so file. The library being distributed under zlib/png license, to me it didn’t made sense to have this dependancy, even if the code is open source. What I really wanted was to be able to just include the file you are interested in, and voila.

So what did I do? I removed the dependancy. Removed all the .cpp files, removed the generation of a library file, and re-organised the class accordingly. So now, we finally have a header-only utility library. And it works just as well. Also you guys might have noticed that I removed the Travis-CI file. The latest addition to the library requires threads, and I can’t have them with Travis-CI. Finally everyone, remember that you are more than welcomed to do pull requests or to submit issues if you notice anything’s wrong.

On such, take care everyone and have fun!

Simple Password Generator

Hey what is up everyone? It has been a while. I’ve been so busy, and to be honest, I wasn’t sure if I wanted to continue writing stuff. But I’m back, at least for now. And I’m back with a simple online tool for you people who need a password, but don’t want to bother generating one. I present to you my online Password Generator which let you generate easily passwords.

How to use it?

How does it work? Well you really have three possibility. First of all you can go on the landing page. On this page you can give information to the system on how you want your password to look like. But this is long. The second solution is doing a regular GET request to password generated page. This will generate a 12 character long password that may contain letters(capital or not), number and special characters. Finally, you can also do a POST request to the same page, but this time containing information on how you want your password to look like, much like how the landing page do it.

But where’s the code?

As usual, like most of my projects and stuff, the code for this is open source. You can find the code here. The tool is developped in ruby using sinatra. You are more than welcomed to contribute to this project. And don’t forget to follow my Github for more projects.

Until then, take care everyone!