Home Blog

Blog (139)

Why aren't there any new posts?

Written by Peter R. Bloomfield | Sunday, 08 January 2012 16:36 | 0 comments

Just in case anybody's wondering, I've not been updating Avid Insight as I've been busy with a new full-time job. I started working as a software engineer for Vertual Ltd. in 2011, and am thoroughly enjoying it. The company makes a very complex virtual reality training system for radiotherapy, incorporating stereoscopic display and head tracking.

I'm getting lots of opportunities to use and expand my knowledge of C++, graphics programming, and user interfaces (among other things). However, as it's a private company, the work that I do has to remain confidential. Plus, I like to get away from computing at least a little during my off-hours!

With that said, I do plan to write up a few posts from time-to-time in the foreseeable future. Probably nothing ground-breaking, but hopefully things that are useful.

FlashDevelop demo -- Slider Puzzle

Written by Peter R. Bloomfield | Wednesday, 08 June 2011 01:12 | 1 Comment

I've blogged before about using FlashDevelop to make Flash games for free. Just for fun, I decided to do a very little project tonight... a simple slider puzzle game to challenge myself. I set myself a time target of 3 hours to build the whole thing (assets included) from scratch. Ultimately, I ended up with 3 and a half hours, but I got it working. You can see the result below...

avidscript lives!

Written by Peter R. Bloomfield | Friday, 21 January 2011 21:17 | 0 comments

As I've mentioned on some recent posts, I've been working on developing my own compiler and virtual machine lately. And finally, it lives! It's taken 5 months, with some language revisions along the way, but I have set out what I intended to achieve... and that's a custom programming language, compiled down to bytecode, running in a virtual machine. All of it was built myself from scratch in C++, using only a few of the standard libraries. Admittedly it's not yet complete, and I'm sure there are many bugs... but for now, it's working. :)

Compiling simple loops

Written by Peter R. Bloomfield | Monday, 10 January 2011 22:53 | 0 comments

I program weird stuff to unwind. Lately, my pet project has been a custom programming language which I'm calling "avidscript". It is a somewhat C-style procedural language which compiles down to bytecode, and the intention is that it will execute in a stack-based Virtual Machine (VM) which is integrated into a game framework. Long term, I have designed some specs to develop it into a concurrent state/event-based language (one thread per FSM), as that will be particularly useful for programming game AIs. Anyway, I digress...

At the moment, I'm working on the low-level code generation. This is part of the compiler 'back-end'. The front-end parses the source code, turning it into an Intermediate Representation (IR) of the program. The back-end then turns the IR into final compiled code (in this case, bytecode for a VM-target... although it could equally be native machine code). I found the bytecode representation of simple loops quite interesting, particularly from an optimisation standpoint, so I thought I'd share my findings here.

The joy of C++ streams

Written by Peter R. Bloomfield | Saturday, 08 January 2011 02:15 | 0 comments

Many programmers complain about how poorly C++ handles strings. The unfortunate reality is that a language with such direct memory access as C++ cannot handle strings natively, because stack memory usage absolutely must be fixed at compile-time. Or, in simpler terms, you can't expect to fit an unpredictably large peg into a small hole. The std::string class improves things considerably -- it is a very robust and efficient string class programmed by people who are cleverer than most of us can ever hope to be.

It still doesn't solve all our problems though, because it doesn't do string concatenation very well, and you can't easily convert other types (such as numbers) to a std::string. Thankfully, streams come to our rescue! They provide a beautifully simple and straightforward means of building up strings of text and sending them pretty much wherever we need them.

« Start  Prev   1   2   3   4   5   6   7   8   9   10   Next   End   »
Page 1 of 16