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

#61
I solved my problem, thank you all for your suggestions.

I did as following and it works fine, and I'm sure code
can be semplified:
Code: ags

bool goRight = true;
bool goLeft = false;

function region1_WalksOnto()
{
  
  if (goRight == true){   
  
      int i=0;
      player.Walk(360, 260);
      
      while ( i <40){   
        i++;
        Game.Camera.SetAt(Game.Camera.X + 8, Game.Camera.Y); //Same speed as sky
        oPianoIntermedio.X = oPianoIntermedio.X+4; //Half speed
        //foreground auto scrolls
        oCielo.X = oCielo.X+8;
        Wait(2);
      }     
      
      goRight = false;
      goLeft = true;
    }
  
  else if (goLeft == true){

    int i=0;
    player.Walk(260, 260);
    
    while ( i <40){
    
      i++;
      Game.Camera.SetAt(Game.Camera.X - 8, Game.Camera.Y);
      oPianoIntermedio.X = oPianoIntermedio.X-4; 
      oCielo.X = oCielo.X-8;
      Wait(2);
    }
    
    goRight = true;
    goLeft = false;
  }
    
}
    

Sorry I forgot that my variable names are in italian,
so oCielo is for sky, oPianoIntermedio is for middle ground.

In this way the objects scrolls in different speeds while also camera moves.
#62
Thank you very much Crimson and Khris.

I will make the room as soon as possible
and apply your suggestions in script.
#63
Hello people of community,
I need your help.

I would like to:

-draw a big background
-split it into two camera scenes, scrolling left to right and viceversa in certain points of the screen
-I would like the sky to be frozen during the animation

Foreground is full of big objects drawn between it and sky, and I abandoned the idea of making
sky and foreground big objets because that would make everything harder. I wonder if there is
a way to use foreground as background, and sky as object put behind it. I hope you have better ideas.


Purple is for walking line.

Thank you all in advice,
Giacomo
#64
Hi Crimson,
thank you very much for your exhaustive reply.

I am having a hard time to make the camera scroll smoothly,
and will use your demo script to do it. The bridge quest is just
fine for my aim!.

Tween module is awesome too and thanks for introducing it to me!
I am pretty sure I am gonna use it on the days on.

Best regards,
Giacomo
#65
Hi eveyone!

I'm sorry I can't solve the following problem on my own...

So, I have 320x240 screen resolution.

The room's background is a triptych which is 960x360 (There's an upper part also).

I'd like to set the camera to the left portion of the background so that
when the player reaches the right border, the camera scrolls rapidly to the second part
of the background, and same thing for the third part.

In the third part, the player takes a look up and there i'd like the camera to move
up to show the sky.

How is that possible?

Here's a graphic example.

https://imgur.com/uHASYHk

Thank you all in advance!
#66
Quote from: Khris on Tue 06/07/2021 13:27:38
Hi Giacomo,

sorry I don't have time right now to read all that, but as for restoring the room background:

Code: ags
DynamicSprite* bgBackup; // declare in room scope

// "enters room before fadein" room event linkage required!
function room_Load() {
  // create backup of room background graphic
  bgBackup = DynamicSprite.CreateFromBackground(); // will use first frame (0)
}

// custom function so rep_exe isn't cluttered
function DrawShadows() {
  DrawingSurface* ds = Room.GetDrawingSurfaceForBackground();
  ds.DrawImage(0, 0, bgBackup.Graphic); // restore room background
  // draw shadows here
  // ...
  ds.Release();
}

// no event linkage required
function repeatedly_execute() {
  DrawShadows();
}

#67
Excuse me guys, I made an error in my draw.

I will solve it and post new results in the right thread.

Khris answered my question so, we are done here!

Thank you again!
#68
AGS Games in Production / Re: Future Flashback
Wed 07/07/2021 18:40:09
I'm sorry Darth Mandarb, the next time I will send a PM.
#69
AGS Games in Production / Re: Future Flashback
Tue 06/07/2021 18:35:12
Man, this is so cool, I love your style!

Let me also thank you for your activity in the forum,
it helped me a lot.
#70
Quote from: Danvzare on Thu 01/07/2021 11:44:33
Welcome to the forums Giacomo. I look forward to seeing what you make.
Good luck with becoming a programming. It sounds like you're making great headway on that, so I'm happy for you.

Also a little bit of advice. If you want to get better at pixel art, but you're not very good at art in general. I highly recommend practicing drawing with a pencil and paper. It might not seem like it, but traditional art skills carry over to all types of art, including pixel art. My pixel art came along in leaps and bounds when I started learning myself how to draw. If you already have a reasonable drawing ability though, then you can ignore what I just said.  :-D

Thank you so much, Danzvare, I'm so happy to take part in the community!

I know what you mean and indeed I have always drawn with my own hands before I knew aseprite.
I am not so bad in drawing, neither so good, but I had no sense of perspective.

On last months I indeed started studying perspective illustration in order to create my own graphic for games, as color theory but, most of all,
I obsvered a lot. I observe landscapes, tiny figures like insects, leaves, surfaces details..shadow projections, the difference between same colors at
different distances, like th mountains or hills etc etc etc. I think I got what you mean!

