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 - HAL

#21
Downloaded this a few days ago.

Did I miss something or is it really that short?

I'm not complaining, just asking as the description suggests it might be longer.

As far as criticisms go, I personally think it was really, really cool. Really atmospheric , I have nothing to complain about at all. I could never design something like that. Awesome :smiley:

The character style and movement was really cool too.
#22
First game finished!

UPDATE UPDATE: Game file is now hosted on DropBox, instead of the Chinese server I was using before. It should now be accessible to all.

UPDATE:
Gave the game an opening menu so it doesn't just dive straight into the first level.
Also added a map to the inventory which charts progress. Gives it more of a 'travelling China' feel.
Changed the main character sprite so it isn't the default Roger.
Increased dialogue font size so it's easier to read.


First, a bit of an introduction: I'm in China for a year, studying here. Having just finished my first semester and with two months winter holiday ahead, I completed a bit of travelling and then returned to campus still with plenty of time to spare, so decided to have a look online for 'old games', at which point I stumbled across AGS and was immediately absorbed, and got to work on making a game based (very, very loosely) on my recent trip. I've spent an average of 12 hours a day continuously making this game for the past two weeks, and I must say it's been quite fun, although I don't think I'll be returning to such a routine any time soon!

The game fits firmly into the category of 'training game', but I must say it was one hell of a dose of 'training'.
Also it's fairly large. It'll take a good couple of hours to complete. Maybe a lot longer.

- Join Chongo on his absurd adventure across China, from the central-southern city of Chengdu to the freezing northern tip of Harbin, with many more epic locations in-between.
- 61 photo-realistic locations all over China
- 16 inventory items
- A final 'boss' the likes of which I'm certain none of you will have ever experienced before.













Downsides:
- Uses royalty free music I found online so you may have heard the soundtrack before
- It plays in full screen but the image is a smallish box at the centre and I can't get the picture to scale up. Maybe others know how to do it, but I can't on my computer and I've tried everything. However it's 640x480 so still perfectly playable.


DOWNLOAD HERE


A disclaimer:
Spoiler
DISCLAIMER  - The final boss level is NOT a political statement. The game was a whirlwind of random creation, literally making it up as I went along. The final level just 'happened' and is supposed to be as comically absurd as the rest of the story. I doubt anyone cares anyway but I just thought I'd cover my back in cases someone decides to get touchy about it.
[close]

Comments and criticisms are welcome.

Overall I'd like to say I'm quite chuffed with the result for only 2 weeks' work :smiley:
#23
Thanks for that, I've downloaded it and just gave it a try.

Unfortunately all the upscales were coming back all bitty with really bad edges. :undecided:

I tried converting to PNG, BMP etc but no luck.

It's still definitely useful though, however for this project I'm on I think I'll just leave it as it's just a training project anyway really. Next time around I'll try to design my own or something :smiley:
#24
Maybe a few years down the line I'll be the one telling people how do it. Heh!
#25
Quote from: Visible_Stalker on Fri 13/02/2015 17:02:27

Something like
Fox: You need a dictionary?
(character gets dictionary)
Fox: You should use it sometimes

I'm a noob myself, but this is something I can do so I think I'll get suck in with helping others out :grin:

In the dialog creation box, you can press tab to intend the code and revert it back to being read as normal game script.

I would do something like this.


Quote
FOX: You need a dictionary?
  player.AddInventory(iDictionary);       //Note how this line is indented
  Display("Fox gave you a dictionary");   //And this line. The font turns black so you know it's code and not dialog.
FOX: You should use it sometime.


   
#26
You won't believe this.

In my previous thread my final working code used SetPosition(). :sealed:

I think I switched to Move() because it allows you to decide speed, so for some reason I had this idea it would mean I could change the speed at which the bird moved across the screen. Halfway through realised this wouldn't work because it's always gonna be going through 450 cycles so will always take ~11 seconds. Well, actually it wasn't working at all so I don't even know what I was thinking, hah.

At no point did it click that I needed to switch to SetPosition().

It works now. To change the speed I just made the loop counter increase by i = i+X  each time.

Thanks again :smiley:

#27
Here's my code.

Code: ags


  int i = 0;
  float yy1 = 0.0;
  float xx1 = 0.0;

  while(i<451)
    {
    xx1 = IntToFloat(i);
    yy1 = -(((4.0/2025.0)*xx1)*(xx1-450.0));
       
    oBird1.Move(81+i,367+FloatToInt(yy1, eRoundNearest), 6, eBlock, eAnywhere);
    Wait(1);
    i++;
    }


This should generate a parabolic flight path of an upside down U-shape, moving from left to right, 450 pixels across the screen. (Assuming my maths is correct. Either way, it should generate a path of some sort).

It totally doesn't though. The bird blips a little, the loop then runs to the end with no movement, then when it's done the bird moves horizontally across the screen in one smooth final move to its end co-ordinate.

I'm trying all the techniques from the similar thread I made just yesterday, but always failing.

Have I missed something? :confused:

Thanks.
#28
Seems like the repeatedly_execute function is more handy in this case actually.

Got it all figured too.

I now have a bird permanently flying around performing lissajous curves. How awesome, programming's pretty fun, heh :cool:

Can you tell I'm pretty new to this still.

Thanks again. :smiley:
#29
Quote from: Snarky on Sat 14/02/2015 14:43:18


No, the problem here is that the entire loop runs within a single game cycle, and then ends. So internally, the game calculates and sets the bird-coordinate, but then it loops again and sets it to some other value, over and over until the loop ends. Only at that point does it actually draw the frame, with the bird in the final position.

