Topic:   imagefile collide   (Read 18625 times)


0 Members and 1 Guest are viewing this topic.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: imagefile collide
« Reply #15 on: March 27, 2011, 06:58:08 PM »
Sorry, I'd just come back from church and was absolutely knackered when I wrote that. The correct command is of course STR$ (in place of CHR$), using exactly the same syntax.
I survived the spammage of 2007

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
Re: imagefile collide
« Reply #16 on: March 27, 2011, 07:43:35 PM »
Quote
Sorry, I'd just come back from church and was absolutely knackered when I wrote that. The correct command is of course STR$ (in place of CHR$), using exactly the same syntax.
Thanks it worked, perfectly, and if you don't mind me asking. What does CHR$ even do? And how is it useful in a game?

EDIT:
the STR$ variable works fine integrated into my code, and I've encountered another error (oh jeez). It isn't adding the string variables as what they are, just their names.
So my question is: How do you add a string variable to a string variable as it's value.
Here's a link to my game, goto card 4, and you have to start the game by clicking the left arrow

http://www.mediafire.com/?v6yqwtf9eczyx

Thanks again, in advanced, for any help you can give me
P.S. how do I link to a page like most GM users use to let people download their games, all I can get is this one (above)
« Last Edit: March 27, 2011, 08:01:39 PM by KurtManion »
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: imagefile collide
« Reply #17 on: March 27, 2011, 08:08:57 PM »
How do you download this without pro?
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: imagefile collide
« Reply #18 on: March 28, 2011, 05:05:18 AM »
Quote
How do you download this without pro?
You can download each file individually, but it would be easier if Kurt compressed the folder housing the game and its resources before uploading it. To do that, highlight the folder and click File in the finder bar and Compress "folder name" in the submenu.

Quote
Thanks it worked, perfectly, and if you don't mind me asking. What does CHR$ even do? And how is it useful in a game?
It's very unlikely that you'll ever use the CHR$ command in a game, and the explanation of what it does is somewhat complicated. Basically, all the standard keys on a keyboard have a number assigned to them (an ASCII value, which stands for "American Standard Code for Information Interchange"), and the ASC command returns the correct ASCII value of a string. For example, the capital J key has an ASCII value of 74, so the following code would result in var2 having a value of 74:

Code: [Select]
var1$ = "J"
var2 = ASC var1$

The CHR$ command does the exact opposite of this; it returns the ASCII character of an integer. The following code will result in var2$ having a value of "J":

Code: [Select]
var1 = 74
var2$ = CHR$ var1

You'll probably never use either commands, but if you do it'll be ASC, not CHR$. I use the ASC command in the Roguesoft RPG Engine to determine whenever a player presses the ESC key, as the ESC key doesn't return a keydown$ value:

Code: [Select]
ON KEYDOWN

  keydownASC = ASC keydown$

  IF keydownASC = 27 THEN
    '--- The ESC key was pressed
  END IF

END KEYDOWN

Quote
the STR$ variable works fine integrated into my code, and I've encountered another error (oh jeez). It isn't adding the string variables as what they are, just their names.
So my question is: How do you add a string variable to a string variable as it's value.
I'm not entirely sure what you mean, but if you're asking how to combine the value of two string variables together, it's easy peasy:

Code: [Select]
var1$ = "Silverwind"
var2$ = " the Great"
var3$ = var1$ + var2$

var3$ will now have a value of "Silverwind the Great". Check out my video tutorials on string manipulation:
http://alstaffieri.com/gmguide.html
I survived the spammage of 2007

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
Re: imagefile collide
« Reply #19 on: March 28, 2011, 05:55:40 PM »
oh thanks you so much ;D  It worked perfectly. When writing this script I didn't really have a clear understanding of how, and when to use quotations, and dollar signs surrounding variables. Re-whatching your video really made it click (good job by the way on the video.)
I was trying to add string to sting like:
  aftcos$ = aftcos$ + "$yco$$"
when I should have added them like:
  aftcos$ = aftcos$ + yco$
Thanks so much. Here's an updated link to the mediafire: http://www.mediafire.com/?elutzm6lrits16b
P.S. how do I get the link to the page that most GameMakers Garage developers use to let people play their games?

EDIT: Never mind when you upload the folder as a ZIP it goes to the screen that I wanted.
« Last Edit: March 28, 2011, 07:20:39 PM by KurtManion »
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
Re: imagefile collide
« Reply #20 on: April 15, 2011, 11:30:19 AM »
Over break I had a great idea. Different game modes. I'm not getting into that here, but it does require the game to seamlessly pass between cards. I changed the aftcos, and precos block to create an array where every coordinate is showed as marked, or unmarked. It seems to work to an extent, but the IMAGEFILE COLLIDE command started working up again. I found it was a glitch in place from the beginning of the code I didn't notice. here is the Timer block, and (updated) mediafire link. try maneuvering the cycle under a horizontal line, and you'll see the problem. (it kills you)

