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

#421
Quote from: Calin Leafshade on Thu 26/08/2010 13:39:06EDIT: actually a better way of suffling the array would be to iterate through it instead of brute force randoming.

Indeed, that was what I was trying to suggest. Also, though I'm not sure if it came across, part of my reason for proposing it was that it wouldn't require you to initialize the array, you could simply proceed the number of pixels you want to dissolve each frame and then pick up from there following game loop.

Quote
Code: ags

while (i < 200){
pixel temp;
temp = pixels[i];
int ran = Random(200);
pixels[i] = pixels[ran];
pixels[ran] = temp;
i ++;
}

Maybe I'm misreading your code, but should the random seed decrease every iteration? Like so:

Code: ags
int ran = i + Random(200-i);
#422
Personally I really don't like using brute-force Randoms (at least not for any activity that runs in rep_exec), it's way too unpredictable.  A different approach could be to use a shuffle algorithm to make the dissolve speed consistent.

Basically, create a dynamic array the size of your sprite (height*width). Then start from the top left corner and use the shuffle algorithm to switch array number of pixel 0 with a random pixel - delete the random pixel as you do so, proceed to next pixel, lather, rinse, repeat, by the end of it all pixels should be dissolved but in a random order.
Since you're running through the pixels in order, you don't even have to fill the array beforehand since the number of the pixel in the current place is either identical to its id in the array or has been switched and thus contains the value of an earlier pixel to delete.
#423
1) Create a dummy character, make player character invisible.
In rep_exec_always
2) Update dummy chars coordinates to be identical to player's in rep-exec 
2) Create DynamicSprite based on (invisible) player character's current Graphic, resized according to player.Scaling.
3) Draw rain on background, in case particles are in front of player sprite, draw to dummy DynamicSprite.
4) Once drawing done, Release DynamicSprite. Set dummy character's ViewFrame to use DynamicSprite as its Graphic.

In case of multiple characters, a GUI for the whole screen would make more sense. This version of the effect does support alpha channels/transparency of raindrops/characters, though (create DynamicSprite without preserving alpha channel, draw raindrops overlaying player both on background and player, copy the alpha channel of the original player sprite to the dummy DynamicSprite).
#424
Quote from: Calin Leafshade on Wed 25/08/2010 20:43:36I dislike solutions like that which rely on some internal AGS feature because it can be unpredictable and often inefficient but if it works then it works i guess.

Hardly inefficient compared to GetPixel, I would like to think (or hope). But I agree with you in general.

Quote from: Def on Wed 25/08/2010 20:12:41I hope you (or someone) can poke me in the right direction.

If the poking in question should involve some sort of stick... let's say a broom handle, you may want to reconsider -  or at least, Calin, have the decency to clean that nasty thing beforehand ;)

(sorry, inter-threadal joke)
#425
I'd actually suggest *first* checking whether the character is in the field of view, but instead of collision detection using algebra (he's between the two lines? Ok, then is the distance to the enemy near enough to be seen?) - and *then* checking for walls with GetPixel as Calin suggests. Possibly you could use AGS' pathfinder to check for walls - if you have an invisible dummy character WalkStraight from the enemy position to the player, with a speed setting that makes the movement instant (speed -1? Not sure, but I did make use of it before). Then check the dummy's actual coordinates after walking. Is he at the player x,y? Then there's no wall.

Edit: I suck at algebra, always have to look up the equations - when I mention "two lines" above I was imagining the FOV as a triangle, but probably it would make more sense to treat it as a wedge of a circle. You already know the NPC's facing angle, so you'd just calculate the angle of the line between the player and the NPC and see if it was between NPC facing angle +/- half of whatever the FOV angle is. 
#426
As you say AGS probably isn't the "best" tool (not that I could tell you what *would* be), on the other hand  there's no limitations in AGS preventing you from implementing the idea you outline. It will take a lot of quite complex scripting however, though the scripting language is pretty well documented compared to a lot of other engines. You don't say if you have any programming experience, but if not expect to spend at least half a year learning the engine before being able to get into development proper.
#427
First of all, make sure that the XTarget and YTarget are actually set by putting a Display("Target: X=%d, Y=%d", XTarget, YTarget) right after your other code in the on_mouse event. Could be a lot of reasons of that not happening, e.g. your walk function claiming the click event.

Also in case you're using scrolling rooms, you need to set:

Code: ags
XTarget = mouse.x + GetViewPortX();
YTarget = mouse.y + GetViewPortY();


Because the mouse cursor uses screen coordinates and the character room coordinates.
#428
If it's pixel art, rotsprite should supposedly have a very good algorithm for it. Doesn't have a preview function, but if you know the angle you can batch convert a bunch of frames at a time.

Edit: This page explains how you can get better rotation results in PhotoShop and other drawing applications by upscaling the sprite before rotating and scaling back to original size. That's also the technique rotsprite uses.
#429
Beautiful stuff, theo. I'm in awe of your sense of style in lighting, color scheme and overall atmosphere. You've really inspired me in terms of technique, and you couldn't have posted the tutorial and sketches at a better time, as I'm in the middle of transitioning from digitally colored pencil drawings to using a tablet for all stages of my backgrounds. Cheers.
#430
Damn, I wanted to participate but lost track of time. Sorry, Calin  :-\. T'was a very good theme though, I suppose the lack of entries could be partly due to Mittens. Would be a shame if that's the case. Personally I wouldn't mind if a similar theme popped up again in the near future. For some reason I find the creative process behind demakes or other re-imaginings of existing concepts incredibly inspiring - you wouldn't believe how many of my best game ideas derive from my frustration over missed opportunities or interesting but poorly implemented mechanics in commercial games.
#431
There's a good list of blend modes that I've been using myself on Wikipedia. This  other page has more algorithms, including overlay.

