• 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.
Sign in to follow this  
Followers 0
  • entries
  • comments
  • views

Idea Spec: FRBC Design

Sign in to follow this  
Followers 0


while still not settled if I will do much with this, I did go and start working on a spec for a new bytecode format:


intended source languages would probably be BGBScript and C. (the design is based on an incomplete IR I was originally intending as a new IR for BGBScript, but with a recent idea is being mostly re-purposed for use with C).

specifics are still not entirely settled, nor are things really complete, but the idea is more to set up an idea for what the "completed" form would look like.

basic premise:
it seems at least possible to consider compiling C to a bytecode-based IL;
this could potentially allow running the same binary code on more than one target architecture (either via interpretation, or via JIT or AOT compilation).

general structure:
the spec in this case is using a statically-typed register-machine IL;
as expected of an IL for use with C, it will provide support for pointers and for pointer arithmetic.

however, another sub goal is to allow "verifiable safety" regarding operations, namely so that while pointers are available and can do all their usual "pointer stuff", it is also possible to keep the code sand-boxed and avoid it stomping memory. this will come, however, at some performance cost, but the cheaper of the options in this cases is to generally use fat-pointers for areas of code making frequent use of pointers, but possibly falling back to narrow pointers for cases where fat-pointers are unnecessary, or would create other issues (such as hindering inter-operation with native code, which generally uses solely narrow pointers).

an alternative to the use of fat-pointers is basically to use lookups on access to implement barrier checks, but this has a few drawbacks:
lookups aren't free (they would cost more than validating that a pointer is still in range);
they wont detect cases where the pointer has "jumped ship" from one memory object to another, which is possible if intermediate operations are done with fat pointers.

however, by themselves, fat-pointers still don't necessarily address the matter of type-safety, namely validating that a pointer held within a data-structure is not overwritten.

however: many of these cases can be at least partially detected and dealt with:
the code can't be "proven safe" in this case, meaning that it can be possible to fall back to the use of explicit checks;
fat-pointers can be kept outside of memory areas writable to the code itself (in these cases, things like structures will typically only contain narrow pointers, and if the VM has reason to suspect that a pointer might have been overwritten by an operation, it can be verified that whatever address is held is still "valid" in that it refers to an accessible region of memory).

this sort of validation is likely to be needed in cases involving things like accessing pointers within unions, explicit conversions between pointers and integers, and generally cases where "suspicious" memory operations are performed involving an object (such as a memset or memcpy call, ...).

in this sense, the memory manager will also take up a role in terms of memory-access validation (well, and probably also things, like performing leak detection, ...).

granted, to go well with C tradition, we can't necessarily trap as soon as an invalid pointer is generated (this could prevent some otherwise valid code from working), but ideally need to trap when either:
memory is actually accessed via such an invalid pointer (behaving in this case more like a traditional memory access exception);
such a pointer moves into a "required safe" area, which basically means where it is known statically that an access will occur via this pointer (or alternatively, where no later validation checks would be possible).

the latter case is likely to be more of an effect when converting fat-pointers back into narrow pointers, where it could be required that whenever such an operation occurs, the pointer will need to be pointing at a "valid" address for the source object.

if code is "untrusted", all this probably also means denying access to any memory which it doesn't specifically have access to, and similarly placing limits on what sorts of API functions may be used (say, untrusted code is limited to a set of white-listed wrapper APIs, and may not have direct access to the underlying native APIs).

Sign in to follow this  
Followers 0


There are no comments to display.

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