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

#281
I used ProcessClick to try and find a function other than Walk():

Room.ProcessClick(580, 404, eModeWalkto);

But Julius doesn't walk to these coordinates. Am I doing something wrong?
#282
Is there anyone in here who can help?
I'm happy to post code if that helps find a solution?
#283
I've noticed the following weird behaviour.

My sprite has a wide area under him:



...so to make him walk back and forth on the path set out, I need to either:
a) export, change, and re-import all the masks for every room (not happening, too complex, will take 3 months, plus I have to resize paths with continuous scaling, and just editing a mask .bmp is paint.net or paint.exe results in it saving wrong)
OR
b) make his z coords good for "lowering" him to the path

I've already come up with an equation which seems to work 100% of the time depending on his scaling:

cJulius.z = 0 - ( FloatToInt( (Z_FACT / 100.0) * IntToFloat(cJulius.Scaling), eRoundDown ) );

Where cJulius is my sprite
Z_FACT is a floating point constant of 72.0 (about the distance his feet are from the bottom of his frame, 72pixels)

The final result for cJulius.z is always a negative number.

I have a usual interact function: walk to object, face object, say something, pickup object (play an animation of him bending down to get it).
The pickup animation is the same size exactly as the standard walk animations; it goes seemlesly.

HOWEVER

When I have a .Walk() anywhere near to the .PickupUp() animation, it 'resets' itself after I've done this --  in other words, it seems to jump a random amount in height, for no known reason:
https://bluekeystudios.com/img/julius reset.webm

When I take out the walking line, no reset:
https://bluekeystudios.com/img/julius no reset.webm

The code is:

Code: ags

function oWallet_Interact()
{
cJulius.Walk(587, 396, eBlock, eWalkableAreas);    <-- THIS LINE CAUSES RESET; if I comment it out, no reset occurs.
cJulius.FaceObject(oWallet);
cJulius.SayBubble("My wallet! Something survived the time-travel. Oh... it's got all the money missing.");
cJulius.PickUp(eLow, iWallet, oWallet, false, 8, player.Room);
}



Also, here's the .PickUp() code:

Code: ags

function PickUp (this Character*, PickUpHeight height, InventoryItem *i, Object *o, bool visibility, int obj, int room)
{
 
int _loop_down=0;
int _loop_up=0;
 
if (height == eLow) {
_loop_down=138; //low
_loop_up=140;
}
... //other heights, this just sets the view number for the pickup down, pickup up views
 
int cur_loop=this.Loop;

this.LockView(_loop_down);
this.Animate(cur_loop, 1, eOnce, eBlock);
this.UnlockView();

this.AddInventory(i);
o.Visible = visibility;

this.LockView(_loop_up);
this.Animate(cur_loop, 1, eOnce, eBlock);
this.UnlockView();

}



Now - obvious questions:

Have you tried setting Julius' loop to the same each time, even when you don't include the .FaceObject() function call? Yes - still happens.
Have you tried peppering Wait(1); between each line of code, and the .PickUp animation code? Yes - still happens.
Have you created a new room, with all the same objects, paths, masks and scaling, and see if it does this still? Yes - still happens.
Have you tried making a generic room with only the Walk,Speak,Pickup code in it? Yes - still happens.
Have you tried deleting the line to do with the .FaceObject() function, so it's walk,speak,pickup; or for that matter walk,pickup; or walk/wait/speak/wait/pickup; or walk,wait,pickup; or...? Yes - still happens as long as .Walk() is there.
What about when Julius walks to an object by guidance of the mouse, not a Walk() command It works when I send him to a point, but not the command .Walk(). However, don't really see how I can get rid of this.
Is the .z variable the same before, after and during? Yes, tested thoroughly, but .z is miss-set when I pickup something, as opposed to the clone rooms. When set .z based on scaling alone eg. if .scaling=5 then .z=-16 or whatevs -- it sets the .z different to other rooms, and the 'reset' still happens. However, the .z it's set to is always the same mis-set number.
What's the function for the setting Julius' .z variable?

Code: ags

function repeatedly_execute()
{
cJulius.z = 0 - ( FloatToInt( (Z_FACT / 100.0) * IntToFloat(cJulius.Scaling), eRoundDown ) );
....
}


Have you tried writing it walk/say/nothing You mean leave out the PickUp() animation? Or the .SayBubble()? It still does the reset wherever there's a Walk() command.
Is it something to do with the .SpeechBubble() code? Perhaps - I've got 0.8 but made a few minor changes to integrate it. Anyone wanting to see it I'll PM it to.

Am I missing something here? Does walk always do this, reset graphics somehow? Does walk() do something which the standard code for getting a character to walk somewhere based on a mouse-click in eModeWalk doesn't?
Am I insane, or as usual overthinking?

