MAJOR HELP WITH CODING!

Non-platform specific questions.

MAJOR HELP WITH CODING!

Postby toshiro » Wed Nov 14, 2007 1:39 am

im pretty good at making basic games with GE but id like to take my games to a higher level. I started working on more in depth games but i allways come across one big problem .............im really not that advanced with coding, i can make my player move up, down, left, right, i can make him jump, run, fight and kill enimies but as i said before this is all very basic . My main problem with coding is the variables and i dont quite understand the function of the global code or how to use it . I have tried downloading demo games and analyzing what the creators did but without knowning what the variables stand for, or what they do it is as useful as trying teach a monkey chinese lol :mrgreen: to make it simple i typed out a list of the varialbes that i do not kno ( WARNING: its ridiculously long!) and even if you do not know all of them or dont want define all of them just doing one or two is a great help.Some of them are easy to understand ( like moveto or openURL) and I can probably guess what they do but i am not sure how to use them. Another thing is the global code. What is it for and how do i use it? Guys i kno im asking alot but I would really appricite your help and for every post you make i'll give you a point. :D :D :D :mrgreen: :!:

The list is below



xprevious:

yprevious:

animpos:

nfrmaes:

clonename:

cloneindex:

frame:

real_fps:

ActorCount:

ToAlteriorPosition:

abs:

acos:

actor_to_screen:

asin:

atan:

atan2:

atof:

atoi:

atol:

calloc:

ceil:

cos:

cosh:

degtorad:

direction:

distance:

draw_from:

erase:

fclose:

feof:

fgetc:

fgets:

floor:

fmod:

fopen:

fprintf:

fputc:

fputs:

fread:

free:

fscanf:

fseek:

ftell:

fwrite:

getAllActorsInCollision:

getAnimIndex:

getAnimName:

getanimHardwareID:

getKeyText:

getLastKey:

getOwner:

getTime:

getactor:

getclone:

lineto:

loadVars:

log:

log10:

malloc:

max:

memcmp:

memcpy:

memmove:

memset:

min:

moveto:

open url:

pow:

putpixel:

radtodeg:

rand:

realloc:

remapkey:

restorecanvas:

round:

saveVars:

savecanvas:

screen_to_actor:

setPan:

setVolume:

setpen:

sign:

sin:

sinh:

sprintf:

sqrt:

sscanf:

stopsound:

strcat:

strchr:

strcmp:

strcpy:

strlen:

strncat:

strncmp:

strcpy:

tan:

tanh:

vectoradd:
User avatar
toshiro
 
Posts: 22
Joined: Mon Nov 12, 2007 2:22 pm
Score: 0 Give a positive score

Re: MAJOR HELP WITH CODING!

Postby Game A Gogo » Wed Nov 14, 2007 2:15 am

I know some of them

xprevious: the horizontal position (Relative to center, or parent if present) of the actor on the last frame

yprevious: the vertical position (Relative to center, or parent if present) of the actor on the last frame

animpos: The position of the animation in frame numbers, starting from 0

nframes: The number of frames present in the current animation

clonename:

cloneindex:

frame:

real_fps: Holds the current Frame Per Second

ActorCount: ActorCount("Actor"); returns the number of the indicated actor

ToAlteriorPosition:

abs: gives out the absolute number abs(1.198); would return 1

acos:

actor_to_screen: Transform actor coordinate into screen coordinate

asin:

atan:

atan2:

atof:

atoi:

atol:

calloc:

ceil:

cos: Returns the Cosine of a value cos(3.14);

cosh: Returns the Hyperbolic Cosine of a value cosh(3.14);

degtorad:

direction: returns the direction between two points in angles direction(point1.x,point1.y,point2.x,point2.y);

distance: returns the distance between two points in pixel distance(point1.x,point1.y,point2.x,point2.y);

draw_from: used in canvas only. Copy the image information of another actor, will the possibility of scalling

erase: used in canvas only. Used to fill the canvas by one color.

fclose: Closes a currently opened FILE.

feof: Checks for the EOF (End Of File) for binary FILE.

fgetc: Gets a char from a FILE

fgets: Gets a string from a FILE

floor:

fmod:

fopen: Opens or Creates a FILE

fprintf: Prints a formated string in a FILE

fputc: Prints a char in a FILE

fputs: Prints a string in a FILE

fread: Reads a FILE with defined settings

free:

fscanf: Scans a formated string?

fseek: Sets the cursor location in a FILE

ftell:

fwrite: Writes in FILE with defined settings

getAllActorsInCollision:

getAnimIndex: Gets the index number of an animation

getAnimName: Gets the name of an animation from the index number

getanimHardwareID:

getKeyText:

getLastKey:

getOwner:

getTime: Too long to explain

getactor:

getclone:

lineto: used in canvas only. draws a line between two points

loadVars: Loads one or more saved variables in a exterior file

log: returns the logometric (?) value log(10);

log10: returns the logometric10 (?) value

malloc:

max: returns the maximal value of two values

memcmp:

memcpy:

memmove:

memset:

min: returns the minimal value of two values

moveto: used in canvas only. moves the cursor to another point

