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 - suicidal pencil

#61
*updated* (new dev. journal post, made lots of progress on the song editor and engine :P )
#62
AGS Games in Production / Re: AGS Guitar Hero
Sat 13/03/2010 04:06:56
Quote from: CaptainD on Fri 12/03/2010 15:49:30
Is there any way of using Tracker music and making a program to grab the notes information straight from the file?

Only if MIDI is used (Although, a fun game called Audiosurf that will read any song you give it, and it will build a course for you to run with notes synced with the music...but I'm pretty sure that it only detects spikes in the audio frequency).

However, I accidentally solved this problem when I was considering the implementation of the song editor. As the song is built, it's already synced with the music file.

*updated* (new dev. journal post, and finished file parsing function)
#63
Quote from: monkey_05_06 on Thu 11/03/2010 17:27:31
Code: ags
function repeatedly_execute_always() {
  if (!cEnemy.Moving) cEnemy.Walk(Random(Room.Width), Random(Room.Height));
}


what about walkable areas and the such? If you had an urban scene, I think it would be a bit weird to watch an enemy walk up the side of a building :P

#64
AGS Games in Production / Re: AGS Guitar Hero
Fri 12/03/2010 00:10:42
Even with the limitations, it is possible to create almost anything with AGS. However, the trick is making it playable and usable  :P
#65
AGS Games in Production / Re: AGS Guitar Hero
Thu 11/03/2010 12:20:51
damn! beaten to the punch. Oh well, so I may not be the first to create it, but maybe the first to release it (didn't see a dl link in the link...but that's pretty cool)  :P

If I have a flaw, it's graphic design. I can't create graphics to save my life. Anyone interested, feel free to PM me.
#66
I've been dreaming about making a Guitar Hero clone on AGS, but I've never really known where to start. After searching around and finding no evidence of anyone succeeding at it yet, I still have no idea where to start, but I'm going to give it a try  :D

So presenting...


Details:

Name: AGS-Guitar Hero
Version: 0 (only just started :P)
Release: soon! I promise!

Basically, I'm making this game as a coding challenge for myself, and to try and twist the arm of AGS as hard as I can and see what happens. It will do everything that you can do in Guitar Hero right now, with three notable exceptions: There will be a 7th note (the 'open string' note), You will be able to make a Guitar Hero version of your favorite songs (basically, a song editor), and most importantly: the source will be available! I love looking at the source code of modules and games because I like to see how people solve certain problems, so I'm letting everyone who wants to take a gander at it ;)

To Do List

Game Engine
  • Song file parsing (100%)
  • Create Song editor (50%)
  • Create graphics (40%)
  • Player Input (50%)
  • GUIs (50%)
    Gameplay
  • Hammer-ons / pull-offs (0%)
  • Whammy Bar (0%)
  • Star Power (0%)
  • Note hit checking (0%)
The graphics are just rough versions, just so I can get a working version. Here's what it looks like so far:

The main screen


The notes




Dev. Journal

March 10, 2010

  • I've figured out two possible ways to format the song data. The first is the easiest to read and understand, the second...not so much. The former is a slight variation on guitar tabs, and the latter is a format looking like (24)------(1)xxx(46)-(13)-(24) etc... with the numbers representing the notes (1 for first fret, 2 for second, etc), dashes representing open space, and x representing holds. I started out doing the first design, but I'm going to use the second design, since it will take 6 times longer to parse the first design (unless I can parse 6 lines at once...), and 6 times smaller. As well, after the file is parsed, the note locations are held in temporary storage (aka, arrays) so that it's easy to recall the information on the fly. However, these arrays are going to be big. If it takes 0.5 seconds for a note to travel from the top to the bottom (twenty frames), and there is an array element for each frame of the song, a 5 minute long song will need 12000 elements (each note position is one frame)  :o Even better, is that there are 7 arrays that would be that long (164.0625 Kb of space required JUST for that :P) Even then, I think I'll make the song time limit 10 minutes (24000 elements, 328.125 Kb). I have another little obstacle to overcome: I need to make the song editor first, so I can create songs and then test the file parsing, and play the game  :P

March 12, 2010
  • This is turning into a monster to code. It's not terribly complicated (at least, from my point of view (working excessively in Perl has lent me some skill in file parsing :P)), but there sure is a lot of it. It's just too bad that AGS doesn't support Regular Expressions. Take this example: The beginning of every song first starts out with a bunch of information about the song (what number it is, the name, and the length). Here's how I'm parsing it in AGS (ripped straight out) (:
Code: ags

