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

Topics - Ryan Timothy B

#21
I am pausing the game using  PauseGame()  or by using a GUI that pauses the game while shown, but speech still skips with the mouse.

How do I avoid this?  I mainly wanted the game to pause with the space bar so that when the players are reading text from characters, they can read it at their own speed.  Or pause it whenever they need to.  But I definitely don't want the speech to skip and also the Dialog showing up if the speech is skipped.

To me this should be considered a glitch, unless there is some kind of game variable that I'm overlooking.
#22
This isn't a big issue but it should work since it's a static int.

I was trying to create an array using Game.InventoryItemCount as the size but it says "Array size must be constant value".  But it is defined at build and never changed.

Edit: Changed thread title
#23
I'm not sure if it's an issue strictly with my game, or with AGS altogether.  I'm using AGS Build 3.2.0.102.

I set the character tint, and honestly I don't understand character.tint whatsoever.  I don't know the limits, I don't understand how it works, etc.  So basically I was playing around with it.

Anyway I did this:  
Code: ags
cMikael.Tint(0, 0, 0, 1, 250);

I wasn't sure what the limits were and just assumed the editor would give me a friendly message or something.

And got this error:
Code: ags

Error: An error occurred while parsing EntityName. Line 2, position 97.
Version: AGS 3.2.0.102

System.Xml.XmlException: An error occurred while parsing EntityName. Line 2, position 97.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.Throw(String res)
   at System.Xml.XmlTextReaderImpl.ParseEntityName()
   at System.Xml.XmlTextReaderImpl.ParseEntityReference()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.LoadXml(String xml)
   at AGS.Editor.NamedPipesEngineCommunication.MessageSenderThread()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()


And then AGS crashes.  It also throws me the do not save your game, you've encountered a serious bug, or whatever it says exactly.
When I comment out the character.Tint, it works without issue.
#24
I created my own module script and in the header I declared a variable.  I can access this variable via any script, but I've noticed today that I can't actually alter the variable.  Is there some kind of import/export routine required here?
#25
Advanced Technical Forum / Phantom script?
Fri 21/05/2010 18:35:01
Alright, I was thinking that I was going insane.  I've tried it several times and can't figure it out.
Lately I've been working on this game, and whenever I'm at a certain point with programming, I zip the game and send it to the other team member to add dialogs and responses.

Well today, for some reason, I unzipped the game and added some new lines to the script.  Then I noticed nothing was changing.  I would literally comment out sections of the intro scene to figure out what was going on, and it would still play as if it wasn't commented out.  So then I started changing the player's X Y coords and adding random player.Say throughout the script, nothing would change.

It's as if it's running the script files from one of the previous builds or something?  Or through the AGS backup file.  I even changed the directory names for the older builds, just in case.  Has anyone ever encountered this before?

It only seems to be a problem in the ONE room (number 1), the rest seem to compile properly and not use some phantom script.


