Jump to content

  • Log In with Google      Sign In   
  • Create Account

Ye Olde Ramblings

And so it goes...

Posted by , 11 January 2010 - - - - - - · 241 views

I've decided to let my gamedev subscription lapse. The main thing I used it for was for this sounding board to discuss my personal programming projects. It's been a few months since I last posted, and over a year since I've done any actual game related discussion. And even over the years I never really saw a lot of feedback or discussion that really made the posts satisfying. With my workplace gearing up for a big release, I probably won't have the time or motivation for personal projects until that's done.

I'll still be around, but I just can't justify paying the (relatively small) cost of the subscription for a cartoon cow and a journal I rarely use; especially these days. Perhaps I'll re-up once I start doing more development again, or get more disposable income.

Tangent, now with usable error messages!

Posted by , 07 August 2009 - - - - - - · 189 views

In a long overdue effort to get people to actually use the software I write, the Tangent rehash now provides line numbers with error messages. w00t!

public goose class foo{
public bar x;

moocow.tan(2,9) : error : Unknown Type 'bar'

Back to work!

Posted by , 05 August 2009 - - - - - - · 259 views

My vacation is over. It's useful to remind myself every so often why I don't travel and hate people. I did take some time and think about what I wanted to use my spare time for. In the end, I decided to use it for whatever the hell I want. So I'm going to try to do a quickie rewrite of Tangent with lessons learned and a renewed attempt at Moe. Ideally, two projects will keep me busy coding and provide enough varied problems that I don't get stuck on one problem where I don't have enough time/intelligence/skill to get through it.

First, a rehash of Moe. Moe is a placeholder name for a game I've had in mind for a little while now. It is a fantasy, turn based, 4x game. The closest game to it is probably Master of Magic. The main differentiator in the game idea is a de-emphesis on warfare.

The idea is to keep warfare viable, but not the hands down best way to win. Push it towards the desperate player or the player who needs might to make up for other failings. The two sides of that goal are fairly straightforward; make war expensive, and make peace an alternative means of conquer.

The key way war is being made expensive is by making units finite. Your population will be born, grow old, and die (and occasionally be raised as zombie labour). Losing population in even a successful war (or the lack of births due to wartime) is a non-trivial cost.

Making peace a means to conquer is more tricky. Civilization tried to push culture as an option, but it was always trumped by war. Too slow, too narrow. Moe aims to push the general concept to a bit more wide-ranging scope. Technologies will flow naturally towards more successful trading empires. Heavy trade increases happiness and desirability of your cities. Technological superiority breeds dissention in your neighbors. Desirability will allow you to siphon off immigrants from neighboring empires. Expansive trade routes allow armies to range farther and fight longer.

Unfortunately, it seems that XNA/SlimDx UI libraries are few and far between. reimplementing a UI isn't something I'm looking forward to. So at least for now, most of my energies are focused on Tangent again.

Mostly, this Tangent rewrite is going to take lessons learned and help make it more solid from the get-go; slim it down. Properties are out. Indexers are out. (just use phrases to implement them). Tuples are out; generics are de-emphasized. Must get users! Error reporting must be there from the start.

The biggest change though is probably going to be actually compiling into something. The last implementation was just way too slow. I spent a bit too much time futzing about reinventing the VM wheel. I've not decided what I'm going to compile into yet. Maybe C# and then recompile that. The DLR seems an interesting option but the docs are poorly written and/or over my head. Straight to MSIL seems to be the least pleasant option.

Multiple dispatch and the funky type system are the biggest things that are out of the ordinary for other VMs. Something I'm going to need to think about before I set to work on that. For now though, the parser(s) have been slimmed down and better (but still terrible) error reporting run through them. A basic compiler shell is there with better (and actually not bad) error reporting. The in-memory type representations are mostly back, with a few decisions yet to be made.

More to come as it gets done.

Tangent: Haitus

Posted by , 23 July 2009 - - - - - - · 204 views

I realized the other day while working on something barely non-trivial in Tangent just how shoddy the performance is. Memory usage, leaking, actual execution speed... And there's not a few things that are just bleh in the project itself. Combined with the lack of actual active interest by anyone who isn't me, and the renewed desire to work on other things I'm going to put Tangent down for a little while. Maybe make the source available once I clean out the worst of the memory leaks. Not that I won't come back to it, but I think other projects might do me a little good. Maybe even make Game Development posts on gamedev.net!

And at the very least, Tangent has done exceptionally well in its original goal of being a learning experience and a prototype. While it's fresh in my memory, some post-mortem like review:

Good Stuff

Phrases - This has a few parts; infix parameters, explicit identifiers, juxtaposition as application... This is 'what makes your language different?'. It was very powerful, elegant, intuitive. What else do you want?
Order of Operation inference - I personally never encountered woeful mis-inference. It wasn't super slow. It allowed certain syntaxes that were pleasingly unencumbered by decoration.
Multiple Dispatch - Especially with phrases, this had little downside, while freeing programmers from the 'to specialize you must sub-class' bindings.
Structural Typing - Allowed a certain flexibleness when doing design that was unfortunately lessened by free functions. Still, it seems the way to go.
Goose Types - And being able to put a 'normal' class hierarchy ontop of the type system with a mere keyword is elegant and useful.
Multiple Inheritance - No headaches when actually implementing it (beyond constructor vs invariant fights). I still think this will be a boon once more OO is done with the system.

Bad Stuff

No Community - No input, no people actually using the language pushing for quality or certain features, or just debating the utility of some ideas.
The Runtime - it was easy to implement, but took a little time with certain concepts, and the major source of performance issues. Plus there's a few little things I forgot, or did a shortcut with that are awkward now. It should've gone to the CLR (at least indirectly) as the original concept envisioned.
Too much backwards compatibility concerns - Originally, C# was to be more integrated. This provided a few too many constraints on design and too much demand on the naive way about how it should be implemented.
Tuples - Annoying, special case sort of constructs.
Visibility - The language tended towards 'classes are just records' style design, which didn't need or rely on visibility too much. Protected becomes kinda moot once inheritance acts oddly. And visibility mismatches created not a few type-mismatch bugs.
Generic Replacement - The implementation of generics replaces (or actively binds) instances into parameters rather than just referencing them. Big, ugly. Generics themselves are still of dubious utility.
Idealism around certain bits - Types really should know where they are declared. Scopes should be smarter about saying what things should be. A dozen other little things.
Little separation between instance generators, type classes, and type constructors - This one is inherited from C, but it becomes more apparent during implementation just how broken the idea of using a single concept to describe 3 separate purposes.
No 'abstract type' for operations - In the OO world, there's the concept of abstract types. 'This type can do X, Y, and Z'. Functions lack an analogous concept. 'My parameters can do (or must be able to do) these ops.' Dynamic languages kinda get away with it by just doing the operations. Type inference models can do that via that path. Originally, operators were going to be members (ala Java) and thus an abstract class could imply what operators worked. Tangent unfortunately needed that concept, but it was not included in design.

And next week I am on a cruise. Some nice R&R time to consider what I'd like to work on. Maybe more Tangent, maybe a new 'with lessons learned' implementation, maybe another go around at my fantasy 4x game idea. We'll see then.

Tangent: Syntax reworking

Posted by , 20 July 2009 - - - - - - · 199 views

I'm looking to do a little reworking in the Tangent syntax, parser and compiler. Right now there's a little too many exceptional cases. The main candidates for removal are properties and indexers. They'll still exist, but will be done in the phrase style. No more special cases.

The first step is done. I took the degenerate case where a method has no parameters, and made that a simple getter:

public static pi => decimal { return( 3.141592 ); }

Setters will look a little odd, but similar to other phrase definitions:

public class SetExample{
private int _foo;
public Foo = (int value) => void{
_foo = value;

The behavior of each isn't really going to change, just consolidating the syntax and compiler a bit.

September 2016 »

181920212223 24

Recent Entries

Recent Comments

Recent Entries

Recent Comments