Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Atelier

#361
Hi, a very simple question, how would I display a float in a label so that it only shows it to 1 DP, with nearest rounding?

At the moment it shows it to 3+ DPs, depending on the width of the label.
#362
Dudes. Pronouncing it G.I.F will solve everything.
#363
I pronounce it G.I.F.
#364
I've already started something, remains to be seen whether I finish it or not!
#365
Towelie from South Park!
#366
1. Sunshine
2. Surname
3. Driver?
#367
Quote from: Cerno on Wed 08/05/2013 23:26:17
Since there is so much interest in the theme and with all these other competitions going on, maybe you can get this month's MAGS extended to next month? Or would that violate the rules?

This would be a nice idea, as we don't usually have as many as six people interested. If there was an extension, it would still run alongside MAGS June, but I don't really want to set a precedent for such a long extension.

If there is enough interest from those who already thought about entering (or anybody else for that matter), and it will mean they can finish a game, I could set a later deadline. Just post if you think it would help a lot.
#368
Khris that's awesome, thank you! I abandoned the project ages ago and when I came back to it recently I must have picked up on an old version - doh! I've adapted the draw function so the current cell is always drawn at the centre of the map:



Just a little thing, North and South appear to be inverted to the previous convention (now door 0 is S and door 2 is N). But this can just be taken into account in the code used to navigate rooms.

Thanks again!
#369
As the title suggests I'm trying to make a dungeon crawler, where the player can move from room to room. I vaguely remember posting about this a while ago. Anyway, I've spent hours on trying to make it work and it's making my head explode now.

Any advice on how to code it better, or how to fix the code, will be greatly appreciated (credited for the game). I know the code is broken atm - you get a hung script. I've annotated the code below, so hopefully it's easy to follow.

Code: AGS

//Rooms are referred to as 'cells'
struct Cell
{
 int door[4]; // Exit to the neighbouring cell. 0 = north, 1 = east, 2 = south, 3 = west. E.g. cell[1].door[0] = 2 leads to cell 2 at its northern edge
 int x, y; // Cells are on a grid system
}; 


function DungeonGenerate(int quan) // quan is how many cells will be in the entire dungeon
{          
     
     // The number of the cell for given coords is stored: e.g. x[5].y[7] = 5 (cell 5 is at x5,y7)
     struct Coord
     {
          int y[16];
     };

     Coord x[16];
     // the grid runs from 0-15 on both axes


     int i = 1; // start with 1, because cell[0] is never used. cell[1] is the starting room

     // RESET all the cells, because the function can be called more than once
     while (i <= quan)
     {
          cell[i].door[0] = 0; cell[i].door[1] = 0; cell[i].door[2] = 0; cell[i].door[3] = 0;
          cell[i].x = 0; cell[i].y = 0;
          i++;
     }


     i = 1;
     
     // Now we can start building the dungeon (and get problems)

     cell[1].x = 8; cell[1].y = 8;
     x[8].y[8] = 1; // starting cell is at the centre: x8,y8
 
     while (i <= quan)
     {
     
     int exits = Random(3)+1; // Randomise how many exits this cell will have (must have at least one, max 4...)   
     
     int o = 1; // Now, cycle through up to this number of exits

          while (o <= exits) {

              int d = Random(3); // Randomise the direction of the exit (0=N, 1=E, 2=S, 3=W)

               if (d == 0 && cell[i].y < 15) // NORTH, and cell isn't at northern edge
               {   
                    if (!x[cell[i].x].y[cell[i].y+1]) // There is no cell present at the coord to the north, so there can be a cell added there
                    {
                         // !! NOTE !! the new cell index is i+o, because exits might be greater than 1. So we need to keep adding new cells, up to this maximum 
                         cell[i].door[0] = o; cell[i+o].door[2] = i;  // The N door of current and S door of new are linked
                         cell[i+o].x = cell[i].x; cell[i+o].y = cell[i].y+1;
                         x[cell[i].x].y[cell[i].y+1] = o; // New cell placed at these coords
                         o++;
                    }
               }
                    
               else if (d == 1 && cell[i].x < 15) // EAST, and cell isn't at eastern edge
               {
                    if (!x[cell[i].x+1].y[cell[i].y]) // There is no cell present at the coord to the east, so there can be a cell added there
                    {
                         cell[i].door[1] = o; cell[i+o].door[3] = i; // The E door of current and W door of new are linked
                         cell[i+o].x = cell[i].x+1; cell[i+o].y = cell[i].y;
                         x[cell[i].x+1].y[cell[i].y] = o; // New cell placed at these coords
                         o++;
                    }
               }
                    
               else if (d == 2 && cell[i].y) // SOUTH, and cell isn't at southern edge
               {
                    if (!x[cell[i].x].y[cell[i].y-1]) // There is no cell present at the coord to the south, so there can be a cell added there
                    {
                         cell[i].door[2] = o; cell[i+o].door[0] = i; // The S door of current and N door of new are linked
                         cell[i+o].x = cell[i].x; cell[i+o].y = cell[i].y-1;
                         x[cell[i].x].y[cell[i].y-1] = o; // New cell placed at these coords
                         o++;
                    }
               }
                    
               else if (d == 3 && cell[i].x) // WEST, and cell isn't at western edge
               {
                    if (!x[cell[i].x-1].y[cell[i].y]) // There is no cell present at the coord to the west, so there can be a cell added there
                    {
                         cell[i].door[3] = o; cell[i+o].door[1] = i; // The W door of current and E door of new are linked
                         cell[i+o].x = cell[i].x-1; cell[i+o].y = cell[i].y;
                         x[cell[i].x-1].y[cell[i].y] = o; // New cell placed at these coords
                         o++;
                    }
               }
              
               
          }
                i++; 
                         
          }
          
     
     current = 1; //set the starting room to 1.
}


