• 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
  • comments
  • views

Syntax improvement FTW

Sign in to follow this  
Followers 0


I'm sure some of you will be excited to know that I've finally gotten around to implementing infix operators in Epoch. Right now all I've got is basic arithmetic, but the framework should be very easy to extend to pretty much any operator imaginable.

In fact, the framework is specifically designed to allow the programmer to define his own new infix operators, including setting their precedence level. This should make Epoch quite a bit more expressive and succinct than it has been thus far - and I haven't even touched the syntax skinning concept yet.

I have a huge amount of stuff to get done for R7, and possibly won't get much free time to hack on it for a while; but here's the general list of what else is coming:

  • Full set of infix operators

  • Unary operators

  • Parenthetical expressions (for overriding precedences)

  • Improved support for literals in the cast operation

  • Removal of hardcoded strings in the VM code; using a keyword table instead

  • Replace message allocator with a custom pooled allocator to avoid locking on the heap during new/delete

  • Fix some memory leak issues

  • Correct nested response map issues

  • Improved error reporting, esp. during task validation

  • Improved syntax for initializing structures

  • Buffer entity (support for both stack and heap allocation)

  • Better VM-level error reporting

  • Type aliases (i.e. typedefs)

  • Map/reduce functions

  • Futures

  • Change task IDs to string variables so we can refer to tasks from code

  • Introduce a new TaskHandle type in the VM (currently we just use Integer)

  • Stop directly using size_t etc. and instead use descriptive typedefs

  • Improvements to exception safety

  • Correct some cases involving private vs. protected

  • Simplify type metadata lookups, e.g. TypeInfo::GetStorageSize()

  • Perform a complete code review, for exception safety, documentation, code cleanliness, error handling robustness, and elimination of hardcoded strings/magic numbers

Expect R7 sometime around the heat death of the universe.

Sign in to follow this  
Followers 0


About syntax skinning...it's a very interesting idea, but I wonder if "too much" flexibility will actually damage the language's popularity...If everyone is able to define a syntax, wouldn't that mean communication problems between programmers working with the language? I know that you said that syntax can be transformed from one form to another, but still...I could see it causing problems in communication or forming a solid community...unless there's something I'm not seeing.

Share this comment

Link to comment
Yeah, the problem of too many syntax variants has occurred to me as well; in fact that's pretty much the entire reason why I haven't started playing with it yet. I'm not convinced that it's a good idea, but it's very tempting... so we'll see. In any event the introduction of infix operators gets rid of the majority of complaints about the syntax, so whether or not the skinning is even necessary remains to be seen. Very much a back-burner idea for the moment. At the very least there will be a powerful pretty-printer built into the Epoch IDE.

Re: User defined operator precedence - what's the issue? To me it seems like it would be counter-productive to allow user defined operators but not permit the user to set their precedence, meaning that most code involving custom operators would be littered with parentheses to try and get the precedence correct.

Share this comment

Link to comment
Original post by ApochPiQ
Re: User defined operator precedence - what's the issue? To me it seems like it would be counter-productive to allow user defined operators but not permit the user to set their precedence, meaning that most code involving custom operators would be littered with parentheses to try and get the precedence correct.

Sure, and that is sucky.

But having a programmer set precedence is going to (effectively) require them to guess how other programmers will set their precedences. They can make a decent guess, but if it's wrong (or if the other API changes their precedences) then you get runtime errors (occasionally compile time due to type issues) that will likely not be easy to deal with. And even when it's right there's that extra precedence info that a programmer needs to be aware of/remember when dealing with the API.

I'm not sure there's an arbitrarily better way to determine precedence for user defined operators, but I don't particularly care for the programmer setting some value for it.


Share this comment

Link to comment
Yah, about flexibility vs limitations.

(Note: I'm doing a language, prism, too; it's found at the centre of the universe, apparently)

I was originally thinking of syntax skinning myself, one for a python-esque style and one for a C-style. But you have to remember that it sort of devolves into a religious war: Which style is better? I think it'd create an split in the community, so I went with purely the python-style. I also removed the ability for people to indent with 4 spaces (or more accurately x spaces). You see it all over the internets about whether or not it's better to use tabs or spaces to indent your work. Pow, taken out of the equation. Sometimes restricting what users can do increases the friendliness of the application and environment. The way I normally work is by saying "could two users do exactly the same thing in two different ways and both believe that the other is wrong"? If that could happen, I try and find a way to resolve it so there's only one way of going about things.

I'd take out syntax skinning and user-defined operator precedence (have one level of precedence set aside entirely and solely for user-defined operators).

Share this comment

Link to comment

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