There are two ways to go about fixing this:

1) Put a "Wait(1);" command inside the loop. That means it will stop there, draw the frame, and only continue on the next game cycle. However, this will also stop other scripts from running, so it will effectively pause the game while the bird is circling.
2) If you want it to run in the background and not interfere with anything else, you'll have to put it in a repeatedly_execute() function, which automatically runs once every game cycle. The logic becomes a little different (you won't need the loop any more); let us know if you can't work it out.

Fantastic. That did it.

I used option 1 as my aim was to use the animation in some kind of cut-scene event, so the game can pause, no problem.

I didn't realise the wait() command was anything more than just a thing that makes the game do nothing for X cycles. Living and learning.

I've seen mention of the repeatedly_execute() function a few times and I thought it might serve some purpose in a situation like this. If/when I come to want to have background animations or something, I'll be sure to look into it.

Thanks very much for the help, much appreciated! :smiley:
#30
Batching might just be the way.

Or, seeing as all I've done is change the colour of the guy's sleeves, hair and shoes, I might just not bother :grin:

It's only a first-go at making a game so the character isn't a giant issue. I aim to have it done by Friday. If I have time before then, I'll change the character sprites. If not, never mind.

Batching sounds like a good shout either way though. Thanks :smiley:
#31
That worked!

So I just need to make sure to add a decimal .0 after assigning float values.

Great stuff, thanks a lot. :grin:

However now have another problem.

I've applied the code to an object in a room. When I enter the room, instead of a smooth movement, the object just pings over to one position and then stays there. There's no smooth movement.

I presume it's because the script breaks early for some reason? Have I put the code in the wrong place?

Oh and I've done a quick check and yeah I think this trig function does produce a circular movement.

Here's the code for the room I'm using:

Code: ags

// room script file

function room_Load()
{
  player.SetWalkSpeed(4, 3);
  player.Walk(555, 444);  
  
}

function room_LeaveRight()
{ 
  player.ChangeRoom(42, 26, 440);
}


function room_AfterFadeIn()
{
   int i = 0;
   float k = 0.0;
   float x1;
   float y1;
   
   while(i<100)
    {
          
     x1 = 40.0*Maths.Sin(k);
     y1 = 40.0*Maths.Cos(k);
     
     oBird.SetPosition(345+FloatToInt(x1, eRoundNearest), 213+FloatToInt(y1, eRoundNearest));
     
     k = k+0.1;
     i = i+1;
    }
}


This is just a bit of a test, so I don't desire to see anything other than the bird moving in a circle.

I haven't used k = IntToFloat(i) because I want it to have its own increments of 0.1. That way it'll take a good 30 cycles to reach the value of Pi, so the trig functions progress slower.
#32
Hmm, this could be the case.

I set my game to 640x480 from the start though and it's all been fine up until I decided to do this export/import thing.

It's not a big issue if I can't figure it out as I do still have the standard default sprites available. It just means my first game won't have its own character.
#33
I'm having a go at learning to animate things using parametric functions of x and y, using trigonometric functions to gain smooth curves of movement.

I'm having problems all over the place, saying it either 'cannot convert Int to Float', or 'cannot convert Float to Int'.

I've tried all sorts of variations of Ints and Floats, but nothing works.

The key issue seems to be that the Sin and Cos functions need to take float values, but I then need to bring my results back to being Int values for the co-ordinates in the Move function.

As far as I can tell, my code should get around all this. But I guess I've gone wrong somewhere.

This current coding setup is failing on line 2, saying it can't convert Int to Float.
But why does it even think 'k' is an Int in the first place? :confused:
If I change 'k' to Int, it just pushes the problem further down to lines 8 and 9.
Mega confused here :undecided:

Code: ags

   int i = 0;
   float k = 0;
   float x1;
   float y1;
   
   while(i<100)
    {
     x1 = 40*Maths.Sin(k);
     y1 = 40*Maths.Cos(k);
     
     oBird.SetPosition(555+FloatToInt(x1, eRoundNearest), 489+FloatToInt(y1, eRoundNearest));
     k = k+1;
     i = i+1;
    }


If I remember correctly, this code should only result in the bird oscillating diagonally over a straight line anyway, which is a little pointless, however if I can get to grips with this then I can start playing around with more complex trig functions to move things in spirals etc.

Thanks for any help. :smiley:
#34
Hello, first post, new user, just started using AGS and christ almighty I do believe I've found myself a new ultra awesome hobby for rainy days.

Just a quick question:

I'm making a bit of a game and some of it is fairly generic as I'm new to all this, so to try to add at least a bit of variety I want to change the colour scheme of the default character sprite. I know it's not much but then it's at least slightly 'my own'.

From the sprites folder I see I can 'Export all sprites in folder'.

I choose this option and it gives me all the sprites, at 18x40 resolution, in the designated folder.

I then spent ages changing the colouring of them all, and imported them all back in only to find they're now far too small. My character is now a midget.

What do? :confused:

Ok I guess I could just scale up every sprite in MS paint or photoshop or whatever. But I just think it's a bit weird. I have the fully functional default character sprites, which I export to my computer, and then when I export the very same sprites, simply with a new colour scheme, with the very same resolution they came out at, they come back too small!

Is there something I've missed somewhere? Or is there an easy way I can get around this?

What's the default resolution of the in-game character sprite? It exports at 18x40 but that's too small when I import it back.

Thanks all.

I should have a fully finished game in the next week or so, which I'll be sure to share.
SMF spam blocked by CleanTalk