<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Programming on Canoi Gomes</title>
    <link>https://notes.canoigomes.com.br/tags/programming/</link>
    <description>Recent content in Programming on Canoi Gomes</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>pt-br</language>
    <managingEditor>canoigomes@proton.me (Canoi Gomes)</managingEditor>
    <webMaster>canoigomes@proton.me (Canoi Gomes)</webMaster>
    <lastBuildDate>Sun, 23 Jun 2024 19:00:00 -0300</lastBuildDate><atom:link href="https://notes.canoigomes.com.br/tags/programming/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Formatos Binários #1 - Arquivos Binários</title>
      <link>https://notes.canoigomes.com.br/posts/arquivos_binarios/2024-06-23-arquivos-binarios/</link>
      <pubDate>Sun, 23 Jun 2024 19:00:00 -0300</pubDate>
      <author>canoigomes@proton.me (Canoi Gomes)</author>
      <guid>https://notes.canoigomes.com.br/posts/arquivos_binarios/2024-06-23-arquivos-binarios/</guid>
      
      <description>&lt;p&gt;Você sabe como funciona um arquivo binário? Aqueles arquivos que ao
tentarmos abrir num editor de textos qualquer, aparece um monte de
símbolos que mal dá para entender do que se trata. Bem, e se eu te
disser que tem uma lógica por trás deles? E isso é mais ou menos o que
quero abordar nessas linhas.&lt;/p&gt;
&lt;h2 id=&#34;o-que-é-um-arquivo-binário&#34;&gt;O que é um arquivo binário?&lt;/h2&gt;
&lt;p&gt;Simplificando bastante, um arquivo binário nada mais é que um arquivo de
texto, porém formatado de uma maneira bem específica onde o programa que
for fazer uso daquele arquivo deve saber como é a sua estrutura interna.
Quando digo que não se difere muito do arquivos de texto, é porque temos
isso com eles também, se criamos um arquivo JSON ou XML, também temos
uma estrutura que se for bagunçada é o suficiente para corromper o
arquivo. Da mesma forma ambos são usados para guardar algum tipo de
informação. A principal diferença é que arquivos de texto estão
preocupados com os caracteres do arquivo, já um arquivo binário se
preocupa com como os bytes estão posicionados, e até mesmo cada bit.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Selene Engine</title>
      <link>https://notes.canoigomes.com.br/posts/selene/2023-10-19-selene-engine/</link>
      <pubDate>Thu, 19 Oct 2023 21:07:00 +0000</pubDate>
      <author>canoigomes@proton.me (Canoi Gomes)</author>
      <guid>https://notes.canoigomes.com.br/posts/selene/2023-10-19-selene-engine/</guid>
      
      <description>&lt;p&gt;In the last weeks i was focusing on restructure one of my projects, this project is basically a game framework/engine that uses Lua as script language, it initially was called &lt;a href=&#34;https://github.com/canoi12/poti&#34;&gt;poti&lt;/a&gt;, but i had another project called &lt;a href=&#34;https://github.com/canoi12/selene&#34;&gt;selene&lt;/a&gt; that was one of the main first tries on computer graphics stuff (using SDL2 and OpenGL), and i was trying to find another use case, so i decided to switch both projects because &lt;code&gt;selene&lt;/code&gt; fits well as a Lua project (lua means moon in portuguese, and selene is the Greek goddess of the moon), and &lt;code&gt;poti&lt;/code&gt; will become my C lib, but don&amp;rsquo;t started to work on it yet.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Selene Engine [PT-BR]</title>
      <link>https://notes.canoigomes.com.br/posts/selene/2023-10-19-selene-engine-pt-br/</link>
      <pubDate>Thu, 19 Oct 2023 12:37:00 +0000</pubDate>
      <author>canoigomes@proton.me (Canoi Gomes)</author>
      <guid>https://notes.canoigomes.com.br/posts/selene/2023-10-19-selene-engine-pt-br/</guid>
      
      <description>&lt;p&gt;Nas ultimas semanas estava focado em reestruturar um dos meus projetos que é basicamente uma game framework/engine que utilize Lua como linguagem de script, o projeto inicialmente nasceu como &lt;a href=&#34;https://github.com/canoi12/poti&#34;&gt;poti&lt;/a&gt;, mas há algum tempo estava tentando ressignificar outro dos meus projetos, a &lt;a href=&#34;https://github.com/canoi12/selene&#34;&gt;selene&lt;/a&gt;, e por achar que o nome casa mais com o projeto em questão, decidi fazer essa troca.&lt;/p&gt;
