Start a distributed node with a name and cookie:
$ iex --name server@127.0.0.1 --cookie secret-cookie -S mix phx.server
Create a script:
# add.exs
script_node = :"script@127.0.0.1"
remote_node = :"server@127.0.0.1"
cookie = :"secret-cookie"
{:ok, _pid} = Node.start(script_node)
true = Node.set_cookie(remote_node, cookie)
:pong = Node.ping(remote_node)
true = Node.connect(remote_node)
:rpc.call(remote_node, Enum, :sum, [[1, 2, 3]])
|> inspect()
|> IO.puts()
Run the script:
$ elixir add.exs
6
Read the rest of this entry
This is the third part of my LD 28 experience. You can read the previous parts here: part 1, part 2
The actual entry is here: Existence
The game is playable here: https://pyjamacoder.com/ld28/
People on the Ludum Dare website seem to love doing these post mortem things.
So, without further ado, here's my post mortem on creating Existence.
Read the rest of this entry
This post is a continuation from my previous post about creating a game for Ludum Dare 28.
In the previous post, I discussed why I selected the tools I did and the reasons for creating a game for the web. I also described why I didn't use any pre-existing frameworks to aid in my endeavor.
In this installment, I'll be talking about what I spent my time doing during the 48 hours.
Read the rest of this entry
So, I created a game for Ludum Dare 28. If you're not familiar with Ludum Dare, you can see their About page for a description.
It's basically a solo, from scratch, game development event over the course of a weekend (48 hours) with a theme. People are welcome to use any open source frameworks or tools (such as Unity 3D, GameMaker: Studio, LÖVE, etc) for creating their game.
I've been contemplating trying it out to see if I could make a game in 48 hours. Well...this past weekend was the first one I've had free since I started paying attention to this competition.
I didn't really prepare to create a game at all...but rather did it on a spur of the moment decision. I figured, what better time to try to create a game for Ludum Dare than now? After all, actions speak louder than words.
Here is my very first Ludum Dare 28 entry: Existence
It can be played at: https://pyjamacoder.com/ld28/
And the source code can be retrieved from github: https://github.com/donaldducky/ld28-existence
Here's what it looks like:
Read the rest of this entry
Ever since I started using Vim, I've been looking for ways to improve my workflow. It wasn't until recently that I've felt my use of it had stagnated. I knew there were better ways in doing a lot of things but I never took the time to look into it.
I write text in a variety of languages such as: Javascript, PHP, Bash, CSS, Markdown and sometimes even Ruby. The one thing they all have in common? Vim. Improving how I use Vim will help me edit files more efficiently regardless of the language.
After creating related.vim and writing my previous post, I realized that I didn't know too much about some of the plugins I used. I knew that they were powerful but I had yet to take advantage of that power.
One of the plugins I mentioned was: CtrlP
I was having issues using it because the project I was working in had 15,000+ files but I found a way around it.
Read the rest of this entry