.
.
.
    Offset = 0;
    String Line = SongList.ReadRawLineBack(); //get the entire line into the game memory
    String LineChar = Line.Substring(Offset, 1); //This variable points to a single character in the line
    
    if(LineChar == "I") //the line with the song information (song name/number) is started with an 'I'
    {
      
      SongFound = true;
      Offset += 3;
      LineChar = Line.Substring(Offset, 1);
      
      while(LineChar != "}") //I'm assuming that the user wont mess around with the song file
      {
        
        StringNumber.Append(LineChar);
        Offset++;
        LineChar = Line.Substring(Offset, 1);
        
      }
      
      //I have to deal with the 'a' at the beginning of the string.
      String TrimStringNumber = StringNumber.Substring(1, StringNumber.Length-1);
      songnumber = TrimStringNumber.AsInt;
      Offset += 3;
      LineChar = Line.Substring(Offset, 1);
      
      while(LineChar != ")")
      {
        
        SongSelect_SongName.Append(LineChar);
        Offset++;
        LineChar = Line.Substring(Offset, 1);
        
      }
      
      SongSelect_SongName = SongSelect_SongName.Substring(1, SongSelect_SongName.Length-1);
      Offset += 3;
      LineChar = Line.Substring(Offset, 1);
      
      while(LineChar != ")")
      {
        
        SongSelect_Length.Append(LineChar);
        Offset++;
        LineChar = Line.Substring(Offset, 1);
        
      }
      
      SongSelect_Length = SongSelect_Length.Substring(1, SongSelect_Length.Length-1);



now, here's the same stuff done in Perl with Regular Expressions

Code: ags

if($_ =~ /^I (\d) {(\w)} (\d)/)
{

  $SongNumber = $1;
  $SongName = $2;
  $SongLength = $3;

}


MUCH simpler, and more compact :P (edit: I actually found a semantic error in my code after posting...)
more to come!


March 16, 2010
  • I'm about halfway done the song creator for the game. It's only now, though, that I realized something: In order to let people create their own songs, they'll need the source. When the game compiles, all the music is stored in the music.vox file...and I'm pretty sure that there is no way to add to it after it's compiled. This isn't that much of a problem though, seeing as I was going to release the source anyways  ;D .  That aside, it seems that the bulk of my worries is in getting the songs to line up with the notes. Even in the song editor, this promises to be a pain.
#67
ahh, so that's why I couldn't find it; it's in the properties window (which I never use...). I thought it was accessed through the script  ::). Works like it's supposed to know, thanks.

now to figure out how to make that background animate without loss of FPS...reduced to 14 frames, but almost every pixel not covered by an object is being updated

edit: I fixed the background animation being clipped. The animating background is actually a 800x600 object being animated, but the room background is the same image as the first frame in the animation, and the object Y was off
#68
The baselines for the objects are never set. The problem comes when the player controlled object (the black MiG-28) is "flying" over the other objects. All objects are supposed to be drawn underneath the player object, but when an object passes a certain point relative to the player object (it looks like when the bottom edge of the non-player object passes the bottom edge of the player object), the non player object will be displayed on top of the player object.

It does not hurt game play in any way, but it looks very sloppy and breaks the immersion.
#69
I've scrapped the animating object as a background. It was really eating at the FPS.

QuoteHave you set BaselineOverridden to true?

I've looked everywhere for that, and can not find it. v3.1.2 SP1, by the way
#70
Quote from: Gilbet V7000a on Thu 04/03/2010 10:39:10

About the animating "background" object, where do you put the code for animating it?

The code is in the room_Load() function, and is set to loop without blocking

And, no matter where the baseline is put, it's always the same thing, no change in behavior
#71
Quote from: SSH on Thu 04/03/2010 06:33:02
...change the baseline to a different value....

Tried that already, it didn't solve it..

...objects do not have a z parameter, or if it is, it's not listed.
#72
This problem kept popping up, but I could ignore it until I did the background with an object. Basically, it seems that object[a], when it is clipping of object[c], and when object[a] has a higher y value than object[c], with object[a]'s y value being higher by approx. 2/3 to 1/2 of object[a]'s y value, object[a] will clip behind object[c], no matter what object numbers they are.

It's also constant for all objects.

Here's a few examples:



This object is serving as an animated background with 78 frames. No matter what speed I put it to, it cuts the animation, and displays the first frame and doesn't change. Look where the red arrow is pointing to see it better :P



Here's one shot of one object above another.



Now here it switched up

I've looked everywhere in the help and forums, and there doesn't seem to be anything regarding this.
#73
AGS Games in Production / Re: No One Likes You
Thu 04/03/2010 04:43:17
...get the hell out of my head.

Looks fun, though. May be the first Adventure game I've actually waited for in a very long time  :P

PM if you need a code monkey
#74
Using the save games might be easier, but coding it sounds fun ;D

Only one question, though: If someone skipped the first installment of the series, and went straight to the second, would it start a new game, or would it just ask them to go play the first?
#75
I agree with that. Also, I think that there should be no upper limit on those entities, or if CJ doesn't implement it, at least no limit on the amount of objects allowed in a room ;D There's a ton of things that you can do with objects if you twist them juuust right, and a limit restricts what you can do.
#76
Code: ags

int DripObject;

function GetFreeObject()
{
  Object* p_object;
  int counter = 0; 
  while(counter <= 39)
  {
    p_object = object[counter];
    if((p_object != null) && (p_object.Graphic == 0)) return counter;
    else counter++;
  }
  return 0;
}

function PlayDripAnimation()
{
  if(DripObject != null) return 0;
  int DripObject = GetFreeObject();
  object[FreeObject].SetView(x); //x is whatever view has the drip animation
  object[FreeObject].Animate(x, y, eOnce, eNoBlock, eForwards);
  return 0;
}

function room_RepExec()
{
  if(Random(100) >= 99) PlayDripAnimation();
}


That will create and animate the drip, but not move or release the object when you want it to.

Of course, you can always just set one specific object for it, and do away with the 'GetFreeObject()' function
#77
I've been a bit tied up...but with the permission of Rocco, I'd gladly write in the physics and re-release it
#78
Quote from: Khris on Tue 16/02/2010 18:09:40
You have to stop the iteration at Room.ObjectCount - 1; object numbering starts at 0.

yes, I know it starts at 0, and if you have all 40 objects in a room, that loop should stop when counter hits 39
#79
There's another method that will let you use the same code over and over again for each room. Especially when you have too many objects in a room, and doing the if(!object[0].Visible && !object[1] && .......

Code: ags

function GetVisibility()
{
  int counter = 0;
  int false_count = 0;
  while(counter <= Room.ObjectCount)
  {
     if(!object[counter].Visible) false_count++;
  }
  if(false_count == Room.ObjectCount) return true;
  else return false;
}
#80
I find it a bit easier to deal with when things are (encompassed) in [brackets] I guess it's programmer's choice :P
SMF spam blocked by CleanTalk