News Archive
Kong Runs SDL and OpenGL
Kong is rendering a cube!
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 😀.
It took a lot to get to this point… and I still have a lot to go. But this is where I am today.
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 😀.
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!