• 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
the_edd

[C++] bask in my awesomeness.

42 posts in this topic

Win. This is like the <dot> and <cross> "operator" hacks on steroids. I dare you to submit this to Boost.
1

Share this post


Link to post
Share on other sites
Quote:
Original post by jpetrie
I dare you to submit this to Boost.

They already have boost::spirit. :P
0

Share this post


Link to post
Share on other sites
It is like dipping into the part of the yogurt without the fruit in it...
0

Share this post


Link to post
Share on other sites
You, sir, have just won the Holy Sh** You're F***ing Awesome Award. Now would be a good time to request a staff member to change your name to "the_awesome_edd."
0

Share this post


Link to post
Share on other sites
Does it even check the document is valid HTML?

Otherwise I think a general-purpose XML or SGML document creation would be more useful.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by loufoque
Does it even check the document is valid HTML?

Otherwise I think a general-purpose XML or SGML document creation would be more useful.

Technically, it sounds like it's just an XML library. I believe the reason you can use it to write HTML is because of the syntactical similarities between XML and HTML. And if you look at the source (which is impressive 116 LOC, including white space) it doesn't do any syntax validation.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by loufoque
Does it even check the document is valid HTML?
looking at the demo application, it doesn't know about HTML, just how XML should be structured. The application tells it about what tags you can use:
TAG(html,  NO_ATTRIBS);
TAG(head, NO_ATTRIBS);
TAG(title, NO_ATTRIBS);
TAG(body, NO_ATTRIBS);
TAG(p, NO_ATTRIBS);
TAG(a, ATTRIB(href));
TAG(img, ATTRIB(src), ATTRIB(alt));

0

Share this post


Link to post
Share on other sites
I love the License

Quote:
You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want


@the_edd: You Sir, are my new hero.
0

Share this post


Link to post
Share on other sites
Now this made my day XD
Quote:
Original post by owl
I love the License

Quote:
You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want


@the_edd: You Sir, are my new hero.

And the best of all is that it's a real license!

Clicky =P
0

Share this post


Link to post
Share on other sites
Quote:
Original post by the_edd
http://bitbucket.org/edd/xsmell/src/

From the readme:


XSMELL README
-------------

Congratulations! You have in your hands the MOST BRILLIANTEST C++ XML CREATION
LIBRARY EVER CREATED.

Have you ever needed to embed a quick snippet of HTML or XML in your C++ source
code? Didn't you just hate having to use that obscure string concatenation
syntax?

Well no more! With the advent of XSMELL you can now use regular XML syntax
directly in your source code, thanks to the reckless use of operator
overloading, template meta-programming and preprocessor macros:


*** Source Snippet Removed ***


That's right! Thanks to XSMELL you'll no longer suffer from S-Expression
envy. You've got one up on those Lisp guys now -- smug bastards!

And you no longer have to worry about generating malformed XML! After spending
hours fighting obscure C++ compiler errors, you'll be 100% certain that your
XML is correct.


I couldn't wait for April 1st to come around.


--- xsmell.hpp	2009-06-24 23:46:07.000000000 -0400
+++ ../xsmell_fixed.hpp 2009-06-24 23:46:01.000000000 -0400
@@ -17,6 +17,7 @@
#include <boost/type_traits/is_same.hpp>
#include <boost/mpl/empty.hpp>
#include <boost/lexical_cast.hpp>
+#include <boost/static_assert.hpp>

namespace xsmell
{


I tried to make a patch queue, but bitbucket wasn't letting me authenticate. :D
0

Share this post


Link to post
Share on other sites
Quote:
Original post by loufoque
Does it even check the document is valid HTML?


You can define the tags yourself, but it can't check particular "nesting patterns". However, you cannot assign a set of uneven tags to a xsmell::document as you'll get a compile-time assertion. In that sense, the XML is validated.

I know! I can hardly contain myself either!

Quote:
Original post by Hodgman
looking at the demo application, it doesn't know about HTML, just how XML should be structured. The application tells it about what tags you can use:


Yes, I am particularly proud of the macro hackery needed to get that ATTRIB/NO_ATTRIBS stuff working. Have a look if you want to see awesome distilled in to it's purest form.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by iblis
--- xsmell.hpp	2009-06-24 23:46:07.000000000 -0400
+++ ../xsmell_fixed.hpp 2009-06-24 23:46:01.000000000 -0400
@@ -17,6 +17,7 @@
#include <boost/type_traits/is_same.hpp>
#include <boost/mpl/empty.hpp>
#include <boost/lexical_cast.hpp>
+#include <boost/static_assert.hpp>

namespace xsmell
{


I tried to make a patch queue, but bitbucket wasn't letting me authenticate. :D


Thank you for your invaluable contribution! I have applied and uploaded your patch.
0

Share this post


Link to post
Share on other sites
Quote:
You can define the tags yourself, but it can't check particular "nesting patterns".

With such a syntax, it could perfectly do so at compile-time.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by loufoque
Quote:
You can define the tags yourself, but it can't check particular "nesting patterns".

With such a syntax, it could perfectly do so at compile-time.


Well what I mean is it'll check stuff like:


<html>_ <body>_<!html>_ <!body>_; // compiler error


But there's no way to tell it things like "a <body> block must appear inside an <html> block".
0

Share this post


Link to post
Share on other sites
Quote:
Original post by the_edd
Quote:
Original post by loufoque
Quote:
You can define the tags yourself, but it can't check particular "nesting patterns".

With such a syntax, it could perfectly do so at compile-time.


Well what I mean is it'll check stuff like:


<html>_ <body>_<!html>_ <!body>_; // compiler error


But there's no way to tell it things like "a <body> block must appear inside an <html> block".


It should be possible to add such functionality with a healthy dose of BOOST_PP.
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