The problems I'm having with this method are:

• If no exit can be found, that cell is skipped so (a) you get drastically less than the number of cells you wanted, and (b) the next cell has its coords at x[0].y[0], because it hasn't been defined. This means the dungeon is split into two halves - the part that worked up until no exits were found, with cells clustered around x8,y8; then a cluster in the far southwestern corner (x0,y0).
• To get around this (force it to find at least one exit for every cell), I keep o++ outside the main body of the while loop, so it keeps triggering a different randomised direction to check. This obviously causes a hung script. But I don't understand it because every cell must have at least one of those directions free to branch out into, but because it hangs it implies no direction is ever found.
• You also get cells linking to distant cells that aren't even neighbours.

Bottom line, the code is flawed and I maxed out on brain power for this a long time ago, but I think some of the ideas can be salvaged.

Atelier
#370
Hmm ok. It doesn't look pretty but it's nothing major. Cheers!
#371
Love it! (It's a yes for now)!
#372
I'm using Khris' Dynamic Sprite Rotation Module: http://www.adventuregamestudio.co.uk/forums/index.php?topic=33122.msg601519#msg601519

Is there any way to preserve the alpha channel of sprites after rotation? Antialiasing is lost as soon as I do so, and I get black edges.

Thanks
Atelier
#373
Quote from: Baron on Wed 01/05/2013 01:37:24
I'm not on Steam and I don't really have spare time as such, so... reluctantly... I'm going to have to give up the X-COM prize to Chef/Stupot.

Let's play pass the XCOM! Where will it stop I wonder?

Seriously though, I'm in the same position as Baron (congrats btw)! It's a very kind offer but Chef and Stupot will have to toss a coin or something.
#374
Topic: 'Underwater'

This month's guidelines were set by DoorKnobHandle:

This month's theme is 'underwater' - but a game with just an underwater setting is too basic. Instead, the theme needs to be weaved into the actual game mechanics somehow. So a point'n'click that just so happens to be underwater (but could really have any other setting in the world) is NOT okay. A game where your air supply is limited (maybe just in certain areas), or where you have additional verbs that have to do with being underwater, is awesome. The player character could be a diver, a shark or just on-board a submarine, everything goes as long as the underwater element is not purely a visual element but something rooted into the puzzles/gameplay.

Ending 31st May



__________________________________________________________________________________________

This month's winner was Bioluminescence by Jaffles.



__________________________________________________________________________________________

What is MAGS?

MAGS is a monthly competition for all amateur adventure game makers. The idea is to create a game in under a month, following the rules set by the previous winner. It aims to help you work to a deadline, improve your skills, or provide a kick-start into making adventure games. Regardless of skill, MAGS is for everyone. Voting is based on "favorite" games, and not the most artistic, or the best coded. If you have bad art skills, use it as a chance to do some graphic work. If you're sub-standard at coding, use it as a chance to give scripting a go. Ultimately, people will vote for the most enjoyable entry.

You may get help for the competition, although you must end up doing something yourself. You should however be warned that it proves difficult to organize a big team within thirty days. You are not allowed to use material already created before this competition. Your game must be completely new! Music and sound is an exception; you can use free material that is available to the public, if you wish. Modules and templates are also allowed. Please do not enter the competition with a rushed entry (a game created last minute). Sure, you can make a game and rush it - but don't do this just to win by default.

Entering MAGS is simple. First, conceptualise your game following the month's criteria (see top). Second, create your game fueled only by coffee. Third, finally, and most importantly, post your game here, including:

âÅ"“ A working download link.
âÅ"“ The title of your game.
âÅ"“ A suitable screenshot.

At the end of the month, the all-important voting will begin! This period usually lasts fifteen days. Should you win, along with announcing the next month's rules, your name and game will be immortalised in the MAGS Archive. Yet hopefully, at the end of the month, the accomplishment of finishing a game will be your greatest prize. For more information please visit the Official MAGS website.
#375
Ahh that's a shame. But at least now you don't have to rush. It does look very interesting!

For continuity purposes, I'll declare Ghost the winner this month.
#376
No time to write a story per se, so settled for a vignette!

Drake's Equation

Monday morning in the capital brought with it a close, threatening air. Grey clouds shot with black marshalled in the sky for much of the day, promising nothing less than a terrific storm. Below, the people of London went about their business as they always had done.

At a set of traffic lights waited an expensive car, driven by an equally ostentatious broker. The gold bracelets on his wrist clanked as he tapped the wheel restively. He glanced up into the rearview mirror. Looking back into his eyes was a jowled, middle-aged man, with grey hair that told lies about his age; but he was well-suited and dapper, with a striking tie which he straightened adeptly. He was on his way to close a deal that was almost too good to be true, and he couldn't afford to give them any more time in which to change their minds.

But then something appeared upon the skyline; the broker would never again see his clients. Materialising through the storm clouds was a boundless metal hull, pitted with cavernous recesses, bristling with thick antennae, and shrouded in fork lightning that flared across its surface. Slowly and silently, like a vast sky-submarine, it descended down upon London. As it advanced, it grazed the tops of the City skyscrapers like a lawnmower cutting through blades of grass. In its wake sprang a firestorm.

The broker scrambled from his car and gawped at the Thing in dribbling disbelief. All about him, people had abandoned their cars and were doing the same. Soon, from the flats either side of the road, people in dressing gowns emerged onto the pavement, or leant out of their windows, to see what had everybody so transfixed.

Suddenly, a woman screamed, igniting a stampede. Some left their cars behind in blind panic, and some even left wide the doors of their houses, joining the unidirectional exodus in their slippers. The broker himself was just about to leap back into his car when somebody rushed him from behind.

"Mine now!" they cried. The broker was gripped round the waist by iron arms, and thrown aside onto the tarmac. Before he could pull himself up, they made off with his car, leaving him floundering in the centre of the road, with the carnage unfolding all about him.

The carjacker switched on the radio, darting through the frenzied traffic with one hand on the wheel. No station was still broadcasting music - only faint and haunting news reports - so he scowled and turned it off. This was the end of the world he'd always dreamed of! He didn't care what that Thing was - only that it would bring a new life for him. The carjacker smiled at his change of fortune, exposing a set of rotten and gold teeth from behind his thin lips. His hair was cropped and his cadaverous face pitted with acne scars. He pulled a ringing mobile from his pocket and held it to his ear.

"… Yeah yeah, it's crazy down here man! That thing is messed up!" He bent low onto the steering wheel, and beheld the Thing through the windscreen. It had now fallen sharply over the city, and was moments away from crashing to a rest. Electricity continued to spark across its exterior, illuminating the city. "Where's you anyway? … Bun that man, I'm time from there! I'll meet you-"

Suddenly, the ground shuddered and split as a huge earthquake struck the city; the Thing had impacted on London. Around it, a tsunami of dust and burning rubble shot into and rained from the sky - every chunk like a meteorite. The Thing, now a static wall of unimaginable expanse, looked down upon London forebodingly, the top lost to the clouds above.

The carjacker lost control in the tremors and ploughed through the front of a coffee shop. A young waitress cowering beneath a table shrieked as it came to a deafening halt - the front bumper inches from her head. Sobbing, she took the white apron from her neck, and clambered over the broken glass and upturned furniture into the street outside.

The waitress sank to her knees as she saw the Thing on the skyline, where spires of the City had once stood. Now, from the black holes covering its surface, millions, millions, and millions of metallic drones teemed like termites from a mound. Each shot jets of fire from between two needle-like prongs, wrapping the city in flames like it was a tinderbox. Soon they masked the sky like migrating birds, with all the fury of a swarm after its hive has been kicked.

Somewhere up above in the drone soup, one of them spied the waitress on the pavement far below; then it dived like a seabird catching a fish.
#377
I will post something tomorrow on deadline day, trust me!
#378
I think the question has been clipped short, how old is this message?

So... 'age old'?
#379
General Discussion / Re: Thousandth Post
Fri 19/04/2013 22:59:49
Call me dumb, but this seems like a good time to ask. What does the 'most popular boards by activity' thing actually show? It doesn't add up to 100% and I barely ever go on the recruitment board. Is it something to do with when the board indexes were shuffled?
#380
Almost two-thirds of the way through. Progress reports?
SMF spam blocked by CleanTalk