Edit: Sparky posted while I was looking through my bookmarks, but maybe this is still useful.
#432
Quote from: Calin Leafshade on Mon 23/08/2010 00:32:39Progz what do you mean by native plugin? Does AGS support embedding plugins or something? Sorry i'm confused.

Glad it wasn't just me. I wanted to ask the very same thing but figured, since I'm still a C++ n00b maybe it was a stupid question. ProgZ said "until that's possible" though, so I guess he means AGS currently does not have the required features for what he had in mind - whether it's plugin embedding or something else.
#433
Aw shit, now I have to go buy that Xbox 360 Controller that I've been trying to avoid ;). Excellent work! It's crazy to see all the useful plugins being released these weeks - a lot of them doing exactly the things that I wanted to add to my own plugin - wonderful to have all those new options.
#434
Yeah, I also found a transparent GUI to be the fastest and most flexible solution. Just to check - you *are* simply using black GUI background color, not a black full-screen sprite as background graphic, right? I've never had speed problems myself with this approach, but then I've never tried it on a higher resolution than 640x480.
#435
Adventure Related Talk & Chat / Re: AGS Steam
Fri 20/08/2010 19:29:35
Quote from: Khris on Fri 20/08/2010 14:24:47I've used TotalCommander for about the same time; it allows you to browse an archive as if it were a folder. Thus I simply copy the folder to the other side and am done. If I see all the files instead, add tab, F7, enter folder name, return, return, tab, Ctrl-A in front of that. So if everybody created a folder, all you'd have to do is change one option ;D

Sounds very cumbersome. As a fellow Total Commander user, please let me introduce you to Alt+F9 (which coincidentally also has a "Unpack each archive to a separate subdir (name of the archive)" option) ;).
#436
Adventure Related Talk & Chat / Re: AGS Steam
Fri 20/08/2010 10:44:37
Quote from: Khris on Fri 20/08/2010 10:05:00It is so much cooler if a published game comes as zipped folder, as opposed to all files being directly in the archive. The latter irks me every time, almost as much as screenshots with window borders. There, I said it (again). :)

I guess this depends a lot on which archive application you use (and how you use it). Personally I've used WinRAR for at least a decade, always with the default setting of creating a new folder, same name as the archive, wherever you extract it - unless you bother to change the path. So often I'm annoyed with those archives that extract another folder into the newly created one.
Not to mention that developers tend to use folder names that are hard to identify, like abbreviations or worse, just zipping the "compiled" folder, or typographical weirdness like underscores instead of spaces or not capitalizing words, making my games folder look like shit until I rename them (OCD, what's that?)  :)

Edit: But yeah, I'm all for a consistent submission format, and since long filenames can't be relied on for online distribution, I'll refrain from bitching about folders-within-folders as long as those zipped folders carry the full, properly spelled, capitalized and punctuated (to the degree that FAT32 naming restrictions allow) titles of the game.
#437
Code: ags
bool hasitem(this ListBox*, String list_item) {
  int count;
  while (count < this.ItemCount) {
    if (this.Items[count] == list_item) return true;
    count++;
    }
  }


Not tested, but that's the basic principle at least.

Edit: Curse you Gilbet! ;) I might as well post this anyway.
#438
I really don't see any problem with the sprite scaling - unless you activate the "smooth scaled characters" option which makes them look horribly blurred to a degree I never noticed in any other AGS title. Perhaps I'm missing the finer points of pixelart, but to me the character scaling is perfectly good as-is and doesn't detract one bit from the overall beauty of the artwork. Then again, I was never an "all the doors have to be the same size to avoid scaling" nazi (nor were the guys at LucasArts back in their day, btw).

Not that I wouldn't love a hi-res version, though ;)
#439
Adventure Related Talk & Chat / Re: AGS Steam
Thu 19/08/2010 07:57:40
At least for newly released games, which would most likely be the ones eating up the most bandwidth, it should spread the server load quite a bit if even just a fraction of those who download keep sharing the file for a couple of days. Of course most non-AGS'ers would get the game from other sources rather than download a special client program just for a single game. I don't know if it would be worth looking into using magnet links that could also be opened in standard P2P, but perhaps some developers would be opposed to the loss of version control and download count inherent in that approach.
#440
Beautiful work. I haven't played much, but even going in with high expectations from those gorgeous and super stylish screenshots, seeing the game in motion absolutely blows my mind. The animated light changes are among the most gorgeous effects I've ever seen in a 2D game. Also, I love your use of close-ups, both for cutscenes and puzzle solving - the hands-on approach to the first puzzle is right up my alley (one of my own key design principles in fact), so hoping to see more of that further into the game.

I'd actually disagree with ProgZ about the nostalgia factor - not that it's absent or anything (I did get a strong MI2 vibe from the interior of the house at the docks), but the reason I find the game so appealing is precisely because it's not trying to emulate the "classics". Feels very refreshing, also in terms of music and style of humor, a not particularly retro despite the lo-res. Really looking forward to playing some more. Nice touch with the PDF manual, btw.
SMF spam blocked by CleanTalk