FreeGameDev Planet - Development

Also check out the games planet.

May 28, 2017

Castle Game Engine

Updates to the “Modern Object Pascal Introduction for Programmers”

I wrote a few new chapters to the “Modern Object Pascal Introduction for Programmers” book:

It is also available now under a shorter URL, on a new domain for our Castle Game Engine. The book is not tied to the Castle Game Engine (I want it to be something useful on it’s own). Although it is also part of my plan for “how Castle Game Engine can succeed”, as it helps programmers interested in Castle Game Engine to use the Object Pascal language 🙂 If you like it, please consider supporting me on Patreon !

by michalis at May 28, 2017 07:08 PM

May 23, 2017

Cocos2d-x

Cocos Creator v1.5 Released !

We are happy to announce the release of Cocos Creator v1.5! This version 1.5 update focuses on the lack of features for action games large-scale project development, through the provision of physics engine, camera and TypeScript support. Cocos Creator is

by Virginia Hong at May 23, 2017 02:43 AM

Castle Game Engine

In Space Everyone is Screaming (gamejam game:)

Simple platformer-shooter done during 12-hour gamejam using Castle Game Engine! Binaries on https://gitlab.com/michaliskambi/in-space-everyone-is-screaming/tags/v1.0 , source code on https://gitlab.com/michaliskambi/in-space-everyone-is-screaming . This is really just a technical beginning, without any playable level design, or fancy enemies swarms, or graphics.. But it’s a working start, with jumping and shooting and enemies, ready to be extended! 🙂

by michalis at May 23, 2017 12:54 AM

May 22, 2017

Godot Engine

Make Professional 2d Games with Godot: Kickstarter LIVE

Do you want to become a better game developer with Godot? GDquest, who makes game creation tutorials with open source tools, is on Kickstarter, with our full support!

May 22, 2017 10:00 AM

Piston

Announcing Dyon-Snippets

The Piston project is pleased to announce Dyon-Snippets, a place to share Dyon source code and discuss library design!

Dyon is scripting programming language started in 2016 by myself (Sven Nilsen, bvssvni).

Dyon started as an experiment in a period I had a lot of time, while waiting for some important Gfx redesigns. After a week of coding, I discovered that it was possible to use a lifetime checker (like Rust), but without borrow semantics (unlike Rust) instead of a garbage collector. Combined with copy-on-write for non-stack references, this creates a very limited memory model but sufficient enough for many practical applications. It is difficult to write object oriented code in Dyon, but it is very nice for iterating over arrays.

  • Built-in support for 4D vectors and HTML colors
  • Packed loop for mathematical index notation
  • Secrets (more about this later)

The language uses dynamic loading of modules to organize code, where you have full control over module dependencies. It is very common to write a loader script, a program that runs before you run the actual program.

Here is an example:

fn main() {
    foo := unwrap(load("foo.dyon")) // Load `foo`.
    bar := unwrap(load(source: "bar.dyon", imports: [foo])) // Load `bar` with `foo` as dependency.
    call(bar, "main", []) // Run the function `main` on the `bar` module.
}

This allows a kind of programming where you easily control how stuff gets loaded, e.g. check for for updates or refresh a module every Nth second.

I often use Dyon for problem solving, because the language has a feature called “secrets”. A secret is a hidden array of values associated with a bool or f64. The type is sec[bool] or sec[f64]. The indexed loops in Dyon are integrated with secrets.

For example, you have a 2D array v and compute the maximum value:

m := max i, j {v[i][j]}
println(m) // Prints maximum value of `v`.

Dyon infers the range from the loop body. The code above is equivalent to:

m := max i [len(v)), j [len(v[i])) {v[i][j]}

This is a packed loop which is equivalent to:

m := max i [len(v)) {max j [len(v[i])) {v[i][j]}}

The notation max i, j {v[i][j]} is inspired by mathematics. In mathematics and physics it is very common to use indices and custom loops. It is easy to translate back and forth between equations and Dyon code, and it helps you learn mathematics as well!

The type of m is sec[f64]. You can write the following:

where_max := where(max)
println(where_max) // Prints `[i, j]`.

This is how it works:

  1. The inner max loop returns the maximum value with a secret [j].
  2. The outer max loop finds the maximum inner value and changes the secret to [i, j].

A secret propagates from the left argument in binary operators. This means you can combine any and all loops with max and min:

// Is there any list which maximum value is larger than 10?
m := any i {max j {v[i][j]} > 10}
if m {
    println(why(m)) // Prints `[i, j]`.
}

In problem solving this is very convenient, because many problems can be thought of as formulating a question. When you know the right question to ask, the answer is often easy to find.

May 22, 2017 12:00 AM