&lt;p&gt;Inicialmente eu estava focado em fazer a framework base em C e operar ela utilizando Lua, então a ideia seria ter um renderizador básico em C, uma engine de áudio básica também, etc. Maaas, decidi seguir por um caminho diferente, e até explorar mais a ideia inicial do projeto que é a de ter um core simples e o projeto ser o mais modular possível via Lua, então ao invés de construir essas estruturas em C usando as libs (SDL2, OpenGL, &amp;hellip;), achei melhor expor as funções das lib pra Lua e construir a framework lá.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>LÖVE Básico 1 - Lua</title>
      <link>https://notes.canoigomes.com.br/posts/love2d/tutorial-series/2021-06-07-l%C3%B6ve-tutorial-%231-pt-br/</link>
      <pubDate>Mon, 07 Jun 2021 19:16:40 -0300</pubDate>
      <author>canoigomes@proton.me (Canoi Gomes)</author>
      <guid>https://notes.canoigomes.com.br/posts/love2d/tutorial-series/2021-06-07-l%C3%B6ve-tutorial-%231-pt-br/</guid>
      
      <description>&lt;p&gt;Bom, esse texto é uma tradução daquele tutorial sobre Lua com algumas adaptações e modificações, agora vai! Aqui vou dar uma pequena introdução sobre o básico:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tipos&lt;/li&gt;
&lt;li&gt;Tipos de variáveis&lt;/li&gt;
&lt;li&gt;Laços e Condicionais&lt;/li&gt;
&lt;li&gt;Tabelas&lt;/li&gt;
&lt;li&gt;Metatabelas&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;lua&#34;&gt;Lua&lt;/h3&gt;
&lt;p&gt;Lua é uma linguagem de script brasileira, criada na PUC do Rio de Janeiro. A linguagem não foi criada com o foco inicial em ser usada para gamedev, mas acabou sendo adotada por vários jogos, inclusive alguns bem conhecidos como World of Warcraft, Ragnarok, Garry&amp;rsquo;s Mod, etc. Em Lua, todas as suas estruturas serão feitas através das &lt;code&gt;tabelas e metatabelas&lt;/code&gt;, por isso este é um conceito extremamente essencial de se aprender.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>(Re)Implementing Wren in tiny coffee</title>
      <link>https://notes.canoigomes.com.br/posts/2020-07-07-tico-wren-module/</link>
      <pubDate>Tue, 07 Jul 2020 11:25:00 -0300</pubDate>
      <author>canoigomes@proton.me (Canoi Gomes)</author>
      <guid>https://notes.canoigomes.com.br/posts/2020-07-07-tico-wren-module/</guid>
      
      <description>&lt;p&gt;I&amp;rsquo;m working on re-implement Wren in tiny coffee, i started with Wren support first, but as i&amp;rsquo;m more familiar with Lua, and had more material on internet, i decided to focus on it. But as things seems getting fine with the Lua wrap, i decided to work again in the Wren wrap.&lt;/p&gt;
&lt;p&gt;In the beginning i was thinking in have two exe options, with Lua or Wren, but since i want to make the game editor and tools with Lua, i decided to make it mandatory. And with Lua being mandatory, i decided to distribute the exe with Wren too. But how to determine how language to use? I thought in many solutions (detect for &lt;code&gt;main.lua&lt;/code&gt; or &lt;code&gt;main.wren&lt;/code&gt;, make Lua default and load Wren from Lua script), but decided to go with the easier one, just let user choose it :v. By default it always load Lua first, and you need to specify Wren in the &lt;code&gt;config.json&lt;/code&gt;:&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>LÖVE Basics 1 - Lua basics</title>
      <link>https://notes.canoigomes.com.br/posts/love2d/tutorial-series/2020-06-25-l%C3%B6ve-tutorial-%231/</link>
      <pubDate>Thu, 25 Jun 2020 00:11:40 +0000</pubDate>
      <author>canoigomes@proton.me (Canoi Gomes)</author>
      <guid>https://notes.canoigomes.com.br/posts/love2d/tutorial-series/2020-06-25-l%C3%B6ve-tutorial-%231/</guid>
      
      <description>&lt;p&gt;Thats the first tutorial about LÖVE series i plan to write, in this tutorial i will give a brief introduction about the Lua basics&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lua types&lt;/li&gt;