Despite I'm still a newbie even in pixel art, I'd anyway like to show you something and listen to your guys critics. I will do it
in the right thread of course!

Thank you again, see you around the forum!

Welcome Ruslan and all new users!

#71
Khris, thank you so much!!

For what concern the rest of my post, please take your time and let me know
once you can. I hope I explained myself well enough.

So, the function as you wrote it can be used also for water reflections and vertical mirrors (I know I also need baselines),
am I right?

My first mirror test almost worked good and the script was much more messy....This is simply great!

Thank you again!
#72
Hi Khris,
it's a great pleasure to meet you.

I learned the basics of  AGS mostly thanks to your replies in threads, so thank you very much, you are a superstar!

I have already seen your video and I was happy to know that a dynamic shadow effect is possible,
and thanks to that video I decided to give it a try myself.

Maybe the discussion should be moved in the dynamic shadow thread, so
please let me know if I should post there. The fact is that so far my doubts concern with background cleaning from drawing surface.

Here's the thread:

https://www.adventuregamestudio.co.uk/forums/index.php?topic=57760.msg636615771#msg636615771

[EDIT: I removed this part because it is full of errors. Sorry ]

About Dynamic Sprite drawn by player frame, please tell me something more.

I did as it follows:

I define Roger's View Frame, Dynamic Sprite Drawing Surface outside functions.

I am working in room script and not in global just because I am doing my tests in a single room but
wonder if I can do the same in a RepExecAlways function in global script and how that should work. The fact is
that every room having a light source requests it is own useful coordinates point.

When I call RepExecAlways room function I copy Roger's current frame and draw it on BG. How can I clean the BG?

Can you please show me the code you use to clean the background at every game cycle?

Thank you very much!
#73
I solved using Overlay, yet I wonder if a manipulation of the sprite is possible
#74
Hi everyone!

I am trying to create a Dynamic Sprite from a character's current frame
to make a shadow effect.

I am a newbie and searched for answers both in manual and threads, but I am sorry to say that I'm stuck already.

So, created a dummy character that follow the player like a water reflection.
This character's animation frames are bitmap files taken by editing the player
sprites to appear black and vertically mirrored (I modified Roger's sprites in sprite editor),
then uploaded to AGS, assigned to dummy character view and loops and made semi-transparent via script.
Can this be a good start point?

Futhermore, I'd like to modify these dark bitmaps calling Dynamic Sprite in RepExecAlways function and applying maths operations on them; I wonder if it is possible to do it on the current game frame, I mean, loading a modified bitmap sprite as Dynamic sprite of the chatacter frame.

The following instructions work as they should: create a copy of Roger's current frame, loop and view and draw it on room background, copying is walk animation at  his every step. I left the dummy character out of instructions for the moment, because I'd like to work directly on Roger
frame to do my tests.

But I have problems in deleting Dynamic sprite drawn on background surface,
so I ask you guys if it is possible to clean the background every time i draw a new frame
from Roger's animation.

Thank you all in advance,
Giacomo
#75
Hello everyone!

My name is Giacomo, I am 31 yo and I live in Italy.
I am a super fan of LucasArts and Sierra games, and graphic adventure is
the genre of game I prefer.

Thanks to a game I played, almost one year ago, which was made with AGS,
I found about the software and community, and, during the boring, infinite days of lockdown,
I decided to give a try myself and took my first steps into scripting and coding.

Before I decided to intoruce myself, I wanted to learn more and made a very little donation
to thank you for your great job, AGS is awesome and I want to learn more in order to produce my
own games.

I will soon begin a Java course certified by Oracle and the reason is
that I am probably going to lose my job; that's why I decided that I would become a programmer!

I'd wish to thank so many users who helped me understanding AGS scripts but I'd not know where to start and
neither I'd like to miss someone, so please let me give you all a special thanks because thanks to this community
I made up my mind about what kind of job I am looking for!

Actually I "work" (on payroll subsidies) as light designer and produce 3D projects for calculating light emission in the enviroment; 
for my (still few) knowledges about light, I have a little dream and wish to create a module for
implementing shadow projecting (I saw Khris video on YT and, dude, that was really cool!).

I play music since I was 8 yo and I have a pretty good knowledge of it.
I can play piano, guitar and bass, drums, harps, accordion and xylophone.
I can compose and write music, but be aware that I am not a music master!
I can use GuitarPro(actually I use TuxGuitar on Linux), Pro Tools and Garage Band.
I can compose and record music with these softwares, but I am not very good at mixing instruments,
preferring writing and recording.
I offer my free help for music composing.

I have a bachelor's degree in history and I particularly studied 17th century's piracy.
Why did I study piracy? You can answer yourself! Thank you a lot, Gilbert and Co!
Maybe I can give my little help in story design concerning modern ages' piracy.

My italian is pretty good as I really like my language, so surely I can help translating english into italian.

I'm into pixel art since few months and I learned pretty well the use of aseprite for my drawing productions,
but I am not good enough to be called pixel artist yet.
With aseprite, I am also learning sprite animation and background design.

Me and my friends are trying to create our own old-style game with AGS; one of them can script better than me.
Soon I will ask for your help about somethings I need to understand for scripting.

I am very happy to meet you all!
Please, test my capacities!

Thank you,
Giacomo

SMF spam blocked by CleanTalk