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 - Ryan Timothy B

#1521
Critics' Lounge / Re: Website C&C!
Wed 04/08/2010 22:39:32
First: in firefox the website is larger vertically than what my window actually is.
Second: The scroll wheel doesn't work with the main scroll bar. And it doesn't work correctly with the iFrame window thing. When I scroll down, it immediately scrolls back up.

I personally don't see an advantage for using these iFrames. They're kinda annoying, and at the moment, very glitchy.

The site doesn't look too bad.  I'd have to say there's too much gray and little difference between the two sections.
#1522
Excellent work. I've never once thought of using solid triangles to draw a face before. Excellent idea.
Looks pretty smooth too.
#1523
Quote from: Dualnames on Tue 27/07/2010 17:45:56
YAY!! CaptainD!!! And Nikolas and Thomas!! Does that get better? ;)
Well.... there's me! lol I'm sure I amount to some cool points.

;D

It's good to hear the compliments this game is receiving.  I've been doing my very best to add little programming touches to this game to match the quality of the artwork; to give it that professional feel.
Little touches that the average player wouldn't even notice. :P Those are also the fun ones.
#1524
The reason why your sprites are being drawn at the incorrect width and height is because you're telling it to.

Take a look at the DrawImage you're using:
Code: ags
surface.DrawImage(x1, y1, n1, 0, h1, w1);

Note how h1 and w1 are reversed. Should be Width before Height.

But! If you're drawing the images at the same sprite and don't require resizing, like in your instance, all you need is this:
Code: ags
surface.DrawImage(x1, y1, n1);
#1525
Alright. Perhaps the GUI alpha issues isn't a new issue. I tried it both with 3.2 and then the most recent release. Not sure why I remember it working properly in the first place when clearly it doesn't and didn't. Obviously using AdditiveOppacity.

This is what it looks like with an alpha channel background image on the GUI, and two overlapping alpha channel buttons:


The GUI background image: http://www.bryvis.com/entertainment/other/agsf/transparent_piece.png
And the image for the 2 buttons: http://www.bryvis.com/entertainment/other/agsf/transparent_piece_shad.png

Edit: The only solution is to literally make those buttons their own GUI. And that can suck.
#1526
Alright. I would definitely draw it to the background then.

Check out DrawingSurface.DrawImage in the manual.  It even shows you how to draw to the background.

You'll also need to use:  Game.SpriteWidth[int slot]  and  Game.SpriteHeight[int slot]  to find out if it'll be off the edge, or overlapping with another.  Obviously using a struct array to store where each number is and what sprite they're using.
#1527
Well, one problem is that you can only have 40 objects per room.
Another problem is that there is a limit on how many Characters you can have visible per room. And I'm pretty sure that limit is 50.

Are you able to interact with these random letters? Do they animate? Do they shift transparency? We need to know these things if you're asking us which route we think you should take.  If not, then perhaps you could simply just draw them to the background.
The non overlapping and random positioning is an easy task.
#1528
Hey, this is a PHP question.  Let's say for this example, I have a string which is: dude, you're not getting a dell 111506 testing

How could I run through that string so I could check for when numbers start and finish and add a word before and after it? With this example, just pretend I'm adding [number_start] and [number_end]. The value of the numbers is always changing, and there could also be many instances of numbers within the string.

So the modified output would be: dude, you're not getting a dell  [number_start]111506[number_end] testing

Thanks!
#1529
Hey Calin.

I figure this is probably the best place to post this since it is a Utility Module. I just discovered an easier way to find out if a number is odd or even. My old method was simply just: if (Number % 2).

But I imagine this works much faster:
Code: ags

bool odd(int Number)
{
  return (Number & 1);
}


Apparently it just checks the last bit. No idea what it's doing exactly, but I tested it in AGS and it does work. :P
#1530
I believe I was..
Anyway, I've already written it. Didn't take too long and it's not spaghetti code at all. Very easy to do really.