&lt;li&gt;Variable scope&lt;/li&gt;
&lt;li&gt;Loops and Conditionals&lt;/li&gt;
&lt;li&gt;Tables&lt;/li&gt;
&lt;li&gt;Metatables (with a pseudo-OOP example)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;YOU DON&amp;rsquo;T NEED TO IMPLEMENT DE OOP PART YOURSELF!! We&amp;rsquo;ll use a lib to that, i just want to explain some concepts&lt;/p&gt;
&lt;h3 id=&#34;lua&#34;&gt;Lua&lt;/h3&gt;
&lt;p&gt;Lua is a scripting Brazilian language, created in PUC of Rio de Janeiro. The language was not created with gamedev in mind, but was vastly used in many games like Word of Warcraft, Ragnarok, Garry&amp;rsquo;s Mod, etc. In Lua, all your game structure will be mounted around &lt;code&gt;tables/metatables&lt;/code&gt;, thats a very important concept to understand, for example, Lua don&amp;rsquo;t have OOP, a sort of &amp;ldquo;Pseudo-OOP&amp;rdquo; with it&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>Using MoonScript with LÖVE</title>
      <link>https://notes.canoigomes.com.br/posts/love2d/2017-02-24-using-moonscript-with-l%C3%B6ve/</link>
      <pubDate>Fri, 24 Feb 2017 21:40:00 -0300</pubDate>
      <author>canoigomes@proton.me (Canoi Gomes)</author>
      <guid>https://notes.canoigomes.com.br/posts/love2d/2017-02-24-using-moonscript-with-l%C3%B6ve/</guid>
      
      <description>&lt;p&gt;In this tutorial, i’ll show you how to use the awesome MoonScript with LÖVE, it’s a very basic tutorial. I discovered MoonScript yesterday, 23 Feb (my birthday haha), and i loved the way the language complements the Lua lang.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://66.media.tumblr.com/f5789927c4a8814d39578c8281a9fa75/tumblr_inline_olwmxwYwpj1uuq5lf_540.png&#34; alt=&#34;&#34;&gt;&lt;!-- more --&gt;&lt;/p&gt;
&lt;p&gt;For start, you need to install MoonScript in your machine. I don’t will cover this in the tutorial, so if want to install MoonScript, you can access &lt;a href=&#34;https://moonscript.org/#installation&#34;&gt;this site&lt;/a&gt;.&lt;br&gt;
Okay, after install MoonScript, we can start our project. First, we need to create a archive called main.moon.&lt;/p&gt;</description>
      
    </item>
    
    <item>
      <title>LÖVE Tutorial - Metaballs</title>
      <link>https://notes.canoigomes.com.br/posts/love2d/2017-01-22-tutorial-metaballs-on-love2d/</link>
      <pubDate>Sun, 22 Jan 2017 18:39:01 -0300</pubDate>
      <author>canoigomes@proton.me (Canoi Gomes)</author>
      <guid>https://notes.canoigomes.com.br/posts/love2d/2017-01-22-tutorial-metaballs-on-love2d/</guid>
      
      <description>&lt;p&gt;Hi, everyone. This is my first tutorial haha. I always wanted to make some tutorial to help people with programming, well, with focus on gamedev. So i was thinking some thing that i can teach, and these days, i learn to make a simple metaballs effect, using blurred image and alpha threshold. And why not teach it to other people, right? haha This tutorial uses love2d as game engine/framework, but i think you can easily adapt to a game engine/framework you are using.&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>
