• 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
Tutorial Doctor

Anyone know of any Game Programming Chrestomathies?

8 posts in this topic

 

 

In computer programming, a program chrestomathy is a collection of similar programs written in various programming languages, for the purpose of demonstrating differences in syntax, semantics and idioms for each language. This term is thought[according to whom?] to have been first used by Eric S. Raymond in the Retrocomputing Museum web site. It is used by analogy to a linguistic chrestomathy.

http://en.wikipedia.org/wiki/Chrestomathy

 

http://stackoverflow.com/questions/1527573/language-syntax-comparison

 

I have been thinking of making something like this myself, and today when looking up language syntax comparisons, I found out that there is actually a name for it. CHRESTOMATHY! 

 

The chrestomathies I found looking through Stack Overflow are not quite verbatim, but I guess that is how languages are? Perhaps there is always some interpretation going on? 

 

Check out this list for making a hello World Program.

 

And check out the various tasks that are collected for over 500 languages.

 

It would be nice if there were game chrestomathies, or perhaps it would be a nice thread on this site? It would probably have to be more than a thread, perhaps a whole new category.

 

I would only expect the top languages to be mentioned here, like C++, Lua, C#, Java, etc. 

 

Anyone know of any game programming related chrestomathies for C++ to Lua? Or perhaps from C++ to Java? 

 

I would like some for Lua to C++ particularly. 

 

0

Share this post


Link to post
Share on other sites

Gotta say, I never heard that word in my life. Anyway, rosettacode is the website I usually hit on google when I need a quick code recipe. I think it does its thing well. What would be specific enough to qualify as game development related?

 


The chrestomathies I found looking through Stack Overflow are not quite verbatim, but I guess that is how languages are? Perhaps there is always some interpretation going on? 

 

Yes, one could say some things are lost in translation. If all languages looked exactly the same, they would all be the same. And there are of course often multiple ways of writing the same program, all equally valid and efficient, code is to a large extent influenced by the developer, you can sometimes recognize the author just by reading the code if you know him well enough (and I don't just mean style, also the way the program logic as a whole flows).

0

Share this post


Link to post
Share on other sites

oh god, another buzz word :)
 
a simple search using none buzz words gives this
 
http://en.wikipedia.org/wiki/Comparison_of_programming_languages_(syntax)


Yeah, I saw that one, which actually lead me to he links I posted.

But I am talking about things like rosetacode where you have a tic tac toe game in several languages, as a comparison to see how the same game might be done across multiple languages.

I had been thinking about writing good pseudocode and just filling in, but this idea seems better.

For instance, a game loop loos different across languages. A simple GUI could be sort of translated to another.

That is the word I am looking for, some type of translation key.

I have actually been doing something similar for Python and Lua.
0

Share this post


Link to post
Share on other sites

What we used to do in the old days was write a macro file, this became a sort of programming language in it's own rite and solved a lot of platform issues.

 

so we could have something like this 

    cpy r0,#1
    cpy r1,#2
    add r1,r0
    cpy r1,r0

then we could create a macro file for each processor defining the cpy and add macros and we didn't have to port the code from 6502 to z80 or 68000 to 8086 

 

This grew into a language called VP, a sophisticated assembler like language with it's own assembler which created processor dependant assembler as output.

 

(this eventually grew into a byte code based system which was translated into native machine code at load time giving ultimate platform independence, but that's another story)

 

Maybe it would be interesting to do the same here.

 

You could design a language and write an app that output translated this into c/c++,lua, python, whatever 

 

If you wrote it in javascript you could do it all in a web page.

 

Just a thought to get you going smile.png

Edited by Stainless
0

Share this post


Link to post
Share on other sites

This presupposes that there is one "right" way to do the thing in question, or at least one specific "general" case. There are lots of different ways to write the same game loop in a given language. Which one should be provided as the "translation" from another language?

 

I fail to see the usefulness of this as anything other than a curiosity. Sounds like an attempt to cut learning corners to me.

0

Share this post


Link to post
Share on other sites

The usefulness is if you started a game in one language, and wanted to adapt it to another, you could do so faster, or at least get a head start.

It would get too complicated where APIs are concerned perhaps.

The tic tac toe example is almost a good example of what I am thinking of, except that there could have been a better translation.

Edited by Tutorial Doctor
0

Share this post


Link to post
Share on other sites


The usefulness is if you started a game in one language, and wanted to adapt it to another, you could do so faster, or at least get a head start.

 

How? By taking each bit of your game, finding the equivalent bit on an online chrystanthamum or whatever its called, looking up the translation then copying that into your new game?

 

Sounds far easier to just, you know, learn the new language to me.

2

Share this post


Link to post
Share on other sites
The ideal way would be a translator actually, similar to what Stainless presented.

But I would use it as a basis, for example, making a simple GUI, then take that and expand it. So I would still have to know the new language anyhow. Nowhere is that being avoided with a chrestomathy.
0

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0