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

#2401
Thought I'd ask this in the same thread:

Is there a way to retrieve the ID number of a character on click? There is a function that apparently retrieves the NAME of the character:
Code: ags

static Character* Character.GetAtScreenXY(int x, int y)


Is it possible to do something similiar with character ID?
#2402
Ha! Khris had not changed the default font either!  ;)
#2403
I second Snarky's idea. You could just try REALLY hard, and take a minute or two to read your own posts before actually posting them. Try fixing typo's as well as you can and READ ALOUD the posts as you write. If you cannot do this, then please see a doctor about that. Even I had to go to speech therapy at one point in my life to get me around a slight form of dyslexy (although that was more of an issue with my native language).

On another nore: I just cannot understand why Studio3 sees it nessecary to post every single slight advancement to his projects across the forum. Separate video clips of different battles where the same two characters do the same attack on different enemies with no variation at all. These videos do not show anything in your game that would make people want to play the game. What they show is that you have a base which you CAN build on. Keep working and post in your in-dev thread when you make some actual concrete progress.

If you want to have a dev blog which people can follow, just do that and post a link on the forums, once. Then all who are interested can spread the word and keep an eye on your project(s).

I doubt I am the only one who feels that these threads and posts need to stop at some point. Why did these two links need to be a separate post in the critics lounge? Why did you not just post them in the "In-developement" thread.
#2404
AGS Games in Production / Re: Metal Dead
Thu 24/03/2011 09:43:05
Looks fun, love the font! Hope to see this when it is finished, this looks like it could be very entertaining.
#2405
Personal opinion: Maniac Mansion was a good game, but I think we already have enough re-makes, de-makes and fan-makes to last several lifetimes. I can see this project has potential but a lot of it seems wasted on makin remakes when it could be directed at creating original games.

Sorry for being so negative...
#2406
My eyes! The grammar! The grammar seeps through the cracks and into oblivion!  :'(

Unless you can find someone to actually proof-read your game before even thinking of releasing material OR (god forbid) the game itself, I will be giving this a wide berth... The dialogue simply hurts my eyes. Best way to improve dialogue is to:
A: read it aloud and THEN writing it down. If the structure of the sentence feels unnatural when spoken, it should be corrected
B: Proof read. Failures in capitalozation, grammar and punctuation make the dialogue very painful to read

Also the battle system seems quite awful. I don't think using mouse to control a final-fantasy ripoff is a good way to go at all.
#2407
Let's say that I forgot / got confused / was just being silly and leave it at that.  ;D

My games so far have been quite simple anyway. Just a few characters, objects, animations and regions. No structs or arrays or homemade functions used in either of the two finished games so far, and now that I'm trying to expand my horizons, I seem to get confused by the things that are new to me.

You'd laugh (and probably faint in terror) if you saw the code I used in my first draft of the Infection 2 map generation script. Stuff like that is the reason I rebooted the project and decided to have another project in between to practice arrays and structs first.
#2408
I feel a wee bit silly now...  :P Khris, as always, is right.
I moved the declaration outside of the game start function and it no longer complains.

Well, at least now I learned something new about AGS functions.
#2409
I doubt it would work, as there is a chance the player backtracks and the enemies that lost their ammunition would then regain that ammunition, as well as probably coming back to life as the arrays is recreated on room load.
#2410
Tested, the cap is around 55 and likely has to do with the number of variables being set in each struct. I am thinking of doing like you suggested, splitting the declaration into:
Code: ags

NPChar NPCRoom1[50]
NPChar NPCRoom2[50]
NPChar NPCRoom3[50]
NPChar NPCRoom4[50]
NPChar NPCRoom5[50]
NPChar NPCRoom6[50]
NPChar NPCRoom7[50]
NPChar NPCRoom8[50]
NPChar NPCRoom9[50]
NPChar NPCRoom10[50]
NPChar NPCRoom11[50]
NPChar NPCRoom12[50]


Now I will have a set of 50 NPC's for each room of the game. This, though, requires me to add a lot of checks to the other scripts. For instance, in a script that causes damage to an enemy, I will have to check player room and then draw the stats for the NPC in question from the correct NPCRoom## array.
#2411
I have a struct that contains a bunch of stats for NPC characters in my game. I need to be able to track a bunch of stats (like health, ammunition etc) for each and every NPC and there can be several hundreds of these generic NPC's.

However, as I try to declare

Code: ags

function game_start() 
{
  NPChar NPC[500];
}


BOOM! I get an error:

An internal error has occurred. Please note down the following information.
If the problem persists, post the details on the AGS Technical Forum.
(ACI version 3.12.1074)

Error: Error running function 'game_start':
Error: stack overflow, attempted grow to 14404 bytes


As far as I can understand, there is some kind of limit to how many variables can be declared in a single function (search revealed a similiar issue from 2004). Any ideas as to how I can work around this? I was going to have a while loop run after this to fill in all the variables contained in this struct using some basic values as well as some random values.
#2412
@ Ascovel
Spoiler
After initial radio contact the time to the diver appearing takes a set amount of time. As would be realistic, calling for help should be your top priority when trapped.
[close]