I was mainly just curious how the others were written.  I may even check out yours later, but for now mine works and I'm happy with it. (plus it keeps Zyndikate off my back... har har. :P joking)
#1531
Oh wow, that's a big scrambled mess of spaghetti. I'll definitely stick with the way I planned on doing it.
Thanks.
#1532
Wasn't there a Module that turned blocking events into non blocking events? Such as when the player is automatically walking up to a character/exit/etc once you click on it, and then the dialog or interaction starts. But you could easily just walk away without it being a blocking event?

I have an idea of exactly how I'd do it, but I'm curious how the person who wrote the module did it, JUST in case my idea isn't as clever.

I swear there was one, but I quickly browsed through the whole Module sub-forum and didn't see a title that suggested it.
Thanks!
#1533
Either that, or a double thick white outline on the cursor when you're over something. :P
#1534
Quote from: wonkyth on Thu 29/07/2010 01:51:59
I'm hoping I'll get some time to blow Jim [..]
Oh dear....  ::)

Haha. I couldn't resist.
Anyway, I played this game once before and really couldn't get into the mood. Perhaps I'll download it again since you've added all these new toys.
#1535
You should've posted this in your other thread since it's referring to the same code in that thread.

If this one room is the ONLY time you'll need this function, then just leave it in the room script by doing this.

If it will be accessed by multiple rooms, you can add it to the global script by doing this:

Globalscript Header
Code: ags

import function crate_push(Object*crate);


Globalscript
Code: ags

function crate_push(Object*crate) {
  if (crate.X > 100) {
    ...
  }
  else ...
    ...
}


Room script:
Code: ags

function oBlock0_AnyClick() {
  crate_push(oBlock0);
}

function oBlock1_AnyClick() {
  crate_push(oBlock1);
}
//etc



Edit:
Unfortunately in the Room editor you can't run anything in the function call like myFunction(oBlock0). It will crash. You literally have to make the room function for each object, or just have the same function for each and check which one the mouse is on. But I'd prefer the first method because you know it'll work correctly each time.
#1536
Vince, it's been quite some time since I have played Nanobots, but I can't for the life of me think of where you'd need more than 15 walkable areas in that one main room.

Unless each tile had their own walkable area so that you could just turn it off once that muscle robot pushed an object into that square.  But couldn't you have just used Object.BlockingHeight to amount for the tile height?

Edit: Ahh, just discovered that the blocking height divides amongst the baseline (20 would be 10 above and 10 below).  So then I was about to suggest changing the Object.Z to make it offset for that, but then discovered that object's don't support Z.  So the only other solution would be to use character for those gumball machines and such, instead of objects.

Or just use walkable areas, which then end up being a pain in the arse as you've mentioned above.
#1537
Technically you're not drawing on a GUI, you're drawing on a DynamicSprite which then is used by the GUI button. :P

QuoteI've created a dynamic sprite from part of the background
So you're creating a dynamicsprite from the room background by using: DynamicSprite.CreateFromBackground?

Then applying an image to that with drawImage? Is that correct?  If that so, there shouldn't be any pink in that DynamicSprite at all.  Even when you draw a transparent image to it.

Could you elaborate?
#1538
Quote from: Crazy on Sat 24/07/2010 00:16:25
I would like to propose a motion for permanantly banning loominous and progZ from the Competitions and Activities subforum.

Hmm, now that you mention it, I don't remember seeing Progz posting anything for any of the competitions for a while now. He must be busy.
#1539
Khris, as I look at it, his post wasn't bewildering and lacking information at all.  Your post was funny, nonetheless. :)

I've had this glitch happen before.  You'll need to go to Build --> Rebuild All Files.  For some reason it doesn't compile correctly and uses the older game files.
#1540
General Discussion / Re: @AGS
Mon 19/07/2010 20:49:01
I've said time and time again.  If drawing surfaces fully supported alpha channels, I'd feel AGS is complete.  It's the only thing that really holds me back from making some really cool effects and such.
SMF spam blocked by CleanTalk