News

Movement to Pure C

I had to make a difficult decision about 3 weeks ago. I gave myself 6 months, from July 2015 to the New Year, to make my programming language, Kong.

I worked on it the entire time, through several major refactors, and had a pretty solid product by January – but it wasn’t complete. I spent another month trying to fill the holes, and had a cube rendering.

The problem was the speed.

Read More


Posted article on Kong’s garbage collector

Decided to take a day to write up how Kong’s garbage collector works:

Tri-Color Garbage Collector

Enjoy!

Read More


Kong Runs SDL and OpenGL

Kong is rendering a cube!

Kong Application

Kong Application

I know it doesn’t look like much, but at this point, it’s more about how that cube is being rendered, rather than the impressiveness of the cube itself 😀.

Here is the code:

kong:v1.0

import gfx.sdl, gfx.basic3d, gfx.basic3d.node,
  gfx.basic3d.camera, gfx.basic3d.geometry,
  gfx.basic3d.material, gfx.basic3d.mesh

sdl.Init(sdl.INIT_EVERYTHING)

var width: 640, height: 480

var win: sdl.CreateWindow(
  'Hello, from Kong',
  sdl.WINDOWPOS_CENTERED, sdl.WINDOWPOS_CENTERED,
  width, height,
  int.bitor(
    sdl.WINDOW_SHOWN,
    sdl.WINDOW_OPENGL,
    sdl.WINDOW_RESIZABLE
  )
)

var b3d: basic3d.new(win)

var root: node.new('root')
var cam: camera
  .newPerspective(num.tau / 5, width, height, 1, 1000)
  .position(10, 10, 30)
var boxGeo: geometry.newBox(10)
var boxMat: material.new()
var boxMesh: mesh.new(boxGeo, boxMat)

root.add(boxMesh)

var done: false
do
  do
    var ev: sdl.PollEvent()
  while (ev != false)
    if (ev.type == sdl.QUIT)
      done = true
      exit
    end
  end
while (!done)
  b3d.render(root, cam)
end

boxGeo.destroy()
b3d.destroy()
sdl.DestroyWindow(win)
sdl.Quit()

If you don’t recognize that language, that’s because it’s my language 😀.

Read More


New Website

I’ve finished creating my website! Yay!

I migrated the articles that I liked from my old website (smashware.com), and beefed up a few sections.

The design itself is new (obviously), and the high level pages (Latest, Creations, etc) are all new.

I also programmed some nice scripts to help me update the website easily. Creating an article just takes writing a Markdown file, then running ./publish. Easy peasy 😀.

Read More


Kong is Done

Kong (the programming language I’m creating to write games with) is done.

Well… not quite 😛. The core language is done. I have a compiler, virtual machine, and garbage collector, and together they are passing my entire test suite.

This means I can move onto library design (specifically, getting SDL and OpenGL wired into Kong), and game development.

Hurray!

Read More


Speed Boost Moving to C

In totally-obvious-news, moving my interpreter from JavaScript to C has produced a siginicant speed boost: 40x faster.

There is no garbage collection yet, so I’m just allocating and leaking like crazy, but it’s nice to know the magnitude of the speed jump.

I was originally thinking I might target Kong to the web, via my JavaScript interpreter… but now I’m thinking I’ll just skip that entirely, and do all the low-level stuff in C. Maybe some day in the future I’ll revisit the JavaScript stuff to see if I can make it better, but it would likely involve compiling to asm.js, which I don’t care to do right now.

Read More

« Newer Page 4 of 4