Edit: I figured out how to reproduce it.  I unzip the game the team member sent me.  Which is actually missing the folders (not sure why he didn't include them, perhaps he had issues on his end):
AudioCache
Compiled
Music
Sound
Speech

At this point I can freely change anything in the room script and have it update.  But as soon as I go to build the game files, the issues starts.

I'll just use the previous build to prevent any issues.
#26
I'm quite new to PHP and I don't know much about Java.  I'm asking here because you guys are all pretty talented in different areas.  I'm getting frustrated from searching Google and cannot seem to find what I'm looking for.

Does anyone know how to check for a duplicate file name before uploading it to the server with an html upload form?  At the moment I have the original file name stored in a MySQL database and I want to check against that  before it has to be uploaded.  My guess would be to use Java.

It's for my buddies site that I made for him recently: http://www.colourfulphotos.com
I had to completely learn PHP and MySQL just to make this for him.

Sometimes he uploads about 20-30 photos at a time and once in a while he accidentally uploads a file twice and doesn't know it.  Since it's a photography website, duplicate files should never exist on it.  He wants me to add a warning that tells him before he actually has to wait 30 seconds or so per file to upload.  Is this possible?

Thanks!

Edit: I forgot to mention that the images are being uploaded by an html upload form.
Can Java even check against a MySQL table?
#27
General Discussion / Lenz Flarez!!!11!
Sun 17/01/2010 11:22:07
Alright.  Yesterday I came across Ali's smooth scrolling module and I saw two great words "lens flares".  But his wasn't very impressive at all, so I decided to write up my own lens flares module in less than half a day.  All the lens flares graphics were created by me with the use of gradients and lots of tweaking.

Have a look at the picture:


You can also download the compiled demo here (without source):
www.bryvis.com/entertainment/other/lensflares/lens_flares_brighter.zip (New, brighter effect when you stare at the sun with the camera)
http://www.bryvis.com/entertainment/other/lensflares/lens_flares.zip (Old file)

(Use the arrow keys to move the viewport and watch the lens flares move around and fade in/out depending how far it is from the camera)

Graphics are 800x600, and I used 9 objects to make the lens flares, 1 object for the sun, 1 object for the Earth, and 1 object for the Earth's edge shine. (12 objects in total)


Would anyone find something like this useful?

The Sun (or light source) doesn't have to be static, it can move.  So this could be headlights on a moving car, or a flashlight aiming at the 'camera', or one of those shiny spacecrafts, m0ds catches glimpses of flying through the sky at night ;D, etc.

I have plans on making it so if the light source is covered by rudimentary shapes like circles, rectangles, or triangles, that the lens flares will start to dim until they are not seen anymore.


Let me know what you guys think.  Is it realistic looking?  Or do you have any ideas or suggestions that you'd find useful?
I figured GenGen was the best place for this since the module isn't complete and ready for general use yet, I'm just looking for feedback. :P
#28
This is definitely a beginners question, but I don't believe there is an answer to it.

Can you change the underscore that AGS places for where the input area is on a Text box?  I haven't seen it under TextBox in the manual, so I imagine it's not possible.

Here's an image example:


It's a mock up GUI to look like a Windows window and that massive underscore near the end is what AGS places in there.  It totally doesn't fit the text style. :P  Windows does the vertical line, which I'd prefer to have, but even an underscore to match this custom made small text would be acceptable.

If not... oh well, I'll survive..  :-\
#29
I have a little question for you guys.  I've got a grid dimension of 128x128 (using a struct), which would look like this  tilesX[0..127].Y[0..127] which hold the tile sprite number.

It's actually a level editor very similar to Starcraft's editor.  If I were to make an Undo feature, how would you guys do it?



I'd probably do something like this while the mouse is held down, and run this when a tile is changed:
Code: ags

function add_to_undo_array(int old_tile, int x, int y) {
  old_tileX[x].Y[y]=old_tile;  //having the same size as the map  old_tileX[0..127].Y[0..127]
  changed_amount++;
}


Then when the mouse is released:

Code: ags

int undo1[];
int undo1x[];
int undo1y[];

function create_array() {
  undo1 = new int[changed_amount];
  undo1x = new int[changed_amount];
  undo1y = new int[changed_amount];
  int ix;
  while (ix<gamex) {
    int iy;
    while (iy<gamey) {
      if (old_tileX[ix].Y[iy]!=null) {
        undo1[amount]=old_tileX[ix].Y[iy];
        undo1x[amount]=ix;
        undo1y[amount]=iy;
        amount++;
        old_tileX[ix].Y[iy]=null;
      }
      iy++;
    }
    ix++;
  }
}


Then when undo is pressed you take them from the newly created array.  You could also have multiple arrays for 5 or so undo levels.

btw: above code isn't tested or anything, I wrote it just as an example to show what I believe would be the best method in AGS.  So the question is..... Is this the best way?  Or would there be other ways?
#30
Alright.  Since I drew those 2 images for the new AGS website layout, I got inspired to make my own site inspired by my old layout idea for ags.

Here's what I've got:

click the image

It's really supposed to be a simple website, with little to no content with only my games really.  Which I only have one game released at the moment, so even that isn't much content.  The site is mostly for hosting my files, but I decided I may as well update the appearance of the site anyway.


Do the colors look appealing to you?  Are they too dull?
Should the orange be brighter?  I can't seem to find a good orange color that doesn't seem to fade with the gray.  Bright orange fades with the light gray, so I had to go with this darker orange.

I tossed the mouse cursor in there, only so you'd know that it's supposed to be highlighted because the mouse over.  Since I haven't made the site yet. :P

The 3 images in the news section have a different meaning--so they're just randomly placed in there:
Letter = regular news
Wrench (spanner) = updates
CD = news or releases for my games

Any suggestions or anything, let me know.  I'll probably start working on it a little after Christmas.
#31
Since I bought my new laptop, after running my game through the editor for about 30 seconds, my graphics fail.  I get a black screen for about 5 +/- seconds, then everything is back to normal and this message pops up:


Has anyone else been getting this?


The only time it happens (that I've witnessed) is when I'm running an AGS game through the editor. 
If I compile the game I don't notice it happen, nor has it happened with other AGS games.

I've searched a few forums and they are guessing it's an Nvidia glitch with Windows 7 and Vista that they haven't corrected yet with their drivers.  Pain in the arse.

Also, when I make a 16-color game and play it in a window, Windows 7 reverts to the basic graphics style (no transparency, or shadows, etc).  So now I will only make games in 32 color for that reason alone.

I realize this technically isn't really an AGS issue, but I find it odd that the drivers fail every time I test my game through the editor, but not when I compile it.  So I'm posting this on these forums for that reason alone.

My AGS graphics are 1024x768 and 32 bit (also happens with 800x600).  Running with DirectDraw because I find that Direct3d is too slow with all the rawdrawing I'm doing.
And just for shits and giggles, my graphics card is an Nvidia GeForce GT 230M (with the latest drivers).
#32
General Discussion / Math Question!
Sat 08/08/2009 18:22:23
I could have placed this in technical, but it's more or less simply JUST math.  So here it is! :P

Alright.  I know 'how' I could do this, but I am not a CPU friendly kind of guy sometimes when it comes to math.  So this is why I'm asking YOU!  ;D

I want to know how to calculate the rooftop placement for my next Road Racer game.  I know the base of the buildings vertices and the center of perspective point (obviously).  I just need to know how to find where the roof should go depending on the size of the rooftop.

Here's the image first before I get into the technical part of it:



The dark areas are the base of the building.  The colored parts are obviously the rooftops. :P  And the Red dot as the center of perspective.

What I'm going to tell you next won't be exact yet, I'll have to play with it, but I need the formula first.  If the building is 1 story the rooftop will be resized to 110% of the base.  If the building is 2 stories, the rooftop will be resized to 120% of the base, etc.

The only way I can think of doing this would be using y=mx+b and then check between the two lines of perspective if the distance is now 110% of the base, for example.  But if I decide to have rotated buildings down the road, I wouldn't know how to go about doing this anymore.

So if anyone knows the math how to make a rectangle and a larger rectangle line up with a perspective point, that would be excellent!  Thanks!
#33
Ok.  I've searched the forums a bit and came across a post that I believe answers all my questions.  And from what I believe it also tells me that I can't do what I want.

This thread: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=34537.0

The story:
Anyway, I'm pretty much going to have to explain what I'm attempting to do here.
I'm trying to make the next Road Racer game with night time and day time (depending on the time of the day).  I had decided to use a dark blue color as the 'night' color.  Then I can set the GUI transparency according to the time of the day.  If it's midnight the GUI.transparency is 20, etc.
All worked fine.... until I decided to slap headlights into the scene.  The cars need to see somehow.

The problem:
As you can see in this image below, the alpha channels go all wonky unless they are on a blank portion of the gui background.
The headlights are buttons.


I slapped a few headlights in there to show you what my problem is.
EDIT: Oh and ignore the crazy blue squares.  The only color I'd have would be like perhaps 80% opacity of the blue covering the whole screen, so I could keep the alpha channel images in the buttons.

From the post linked above, the problem is that the Blue has a darker opaque than the white.  It's 100% opacity versus 20%ish.

Possible solution that I know of but I Can't use:
Now you could say that I can make another GUI (one for the darkness and one for the headlights).  But it won't work the way it should.  The darkness GUI will be darkening the image, and the headlight alpha channel will be trying to lighten an already darkened image, therefor visibility with a headlight will be even worse than without one.

Here's an image to show you what one would look like over the other. The left one is a mock up of how it SHOULD look, since I can't get it to show properly, and the right one is an actual GUI overlay on top of the Darkness GUI.

The left one is what it would look like if the headlight was on the same GUI as the Darkness.
The right one is what it would look like with an extra GUI on top of the Darkness GUI with a 20 transparency. -Much harder to see what is under it.


So here are my main questions:
Anyone got any Ideas?
Am I doing something wrong?
Or is it possible for CJ to easily make AGS allow this if it turns out I actually can't do it.

What I REALLY would love instead of a whitened headlight alpha channel over a blue GUI
If I could destroy the blue of the Darken GUI where the center of the light is.  Like this:

See how much easier it is to see? I would love this.

Which is simply just this with alpha channel in the middle (shown with an edited transparency mask behind it since you wouldn't be able to see it had alpha channel without):

But even if I could somehow do this, overlapping of the two wouldn't give desirable results with the blue and all.

Ok enough rambling.  Someone must know what I can do.  AGS is powerful and amazing, I'm just not using it right...  Yes.  That is the only reason. :P

EDIT: Without this, my game loses an eye catching feature I had hoped to have.  I really don't want to place another GUI over the darken GUI just to give the 'impression' there are headlights.  It would make visibility worse especially when the headlights are covering something.
#34
If I were to rotate a sprite, is it not possible to place that rotated sprite as the 'character' image?

Similar to how you can change the graphic of an object:
object[0].Graphic = sprite.Graphic;

I'm probably overlooking it in the search and the help index.

The reason I ask, is it's easier to add 20 characters to one room, than it is to add 20 objects to multiple rooms.
#35
I've been playing quite a few physics games lately and have been really keen and curious to see if I could attempt to program my own basic physics game.  Whether it's for AGS or another programming language is unknown at this moment.  But here is a little demonstration of what I'd like to attempt:



Collision detection, and angle of collision is something I believe I could do, it's just the whole weight+velocity+gravity+rotation.  I imagine you'd need to find the center of gravity for the object and apply that to the collision, and using the velocity of the object, you determine what angle and where the object will now go.


Does anyone know of any good websites or tutorials that will help explain to me how to apply physics to two connected weights.  I've done some google searching, but with my limited knowledge on what 'equations' this would be called, I figured It'd be better if I just asked.


Remember: The weights are connected by a solid rod (which wouldn't be affected by collision and wouldn't stretch or shrink.  At least not on my first attempt).  Also no air resistance, just to make things easier.

Thanks.
#36
My brother finally played my Road Racer game, and he immediately told me that he broke my game.

I've tested it out with the debugger on his computer and using his Bluetooth keyboard. 
If individually pressed Iskeypressed comes up for Space (32), Left (375), Right (377) and finally Up (372).

Now for some odd reason while holding UP + RIGHT and then I press SPACE, 32 doesn't come up on the debugger.
If I press UP + SPACE then I press RIGHT, 377 doesn't come up on the debugger.

It only seems to have a problem with UP+RIGHT+SPACE, in any combination.  Which ever key is pressed last in the combination is the one left out.  LEFT or DOWN key don't seem to have any problems at all.

So in other words, no parking brake while pressing Up and Right at the same time.  Or no Right while pressing Up and Space at the same time.

For my controlling actions I am running Iskeypressed in the Globalscript in the Repeatedly Execute, for each control.  I assign it to a boolean (each direction has their own boolean).  Perhaps this is an issue, I don't know.

I don't even know if it's the keyboard alone that is causing these problems.  Perhaps Bluetooth has a problem with multiple keys at once, or it's simply something internally wrong with AGS.  I do not know.

If anyone has experienced these problems, know what I'm talking about, or know how to help me.  It would be greatly appreciated! :)

Or if there is anyway I could test to see what this problem is, let me know.

Oh, and I'm using Version 3.1
#37


Is proud to present:

ROAD RACERv1.3

Download this incredibly fun, finger mashing, arcade racing game.
It's a top down racing game similar to GTA1.  Race against the clock to complete each level (7 levels in total--with large scrolling backgrounds).
The car can rotate 360 degrees and is equipped with a parking brake. Yay!

Click to view entire 7 level course




Three game play options offering a different game play for each.

A - Race against the clock to complete the levels.

B - Race against the clock to complete the levels.  Car cannot take too much damage (ie: driving off-road or colliding with something).

C - Race against the clock to complete the levels.  Car cannot take too much damage (ie: driving off-road or colliding with something).  And to make things harder -- objects that are scattered along the roads.  Hitting them will stop your car dead.

You can also choose your difficulty setting Easy, Medium and Hard which changes the maximum time and maximum damage count.




It's the first game completed by Ryan Timothy, as you can probably imagine, I'm pretty excited about that.


(WARNING: Some keyboards have a weird glitch using a combination of the Arrow keys and the Space bar.  I am working on having two inputs for the handbrake for now, and perhaps later down the road the choice to select which keys you'd like to use instead.)

Download Here - 21MB

Visit Games Page


Screenshot:





Game was updated on Dec 31, 2008 to include 2 new levels and extra features

  • Car now explodes when the time runs out, or if the bomb is damaged.
  • Car bounces backwards or forwards when it collides into an object.
  • An option to increase steering sharpness slightly.
  • Better customizable difficulties menu to allow everyone of all skills to enjoy.
#38
Is it possible to edit Hotspots or Walk-Behinds in-game?

I need to make destructible terrain similar to the Worms2 game.  Where the shotgun in that game can destroy circular sections of the side scrolling background and allow the character (worm) to walk on what was once the mountain.

I'm planning on making a Worms2 type game, and without this I don't really want to attempt it.



Now IF the Hotspots can't be manipulated with the drawing surface feature, I've been thinking about creating an array that stores the x and y coords and radius of where the weapon had hit the surface.  Then I would have the global script check to see if the character is within any of the slightly larger 'square' sections of the circles radius (with a square you wouldn't have to do the radius calculations each and every time even if the character is no where near a damaged section of the map).  Once they are, the character would interact with the new damaged section of the background.
Now this I believe I could do, I'm just hoping someone knows of an easier way that just allows you to edit the hotspots while in-game.
#39
AGS Games in Production / Freezer Burn
Sat 13/09/2008 23:31:21
WHY I MADE THE GAME:
I made approximately 90% of this game for the MAGS Mini-game competition for the month of August.  The only things I didn't complete were character sprites and dialog.  I was originally going to make characters like you see in Ben There, Dan That!, but decided since the competition is over I have lots of time to work on decent characters.  Something to help boost my experience.

ABOUT THE GAME:
You're a young talented poker player who just had a lucky streak at an unlucky time.  After taking everyone's winnings the owner of the arcade and restaurant turns out to be someone you don't want to mess with; a mafia leader.  The arcade and restaurant is just a cover so they can collect blood and drug money without any feds finding anything while checking into their tax reports.

The angry thug owner locks you into the restaurant freezer and now you must escape before he wins all his money back.  Or you'll turn into a giant popcycle. 

There's nothing like playing carnival and arcade games to Macgyver useless items to aid in your escape.

SCREENSHOTS:

Hefty guards preventing you from escaping.


Destroy tanks to achieve high score and some redeemable arcade tickets.


I hope you don't have a shaky hand.


EXPECTED COMPLETION DATE:
I was hoping for this game to be complete either October or November (2008 of course), but don't cross your fingers!

#40
I'm making an arcade game.
I have made several characters to act as the Tanks.
This interaction editor is proving annoying and I want to bypass it completely within the Room script itself.

When I click on the tanks they are supposed to explode (I've already programmed this successfully.. but with the interaction editor it Really gets annoying with the whole exporting and importing of variables etc).

I'm getting tired of hunting through the manual and the forums.  I'm obviously not searching properly due to not knowing what the code would be called.
SMF spam blocked by CleanTalk