EDIT: ignore the part at the end about the death animation. It doesn't work, and won't until the is glitch is fixed. It is next on my checklist of this game's development.


http://www.mediafire.com/?by1brdv922mm6at

Thanks in advance for any help you can give

EDIT: the new arrangement of the preycos, and aftcos is because I wanted to make the background and trail carry over to other cards, since I'm running out of room, and thought it would be a good idea to have all of the different AI's in different cards. I'm not quiet sure if i'm going to use all of the 100 lines I have left for AI, so I thought I would at least think ahead this far.

EDIT: I got rid of the timer block, because it was so big and obnoxious, and I found one problem: The new way the preycos and aftcos were set up had a few points with the same value, so I defaulted back to what I had originaly
« Last Edit: April 20, 2011, 04:04:28 PM by KurtManion »
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
Re: imagefile collide
« Reply #21 on: April 20, 2011, 05:08:54 PM »
I think I might have found the problem, but I'm not sure... at all. I think my string got too long, because it would add 7 more characters every time you move (I'm talking about the 'string$' variable, my death identifier.) So I think that it got too long, and wouldn't add any more of the values. Is this a possibility? Or is it something else that is wrong with my code?Please respond quickly, I'm almost done with these core mechanics.
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
Re: imagefile collide
« Reply #22 on: April 20, 2011, 05:37:06 PM »
 ;D I think I've finally got it. I went into the section of the website called 'Articles and Tutorials' and I saw a document called 'how to fake an array.' Which is by Al Staffieri Jr. by the way, and it hit me how I can fix the bug. I can do it with a fake array. I'll tell you guys how it goes... if it works :-X
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
Re: imagefile collide
« Reply #23 on: April 28, 2011, 05:59:16 PM »
Okay it's been a week since i got the idea to fix the way you lose in TRON formerly (and currently) known as the Precos and Aftcos block. It's been edited to check an array to see what type of trail has been left inside the block. The array posed two problems. One everything beneath the command wouldn't function, and Two it wouldn't register (click the spacebar for an alert window showing it's value.
I fixed the Former by moving it to the bottom of the list, but the later still is a problem.
The mediafire link has been updated:
http://www.mediafire.com/download.php?v7fsvx60tnhexd5

Please help. I think that it should just be a novice mistake, but I can't find anything wrong with it
P.S. if you encounter the other glitch the answer is "Yes I know about it, and it doesn't hamper gameplay testing in any way."
« Last Edit: April 28, 2011, 05:59:56 PM by KurtManion »
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
Re: imagefile collide
« Reply #24 on: April 29, 2011, 06:38:07 PM »
I think I may cry. :'(
Trying to fix the problem I made it worse... I think
http://www.mediafire.com/download.php?dh2yvv4to95wu6q
check out the least confusion creating a fake array. Now every time I click the space bar to tell me what it equals it keeps saying LEFTARROW >:( This game has utterly spiraled out of control at the third to last core mechanic I need before coming out with a BETA. I hope the three months weren't for nothing :'(
EDIT: if your curious the last two core mechanics, are enemies, and the coveted turbo
« Last Edit: April 29, 2011, 06:39:18 PM by KurtManion »
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
Re: imagefile collide
« Reply #25 on: May 03, 2011, 07:28:42 PM »
Is there a maximum amount of characters a string can hold? I think the string might be too long, and that might be causing the unexplainable bug.
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

Al Staffieri


  • GMG-er

  • **

  • no avatar

  • Posts: 452

  • I love GameMaker
Re: imagefile collide
« Reply #26 on: May 04, 2011, 10:28:12 AM »
Maximum a string can hold is 255 characters.

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
Re: imagefile collide
« Reply #27 on: May 04, 2011, 09:29:23 PM »
well that takes out that theory. I'm just going to make an old fashion array and see if it works.
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

GMG Kurt


  • GMG-er

  • **


  • Posts: 682

  • Sorry for being such a noob
Re: imagefile collide
« Reply #28 on: May 26, 2011, 05:57:38 PM »
I found the error, and I'm going to fix it. Expect a Beta version before tuesday! It might be optimistic, but I think I can finish it fast, and soon. There are two error that I found. One is that a a variable that should've been a string variable didn't have a '$' after the name. The second one is that I'm not using the 'fake array' MID, LEFT, and RIGHT commands correctly. it would log ones and twos depending on whether you were vertical or horizontal, but not the way I wanted. It's kind of hard to explain. Press space for the value of array
http://www.mediafire.com/download.php?8r9cncg98xo2l0s
Just your average Weekend Warrior.
Yes I know I have bad spelling, it's what makes me such a good programmer!

"Old art, weather magnificent or wretched, is always the raw material of new art. The artist's job, though, is to

FrankJScott


  • GMG-er

  • **

  • no avatar

  • Posts: 431

  • Gan is so awesome.
New Product Guide
« Reply #29 on: January 06, 2024, 07:38:19 PM »
Please try Google before asking about Updated Product Blog b21b4a3