EDIT: just realized that I've gotten quite a few sets of feedback after posting this. Thanks people! Really appreciate it!
#2413
[bump]
Just wanted to bump this once (won't do it again).

C'mon people! Please give feedback by clicking this link:
http://www.adventuregamestudio.co.uk/games.php?action=newvote&game=1404&category=179&actionwas=detail

I'd really like to have at least enough votes to get an average score so I can estimate how people liked or disliked the game. Please also leave written comments stating what parts you liked or didn't like!

Thank you to all in advance!
[/bump]
#2415
The game works as turn-based only during combat. If there are no enemies around, the game works as follows: player can move freely just as youy can move now. AI characters make a single move every "tick", which is run as a non-blocking action every 5 or 6 seconds. During these ticks the NPC's check line of sight and certain stats to see if they have spotted the player. If they spot the player or the player activates the aiming cursor, the game moves into a pure turn-based mode and stays there until the player attempts to "end combat", at which point the game ensures that there are no active hostiles with line of sight to the player.
#2416
Holy crap, it seems to work!   ;D

You people have once again saved my day and future games! Now that I have a working example I can study it and see if I can refine it further.

Thank you!
#2417
Whoops, remnants of previous attemps I had failed to clean up.
However, even with these corrections the issue remains: if the target coordinates are, lets say 60 pixels to the right and 15 pixels down from the starting point, the bullet travels directly to the right for about 35-40 pixels and only then begins to curve towards its final target.
#2418
Ooookay... So far I've just made the variables go haywire.  :o

Code: ags

      // First we move the bullet graphic to the player's location and reset variables
      String hupu = "x";
      int tupu = 0;
     
      cBullet.ChangeRoom(player.Room, player.x, player.y-7);
      
      // VERSION 1 - PYTHAGORAS

      // WHILE tupu is less than 500 ie. for a long enough time
      while (tupu < 500) {
        
        // VX and VY
        float vx = IntToFloat(GetViewportX() + 160 - cBullet.x);
        float vy = IntToFloat(GetViewportY() + 78 - cBullet.y);
        
        // Bullet's location X and Y
        float bx = IntToFloat(cBullet.x);
        float by = IntToFloat(cBullet.y);

        float length = Maths.Sqrt((vx*vx) + (vy*vy));
        // Make sure there is no division by zero
        if (length == 0.00) {
          tupu = 501;
        } else {
          vx = vx / length;
          vy = vy / length;  
        }

        // Addition
        bx = bx + vx;
        by = by + vy;
       
        cBullet.x += FloatToInt(bx, eRoundNearest);
        cBullet.y += FloatToInt(by, eRoundNearest);
        Display("%d %d", cBullet.x, cBullet.y);
        
        if (tupu > 15) {
          hupu = Game.GetLocationName(cBullet.x - GetViewportX(), cBullet.y - GetViewportY());
          Display("%s", hupu);
        }
        tupu++;
       
        Wait(2);
      } 
#2419
1. The movement is restricted because the game will be turn-based. In a single turn you have limited actions and moving one square is one action, firing a weapon is one action and so on.

2. I am looking into making this game 100% playable using the keyboard OR a gamepad of some sort. Basically I am aiming for a retroish Super Nintendo (SNES) style. Instead of going for an alien swarm style I am aiming more for a style that combines elements from the old Alien Breed games and combines that with turn-based RPG elements (experience points, levelling up skills etc).

All in all, I might even be leaving out the mouse support altogether, as having the mouse cursor around seems to be leading players to expect more mouse-related interactions than I am actually planning to do.
#2420
As far as I can understand this should be correct:
Code: ags

    function Shooty() {
      // First we move the bullet graphic to the player's location and reset variables
      String hupu = "x";
      int tupu = 0;

      cBullet.ChangeRoom(player.Room, player.x, player.y-7);
      
      // Then we reset "hupu", which keeps track of what the bullet is currently on top of
      // And we reset tupu, which makes sure the bullet does not travel indefinitely
      // DEBUG Display("SHOT FIRED");
      // WHILE tupu is less than 500 ie. for a long enough time
      while (tupu < 500) {
        
        // vectorX and vectorY
        float vx = IntToFloat(GetViewportX() + 160 - cBullet.x);
        float vy = IntToFloat(GetViewportY() + 78 - cBullet.y);
        
        float length = Maths.Sqrt((vx*vx) + (vy*vy));
        // Make sure there is no division by zero
        if (vx == 0.00 || vy == 0.00) {
          tupu = 501;
        } else {
          vx = vx / length;
          vy = vy / length;  
        }
        
        cBullet.x += FloatToInt(vx, eRoundNearest);
        cBullet.y += FloatToInt(vy, eRoundNearest);
        
        hupu = Game.GetLocationName(cBullet.x - GetViewportX(), cBullet.y - GetViewportY());
        Display("%s", hupu);
        tupu++;
       
        Wait(2);
        
      }


But: Nope, the bullet still travels in a straight line first and only as it gets closer to its target does it begin to curve towards the correct coordinate.

I stooped so low as to try this:
Code: ags

      cBullet.ChangeRoom(player.Room, player.x, player.y-7);
      cBullet.Move(GetViewportX() + 160, GetViewportY() + 78, eNoBlock, eAnywhere);
      while (cBullet.Moving == true) {
        if (tupu >= 12) {
          hupu = Game.GetLocationName(cBullet.x - GetViewportX(), cBullet.y - GetViewportY());
          Display("%s", hupu); 
        }
        Wait(1);
        tupu++;
      // Add a check to stop the cBullet from moving if it encounters a character or an object with a certain name
      }


That actually works just as needed, save for the fact that I cannot track the bullets location on each pixel of movement unless the movement speed of the bullet is set as "1", which in turn looks too on-screen. If I set the movementspeed higher, the bullet can skip "through" some of the most narrow objects if they meet at an angle.
SMF spam blocked by CleanTalk