Home | Rules and Guide | Sign In/Create Account | Write a Post | Reddit | #LD48 | #ludumdare on irc.afternet.org (Info)

Ludum Dare 30 — August 22nd-25th 2014 — Theme: Connected Worlds
  • Judging Ends: in 17 days, 19 hours, 42 minutes, 53 seconds
  • [ Real World Gatherings | Ludum Deals | Warmup Weekend (Games) | MiniLD #53 | Wallpaper (1) (2) (3) | Mailing List ]

    [ Play+Rate | Edit | View All Games | My Game ]


    About Will Edwards

    Dreaming of making indie games is, sadly, still just a dream.

    Entries

     
    Ludum Dare 30
     
    Ludum Dare 28
     
    Ludum Dare 27
     
    MiniLD 40
     
    Ludum Dare 25
     
    Ludum Dare 24
     
    Ludum Dare 23
     
    MiniLD 31

    Will Edwards's Trophies

    Gamification of Rating Games Award
    Awarded by ViliX
    on August 26, 2014
    Hacker Newser
    Awarded by udo
    on August 29, 2013
    Prettiest Text Adventure Award
    Awarded by royvanrijn
    on April 27, 2012

    Will Edwards's Archive

    Ludum Dare is European!

    Posted by
    Tuesday, August 26th, 2014 1:47 pm

    Ludum Darers in Real World

    As you can see, there’s a nice tight bunch on the east coast of the US, but otherwise LD is a very European affair!

    CLICK HERE FOR INTERACTIVE MAP!

    Now in my game there’s lots of strange map goodies all over the world, and I’m particularly pleased with Iceland, but who will be able to unlock them?

    UPDATE: There is a Ludum Darer in Iceland – thx Banni!  And there’s even players in the middle of the Amazon jungle!  How cool is that?!?!?

    I am also tracking comments over time this LD, so will be able to make some pretty charts later as scoring draws to a close.

    Oh, and I need to set about making another LD mosaic

    The average LD gamer uses… Windows 7!

    Posted by
    Thursday, August 21st, 2014 5:45 pm

    If you take all the photos on the internet and average the pixels out, the average pixel is … Orange!

    Yes I know you’d have guessed pink with a splash of white, but this is serious science folks ;)

    Emergent Orange.  People puzzle about this; is it gamma correction, is it florescent lighting, is it sunlight, is it … puzzling eh?

    Anyway, you may recall I’ve been making mosaics of the titles and screenshots you use when you enter LD?  Here’s the Mona Lisa from last LD:

    I took those images and averaged them all together.  And here’s what I get, the average LD entry pic:

     

    There you have it!  A tad orange, but most striking of all is the Windows 7 title bar etched into it like a TV channel logo on a CRT!

    So you use Windows 7 eh?  Please make a web game anyway, so I can play it ;)

    My script is here, you can see if your own photo collection is Emergent Orange!

    My Probation Officer suggested I get a hobby… hope she approves LD!

    Posted by
    Wednesday, August 20th, 2014 6:30 pm

    (title is just joking)

    I’ll be using my barebones.js library, and you can too!

    Its got a ready-to-use RTS-type map and a noise explorer and I used it for previous LD entries e.g. my platform game.

    I played around last week familiarizing myself with the Javascript physics engine p2.js, and put a simple exploration into barebones.js.  I’m not super happy with p2 physics not the API, but its probably user error.  I think it’ll work well enough for a contest.

    Here’s some barebones.js screenshots from some games I started and abandoned since the last LD: willcity_01Screen Shot 2013-07-10 at 15.21.09

    YOUR GAME HERE:

    Posted by
    Monday, May 5th, 2014 1:51 pm

    29.turtle1 29.mona_lisa

    As requested, I’ve updated my mosaic script to give hi-res PNGs.

    I have also improved the image matching algorithm, giving much better mosaics!  Old results on the centre column, new algorithm on the left above.

    YOUR GAME IS IN THESE MOSAICS!  Happy hunting :)

    I’ve bumped into the LD wordpress maximum image sizes, but if you run the script you can get mosaics at higher res (and get an index file that tells you where your game is!)

    ADD: I’ve blogged about how I made these!

    YOUR GAME HERE:

    Posted by
    Tuesday, April 29th, 2014 7:17 am

    Last LD we made scripts to show all the screenshots in a mosaic of the Mona Lisa.

    Our Art was in Good Company.

    I’ve updated the script, and run it again.  Your game is in this picture, somewhere!  Happy hunting :)

    This time, I looked through the Google Image Search results for “Beneath the Surface” to find a nice picture of a green turtle:

    29.turtle1.greedy turtle1

    A discussion about how to improve the script, or alternative images that better fit our screenshots, welcome :)

    Feast your eyes on this!

    Posted by
    Thursday, January 2nd, 2014 7:24 am

    ExciteMike made a very nice mosaic and script from the LD 28 entries:

    Mosaic of all LD28 Games

    Mosaic of all LD28 Games

    Very very pretty!  And it made me wonder how you’d make that mosaic fit some target image e.g. the Mona Lisa

    Here’s my script, and here’s the output

    run1

    (My script made the one on the right, if you’re wondering ;) )

    (And you still have time to play my game!)

    Plotting My Downfall

    Posted by
    Friday, December 20th, 2013 9:05 am

    We’ve been tracking my Ludum Dare results in order to weaken our strengths this Ludum Dare.

    We got off to a bad start in Ludum Dare 23 Tiny World with an embarrassingly respectable 4.14 in Graphics.  Well, we’re not respectable!  So we had to do something drastic about that and that was called Ludum Dare 24 Evolution!

    LD24 was a new low-point for us – how could it not be, it being the second entry and worse than the first?

    Ludum Dare 25 was predicted to be such a stinker that we didn’t dare enter!  The chart clearly shows our interpolated results would have been disastrously middle-of-the-road, so its all for the best!

    However, we became complacent, thinking we’d dodged the LD25 rating bullet as it were, and didn’t keep our eye on the ball; Ludum Dare 26 You are the Villain wiped out our earlier gains and we hung our heads in shame again.

    What were we doing wrong?  Should we have gone with a simple 6 hour platform game in 1D without background nor goal?  We plucked the lint from our navels and pondered.

    Ludum Dare 27 10 Seconds was masterfully managing the Theme and Audio aspects, but overall far too well received.  As said, we had managed a decent showing in Theme and Audio, and those are now trending safely downwards; but Humour, Fun and Innovation all trend alarmingly upwards and we had to focus on wiping those out this Ludum Dare!

    Really, was it time to go use GameMaker or *shudder* Unity or to make Windows-only binaries or blitz the board with speed ratings?

    Ludum Dare 28 You only get one is all tender hooks; my first solo entry, Ursa Miner, has definitely wiped our the Fun and Humour categories.  I believe I have successfully exercised them forever, and furthermore I believe my technical Innovation and destructive terrain will be well enough hidden that the bastards who keep playing the game for like 10 seconds (I have the server logs duh) and then passing judgement never even notice!

    chart_1

     

     

    My game, Ursa Miner.  Please overlook anything mildly impressive:

    Thank you everyone who is not a 10 second rater!  That theme was so last year!

    I’ve played my way through all the links people have given me on the IRC channel; so if you have a WEB game you want played, its just leave a comment here below :)

    How to make a hole in a mesh

    Posted by
    Tuesday, December 17th, 2013 12:39 pm

    With difficulty, is the usual answer :)

    Last week I came across csg.js and, thinking its online interactive demo super-neat, I posted it to reddit.  Unfortunately, it didn’t get the attention I thought it deserved, so I determined I would incorporate it somehow into this weekend’s Ludum Dare.

    The CSG in csg.js stands for Constructive Solid Geometry.  There are several, increasingly complex and increasingly efficient ways to do CSG.  csg.js takes the simplest, least efficient and very elegant approach by splitting the polygons in a mesh into a Binary Space Partitioned (BSP) tree.  A BSP is a tree where the two children of a node are those in front of and those behind a 3D plane.  csg.is then takes another BSP and computes the parts of it that are on the inside of the object in the first.  Using just this single ‘clipTo’ operation, and an ‘invert’ function, all the boolean operations – union, subtract, intersect – can be synthesized.

    csg.js is slow.  Its slow because its javascript, its slow because it supports a generic and extensible definition of a vertex, its slow because its using BSPs and its slow because its synthesizing boolean operations from just two functions rather than ‘unrolling’ that logic.   Using BSPs is also generally all about picking good splitting planes early on, and heuristics for this are hard.  In the maths sense.

    So I set about making it faster.  Because the objects in my game are basically cubes and symmetrical, my instinct was that picking the splitting planes as octrants would be a good choice.  And this simple thing made my benchmarking 3 to 5x quicker!  I also tried simple things like using arrays instead of objects and all the other tips and tricks you pick up for javascript optimisation; however, these only made it slower!  I lost a lot of patience with the various profilers in FireFox and Chrome too!  One interesting thing though is that FireFox is consistently 2x faster than Chrome!  And I thought Chrome was the speed demon :)  But these days, FireFox is way faster for computational javascript, it seems.

    One side-effect of using BSPs is that it is a very noisy process.  Polygons get split and split, and even if the ultimate result could be simplified, the output of the algorithm is a very messy mesh made from lots of small polygons.

    Here’s a practical example from my game Ursa Miner, where you can blast holes in the terrain:

    mesh1

    The top-right shows an innocent intact block.  On the left you can see how the faces on the cube are each made of just two triangles.  This is a very normal 3D block.

    Below, I’ve fired a cylinder at it.  And whilst you can see on the bottom left that the remaining faces are still nice and flat, you can see on the bottom right just how many new triangles there are to render in the scene!

    Here’s a fun development video showing it in action:

    And, if you want to see the mesh lines in my game, Ursa Miner, open your javascript console and execute:

     debug.showLines = true

    in the REPL!

    In making my game I had to try and optimise things to make it at all possible to make holes in things.

    The landscape is made from Perlin noise, and is infinite.  I divided up each chunk of 10x10x10 space and turned it into a mesh using marching cubes to not create the inside faces.  However, I discovered that it was prohibitively slow – even on my fast macbook – to fire cylinders through such big meshes.  So I turned each individual cube into its own mesh.  And now firing cylinders through things was fast enough, but rendering so many individual cubes was prohibitively slow!  So my solution was to render whole 10x10x10 chunks of space as a single mesh, but if you fire at it it immediately subdivides it into individual blocks.  This is an acceptable tradeoff and makes the game playable.

    So next Ludum Dare, lets see you incorporating destructive terrain into your game!  And, if you can’t wait until then, you can always go blast some cylinders through blocks and fly through the holes in my game Ursa Miner! :D

    Thank you CSG, thank you csg.js and thank you all for appreciating it :D

    Still no plot, but I could waste hours playing with my destructible terrain

    Posted by
    Saturday, December 14th, 2013 3:10 pm

    So you can fly about drilling holes in blocks with the ‘vapouriser’.

    Here’s a vid from a very early bit of prototyping:

    And now the blocks look a lot prettier and there’s a bit of noise deformation on them:

    Screen Shot 2013-12-14 at 19.18.48

     

    Still haven’t made any progress on how to adapt it to the theme, though ;)

    Ideals welcome :)

    Haven’t got a good theme idea yet but I’ve got destructible terrain!

    Posted by
    Saturday, December 14th, 2013 3:15 am

    Last week I discovered csg.js - Constructive Solid Geometry.  This is a library for computing the intersection, subtraction, union of meshes and so on!

    I forked it and played around with some performance improvements.  Its still very slow, even though what its doing is supremely non-trivial.  So I can’t really let you saw things in half with a mini-gun.

    So how can I use this for ‘you only get one’?  Ideas, anyone?

    Found some old hobby code on floppy disks today…

    Posted by
    Tuesday, December 10th, 2013 2:34 pm

    back at uni I used to make modding tools for Command & Conquer Tiberian Sun.  Models were voxels, and I made the voxel editor:

    Screen Shot 2013-12-10 at 13.09.06 Screen Shot 2013-12-10 at 13.02.07newunits10

     

    And these 13 yo exes run under wine on osx today :)

    Gives me fresh enthusiasm for LD 28!

    There’s more pics and descriptions of what I found on my blog: williamedwardscoder.tumblr.com

    How-To use the NSA’s Cyber Remote Analyst Portal

    Posted by
    Tuesday, September 3rd, 2013 10:42 am

    To: All secret agents

    From: The NSA’s Training Directorate

    Subject: New training video available

    Security: TOP SECRET

    (play: The NSA’s Where’s Snowden?)

    Running SQL in your browser

    Posted by
    Sunday, September 1st, 2013 12:12 pm

    As a key part of my Ludum Dare entry The NSA’s Where’s Snowden? game I wanted you – the elite NSA Analyst – to be able to hack the game world.  Imagine you could put your agents onto flights, or fiddle with the flight manifests so that targets were refused boarding or even arrested… and how would you do this?  I decided I wanted you to have SQL access to the world’s flight plan database…

    SELECT T.* FROM MANIFESTS AS M, MANIFESTS AS M2, TARGETS AS T WHERE T.PASS = M.PASS AND M.PASS = M2.PASS AND M.FLIGHT = 'AF-321' AND M2.FLIGHT = 'IB-794';

    But I couldn’t find any working SQL engines for Javascript!  The only thing I could find was TrimQuery, but I couldn’t get it to work and its quite old and not actively developed.  There’s are also a few LINQ-likes but they are not really SQL.

    Now SQL is the lingua franca of structured data querying so I was surprised at this sorry state of affairs.  Whilst LINQ is nice (because of the VS tooling!) I feel that a lot of the LINQ-likes are driven by hipster cargo-culting and that a solid SQL that can query conventional JS objects and arrays would be a powerful and useful thing.

    So I set out to build an SQL engine in Javascript (sql.js).  It was perhaps more fun to develop than the other parts of the game and more fun to examine than the game is to play :)  This blog post describes how it works (and how it can be done better):

    How to use sql.js

    It consists of a single function SQL().  The parameters are:

    • the SQL statement,  e.g. “INSERT INTO …”
    • the definition of the tables, which is a Javascript object acting as a dictionary.  Each table is itself an object, detailing the column names and specifying any constraints on them (e.g. if they must be unique or can be null) and optionally a description.  E.g.
      {
      airports: {
        code:{description:"IATA code",unique:true,notNull:true,},
        name:{notNull:true,},
        country:{notNull:true,},
        category:{description:"level of CIA infiltration",},
        lat:{description:"latitude (decimal degrees)",},
        lng:{description:"longitude (decimal degrees)",},
      },
      airlines: {
        code:{unique:true,notNull:true},
        name:{},
        country:{},
      },...
    • table access; an object where each table name that the user can update has a boolean e.g.
      (
      airports: false,
      flights: true,...

      Any table name that is omitted is read-only.

    • The data; an object where each table is a key and each table is an array of objects e.g.
      {
      airports: [
        {code:"LHR",name:"London Heathrow",...
      ],
      manifests: [
        ...
    • params.  This object allows you to override things like setting the default row count LIMIT.

    If the SQL cannot be parsed or if the table data does not have the expected fields then it throws an Error() exception.

    Otherwise it returns an object with a columns key and a rows key.  The columns are an array of strings which are the column titles.  Rows are an array of arrays.

    Parsing SQL

    To parse a language you often use a parser generator like lex/flex yacc/bison.  There are parser generators for Javascript too - jison and peg and so on - but I haven't used them and, to be honest, its quicker to just write our own parser from scratch.

    To parse SQL we can eat the statement a token at a time.  A token might be a number, an identifier or a symbol like an opening brace.

    Normally when I hand-roll a parser - its a bit of a recurring hobby of mine - I write the tokeniser to see what the next character is, and then based on whether that is a number, a quote mark or the beginning of an identifier or so on loop through until the token closes.  In sql.js however, I took a messy shortcut.

    When asking for the next token, I pass into the tokeniser the list of terminating strings e.g. when consuming table names in a FROM clause I'd ask for the next token (which I expect to be a table name) which can be followed by a comma, the word AS or the word WHERE or a semi-colon.  If my engine supported it, I could just add those additional possible keywords that follow a table name in the FROM clause e.g. ORDER, LIMIT and HAVING and JOIN and so forth.

    This meant that the next() function only had to do a Javascript string search - indexOf() - to find the nearest terminator.  However, this approach does have limitations e.g. it doesn't properly parse strings (if the terminator occurs in the string the indexOf() will incorrectly find it) and words that contain keywords (the Airport table namehas OR in it, for example).  By the time you've added code to address this, you end up with a proper tokeniser anyway.  So in hindsight I should have doubled my line-count and just gone with a classic tokeniser in the first place.

    Executing SQL

    Once the query is parsed and the array of table names built and, its just to execute the query.  And this is surprisingly simple using the Cartesian Product.  If table A had two rowsand table B had two rows then the Cartesian Product would be:

    SELECT A.V, B.V FROM A, B;
    A.V | B.V
    1   | 1
    1   | 2
    2   | 1
    2   | 2

    No surprises there.  But what if we add a WHERE clause?

    SELECT A.V, B.V FROM A, B WHERE A.V = 2;
    A.V | B.V
    2   | 1
    2   | 2
    

    We can get that by first generating the Cartesian Product - simple by iteration and recursion - and then filtering the rows by evaluating the WHERE clause against each line!

    This is thoroughly inefficient.  If there are 100 rows in one table and 100 rows in another then the Cartesian Product is (100+100)^2 = 40,000 rows!  It would be much more efficient to evaluate - and cull - candidate rows as soon as possible e.g. before recursing into every B row first check if A.V is 2.

    In the NSA game it's easy to be evaluating a Cartesian Product that is hundreds of thousands long, and this can take several seconds.

    The engine supports SELECT, INSERT, UPDATE and DELETE.  It doesn't support the JOIN keyword but it does let you join in the WHERE clause (as described above).  It doesn't support IN.  It additionally has SHOW TABLES, DESCRIBE table and CHECK table which provide utility.  Because of the needs of the game there is also some rudimentary access control so the 'hacker' can't really hack - and break - the game itself e.g. rescheduling or deleting flights and other havoc.

    I made the whole thing case-insensitive but that could easily be removed for data values and comparisons themselves.

    I added support for literals but the only literal I added was 'NOW'.  I treated all dates as strings and this allowed simple Javascript string comparison of dates.  I didn't support any functions, but this would be very easy to add too.

    Improving performance

    A proper SQL query planner (the code that decides the order that table rows are evaluated) has to understand the cost of retrieving rows (from disk and so on), but in Javascript RAM access speed is fairly equal and without indices you need full table spans so its just to filter tables by the parts of the WHERE clause that reference them as greedily as possible.

    Each table is an array of objects.  It would be straightforward to support arrays of arrays, and objects of arrays and objects of objects.  Using objects as the collections themselves would effectively be a primary key - an index!  Knowledge of this could dramatically speed up joins.

    The engine turns the incoming SQL into a chain of closures.  TrimQuery, by comparison, turns the SQL statement into a Javascript fragment that is then eval()ed.  I am not sure that is faster; doesn't that cause the Javascript VM itself to abandon a lot of cached JITed code?  But it may be faster to instead compile the SQL down to a simple VM.

    If you are running the same query again and again it would certainly help to 'compile' or 'prepare' the SQL statement once and have a way to run it again and again against data

    sql.js is surprising short given what it can do, and surprisingly simple.  I found it easier to write SQL statements myself to work out what was happening in the model than to use array.filter() once joins were involved.  With a better tokeniser and an expanded grammar and a simple query planner it could be widely useful.

    sql.js is doubtlessly more interesting than actually playing the game ;)

    Speed Dating Gaming

    Posted by
    Tuesday, August 27th, 2013 4:50 am

    Well I’ve charged through a few games in quick succession!  If there’s a pattern, its that most games use the “10 seconds” theme to limit the gameplay to, eh, 10 seconds.  There aren’t many platformers this time, and I think the theme has really limited people; there’s not much innovative slants on it all from my quick sampling.

    Its difficult for me as I’m not a Windows user. I can run Unity Web these days, which is a saving. I wish more people made web-playable games; I really don’t like downloading your untrustworthy binaries and neither should you!

    This is not all a bad thing; there are buckets of really good games that I’ve found already:

    10 sec. Fast Beef is as addictive as Angry-Birds!  You’ve been warned!  Definitely no just playing for 10 seconds to be had here!

     

    Notiempo is a multi-player FPS that looks gorgeous.  I’m dead keen to know how the multi-player bit works, since I’ve had no luck with it myself in pass LD contests.

     

    The Value of Time is a pleasing little puzzler where you help yourself out in a weird and wonderful way.

     

    10 Seconds Before the World Ends is a nice use of a physics engine.

     

    With over 2200 games, I’ve obviously only scraped the surface and not found the truly great games!  In most LDs, I haven’t even played the winning games and am completely surprised – in a good way – when the results are announced and there’s a whole bunch more recommendations to work through!

    My own entry was a bit of a miss this time, because the beauty is in the code and not the gameplay:

    ↑ The NSA’s Where’s Snowden? Game.  Please appreciate the Windows-ME-style interface and full SQL parser written in Javascript!  :D

    Now if you’ll excuse me, I have to go play lots more games! :)


    All posts, images, and comments are owned by their creators.

    [cache: storing page]