Plz help :(
#284
...And that's why this is in beginners technical questions :P

Thanks :)
#285
Code: ags
function getZFactor()
{
  int x=0;
  int scale=player.Scaling;
  
  if (scale==0) {
    return 0;
  } else {
    switch (scale) {
      1:    x=0; break;
      2:    x=-1; break;
      3:    x=-2; break;
...


"GlobalScript.asc(6): Error (line 6): Invalid keyword '1' in switch statement block"

But... switch *only* takes integers?? So....?
Completely confuzzled.
#286
You set a max/min-volume for a position; the closer the player character gets to this position, the higher the volume is; and the further away is a downshift in volume.

Does anyone know if a sound function like this exists? I seem to remember seeing something like it a couple of years ago, but not sure where it is or exactly what it entails.

And 99% of you will say 'check tween', but do you know if anything like this exists in AGS?
#287
Engine Development / Re: AGS engine iOS port
Wed 29/01/2020 22:33:20
Anyone know if the iOS engine is/will be upgraded to 3.5.0?
#288
Whereabouts in the code is it snarky?
#289
Quote from: Crimson Wizard on Mon 06/01/2020 22:08:57
Not exponentially, I think, but linearily, yet it does resave them all again, reading from the previous file, which is very non-optimal indeed, yet no one has worked on improving this, so this is still how it is.

UPD: I guess the main reason is that any of the existing sprites may have changed, so it resaves them all for simplicity. But that is probably still could've been optimized to save only new sprites if nothing else changed.

So whereabouts is this in the code? I could stare at for 15 hours :P
#291
Hi, just wondered something I could know by looking at the code for 4 hours, but this is quicker... :P

Why does it take so long to save the game when new images are imported? Does it have to: open the compressed image file (long time at 3.5GB); save the new images; index them all again; close the compressed file,
OR
Does it use a custom technique for saving and indexing sprites which is O(n^2) for time, so time increases exponentially with the number of sprites,
OR
Some other reason.

??
#292
Okay well that's a relief, I thought error lists were per version, not per project.
Luckily I've found none which stop development of my game, or give the dreaded 'your file is corrupt' one.
Good luck with your new job :)
#293
Final? There are 65 bugs.
But that's okay, I've never solved one :p
#294
All good I think. I created and saved the icon with IrfanView, and it's partially worked. Waited about a minute while recording that video, and then the icon *was* there. So god knows :/
https://bluekeystudios.com/img/icon_demo.webm
https://bluekeystudios.com/img/icon_demo2.webm
#295
As title says - every ICO file I try results in an error 'cannot use this file as a custom icon file' or thereabouts.
Then there's Axialis IconGenerator - except that either doesn't, or I can't find how, you take an image of your own, open it, and save is an ICO. Seriously, no way out - unless I want to use a New File icon as my games icon :/
Anyone else having this problem? Could you offer advice?
#296
Really? That might be useful with my animation...
#297
It definitely did in the latest Stable version.

Not tile import, full image import.
What... is a tiled import?

It's actually a bug now? 

I can say it's an essential feature. What I would do was a batch action in photoshop, import all images (perhaps 100+), do a view, not like it and realise it needs changing, alter batch action and image size by one row of pixels, and then reimport. Now, I have to delete all frames in view, then everything in sprites, then reimport, etc. It's very tedious.
#298
First case, smaller-than-original image: I'm not sure I understand what you mean. If it's a smaller image, it just fails with ‘Tile selection for sprite 12345 was out-of-bounds for image '\path\to\image'. The original image and the replacement are both from the same directory source, same name, same file, but one is smaller, or updated. The original is left there; the new replacement one is still there after this process.

Second case, larger image: take a picture. You have a small frame for it to be put in, but the new photo is larger than this and won't fit in the frame. To fit it in the frame, you push it into the upper left corner, and then shave off the excess on the bottom and right sides with a knife. You now have the smaller image view of the larger picture; it's cropped off and useless.
#299
I think I may have found a new bug.

When importing an image (or multiple images), 'from source', of a different size, the editor either

a) says 'Tile selection for sprite 12345 was out-of-bounds for image '\path\to\image' due to the new source image being smaller; or
b) takes the new image that is bigger, cuts out a section starting from top-left of the size the original, and updates the original incorrectly.

From memory, if it's the same size, image import works fine.

Only 'Replace From File' works -- but this isn't very good for, you know, replacing 300 animation frames.
Both old and new 'from source' images are PNG; new ones are created at a newer date (duh), in the original source directory. Import settings were transparency pixel top-left, and import alpha layer (which it did fine)
They were generated from Photoshop CS6 (though I originally got them from an animator, on another program and computer, probably not Photoshop but an Adobe Animate or Spine 2.0 export).

So basically: image import does not work on an image of a different size.
#300
But there are 187 open bugs...?
SMF spam blocked by CleanTalk