open url: opens a website link

pow:

putpixel: used in canvas only. Places a pixel (Size of the "pixels" depends on the setting in setpen)

radtodeg:

rand: returns a random number between 0 and the number inputed

realloc:

remapkey:

restorecanvas: Restore a saved canvas

round: rounds a number to an integer. 1.5 becomes 2 and 1.4 becomes 1

saveVars: Saves a set of vars in a defined file

savecanvas: Saves a canvas state for later use

screen_to_actor:

setPan: Sets the pan of a channel (channel 0 being all the sounds, channel 1 being the music, all other are individual sounds)

setVolume: set the volume of a channel (Channel 0 being all sounds, channel 1 being the music, all other are individual sounds)

setpen: used in canvas only. Must be set before drawing on canvas, it defines the color, the transparency and the size

sign:

sin: Returns the Sine of a value sin(3.14);

sinh: Returns the Hyperbolic Sine of a value sinh(3.15);

sprintf: Prints a formated string in another string

sqrt: gives out the square root of a value

sscanf:

stopsound: stop the sound in a channel

strcat:

strchr:

strcmp:

strcpy:

strlen:

strncat: Appends a string

strncmp:Compares two strings

strcpy:Writes a string in another string

tan: Returns the tan (Forgot the whole name...) of a value tan(1);

tanh: Returns the Hyperbolic tan (again) of a value tanh(1);

vectoradd:
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: MAJOR HELP WITH CODING!

Postby toshiro » Wed Nov 14, 2007 4:31 am

THanks Alot game a gogo! Major Props! i didnt exect you to fill out that many! sooooo ill give you 3 points :lol: enjoy
Upcoming projects: Twilight sKys 15% done, est. release Jan 1st
User avatar
toshiro
 
Posts: 22
Joined: Mon Nov 12, 2007 2:22 pm
Score: 0 Give a positive score

Re: MAJOR HELP WITH CODING!

Postby summer_goth » Wed Nov 14, 2007 7:05 am

All of these can be found within the documentation though. If you installed it to your Program Files directory then the documentation file with the code should be here: file:///C:/Program%20Files/Game%20Editor%20Pro/Docs/script_reference.htm

If you haven't got the Pro version then it's probably here: file:///C:/Program%20Files/Game%20Editor/Docs/script_reference.htm

A lot of these can also be found on the Microsoft MSDN.

But you can find them all in the Game Editor documentation. It will show you how to use some of them and others it will show something like:
asin: Returns the arc sine of arg.
(which is trigonometry)

You can also get to the Script Reference in the documentation by doing the following within Game Editor:
Click on Help, then Documentation.
Then click on Scripting.
Then way at the bottom of the page will be the link to take you to the Script Reference.
User avatar
summer_goth
 
Posts: 153
Joined: Fri Jun 22, 2007 8:07 am
Location: South Africa
Score: 5 Give a positive score

Re: MAJOR HELP WITH CODING!

Postby Game A Gogo » Thu Nov 15, 2007 1:50 am

I was going to point that out, but I needed to go just when I finished filling out what I had filled. sorry
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: MAJOR HELP WITH CODING!

Postby summer_goth » Thu Nov 15, 2007 6:19 am

No need to say sorry Game A Gogo. You answered him well. :wink:
User avatar
summer_goth
 
Posts: 153
Joined: Fri Jun 22, 2007 8:07 am
Location: South Africa
Score: 5 Give a positive score

Re: MAJOR HELP WITH CODING!

Postby toshiro » Thu Nov 15, 2007 10:44 pm

yea thanks guys i should have looked at the help bar ..................so smart of me :lol:
Upcoming projects: Twilight sKys 15% done, est. release Jan 1st
User avatar
toshiro
 
Posts: 22
Joined: Mon Nov 12, 2007 2:22 pm
Score: 0 Give a positive score

Re: MAJOR HELP WITH CODING!

Postby Game A Gogo » Fri Nov 16, 2007 12:33 am

oh and, Toshiro, please crop that image in your signature, it takes a lot of space for nothing D= and lags my browser a little since I Have dial-up.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: MAJOR HELP WITH CODING!

Postby Kodo » Fri Nov 16, 2007 12:42 am

I've had all signatures turned off for some time now (can be done in your profile); not because of the loading times but because I found they really made threads harder to read :)
Inogames: http://www.inogames.com iOS gaming
Firetop Adventure (app store): http://itunes.apple.com/us/app/firetop- ... ?mt=8&ls=1
User avatar
Kodo
 
Posts: 449
Joined: Thu Oct 20, 2005 8:20 pm
Location: UK
Score: 23 Give a positive score

Re: MAJOR HELP WITH CODING!

Postby Spidy » Fri Nov 16, 2007 9:51 am

if i read his code again and again and try in my extra game i undertand all the GE codes thx all of your guys :D
Image
VOTE FOR MY SIGNATURE PLEASE.......THANK YOU
User avatar
Spidy
 
Posts: 935
Joined: Tue Aug 14, 2007 1:28 pm
Location: http://www.inatonibai.com
Score: 38 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron