• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
  • entries
    625
  • comments
    1446
  • views
    1006388

Self-hosting: major milestone on the path has been reached!

Sign in to follow this  
Followers 0
ApochPiQ

818 views

I exulted over this rather vocally on Twitter, but in case you don't follow me (@ApochPiQ), I'll repeat it here:

At 12:15AM this morning, Epoch's compiler successfully generated itself, when provided with a decorated AST from the C++ compiler front-end.


What this means is that I have a fully working layer that translates the decorated Epoch AST into machine code (via transitional forms and LLVM, but that's just technical detail). The compiler was loaded as a plugin to the C++ compiler, compiled once using C++, and then the compiled version was executed on the compiler's source code.

The output is not bit-identical to the generated results of the C++ compiler, but it is functionally identical, which is more important.

The byte-level differences originate from things being reordered a bit during the handoff from the C++ side to the Epoch side (I blame unordered_map) and, curiously enough, from the C++ compiler emitting some vestigial bytecode that does nothing useful.

So the Epoch compiler is already better than the C++ one, in at least one trivial and irrelevant detail :-D


I've already started on porting the type system logic to the Epoch core compiler. After that milestone is reached, more compilation will be done in Epoch than in C++. Right now all the type system analyses and inference is being done by C++ code, but that is quickly changing.

One of the things that worried me the most was implementing a viable version of Shunting Yard for operator precedence reordering. Turns out that only took about an hour to port over and perfect, which is pretty cool.

The next big worrisome item is the process of overload resolution and expression type deduction, which are intimately tied together due to operators having overloads at the language level. (I still haven't decided if I want to expose operator overloading to the end programmer.)

That's a huge chunk of the C++ compiler by itself, and moving all the intricate details to Epoch will be tedious and finicky to say the least. I'm hesitant to make predictions on a timeframe because I have a feeling I'll need to step away from it more than once for extended periods to regain my sanity.


That said, with a couple of hacks and shortcuts in place, I did get two of the most trivial compiler tests to pass this afternoon using the new type system implementation (such as it is currently). So my end-of-year target for finishing all of self-hosting seems reachable.


As a minor recap, to get to full self-hosting, I need to port the type system and then also rewrite the entire parser. Redoing the parser is probably not going to be terribly hard, but it may take some time for the same reasons as above (i.e. I may need a lot of breaks). What'll be the most interesting aspect of it is getting rid of having any kind of codified grammar for the language; the implementation will be 100% ad hoc hand-rolled recursive descent, at least to start out. Writing an Epoch-compatible LR parser generator does not appeal to me right now.


So those are the happenings... I'm also racking up a huge mental checklist of things I want to improve on for the language as a whole, so if nothing else, this is a tremendous opportunity to dogfood my own work and figure out how to make it appealing as a larger ecosystem.

3
Sign in to follow this  
Followers 0


4 Comments


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now