Page 1 of 1

I need to know some things.

PostPosted: Sun Jul 19, 2009 7:26 pm
by Kingdaro
Hello all! I'm new here and went looking for a game maker that used an instances system that I could use. Here I am! :D

Now, I know the basic stuff like how to make your character move left and right and stuff, but I can't figure this stuff out:

How to rotate a sprite?
How to make the view follow the character? I saw the tutorial but I couldn't make it work T.T
Change the size? I suppose I have to do this myself in image editors, but is there a way in Game Editor?
Fade effects. I'm pretty positive on how to do this one, but I just wanna make sure.

That's it for now, so when I need to know anything else I'll give you a call :D

Re: I need to know some things.

PostPosted: Sun Jul 19, 2009 8:34 pm
by jimmynewguy
Welcome
1) you can't in GE unless you use Pyro's bmpfuntion (but then it's not good with realtime apps) so just do it in an image editor
2)Plenty of ways to do this, depends on how you want to do it, easiest is to make the player the parent of the view
3)you can use draw_from, but ya image editor is easier+faster in real time
4)Draw Actor->
Code: Select all
transp += .01;
change the .01 to change speed, + makes it fade out - makes it fade in

PS:You can't call on a forum :) (jk)

Re: I need to know some things.

PostPosted: Sun Jul 19, 2009 8:46 pm
by Kingdaro
Thanks. I also need to know this...

How do you make a condition where if an object is touching another object and a key is pressed the object creates two new objects and destroys them?
Also, how do you create a variable, or set a variable to a random number between two numbers?

Re: I need to know some things.

PostPosted: Sun Jul 19, 2009 9:12 pm
by skydereign
That was a bit vague, but if two objects are colliding, and a key is pressed, you would put it in the collide event for one of the actors, or make a collide variable. I don't know what you are trying to do, so I prefer the first.
firstObject -> Collision with secondObject(repeat) -> Script Editor
Code: Select all
char * key = GetKeyState();
if(key[KEY_DOWN]==1)
{
    // This is where I don't know what you are trying to do
    // You would create actors here, but I don't know which actors you are trying to destroy...
    // If you didn't know, // means the lines are commented off, a way of writing reminders in code
    // In other words, this is not code, because of the //
}



For variables, look here.
http://game-editor.com/wiki/index.php?title=Creating_variables

If you want set them to random between two numbers,
Code: Select all
varName = rand(2);

This will return either 0 or 1.

Re: I need to know some things.

PostPosted: Sun Jul 19, 2009 11:32 pm
by DST
Rotating sprites for 360 animations is easiest when you use Feral's sprite maker!
Yes, It's free, It's made with GE!

viewtopic.php?f=4&t=5869

Re: I need to know some things.

PostPosted: Mon Jul 20, 2009 2:57 am
by Kingdaro
I might try that. Thanks for all your help :D

Also, script trouble T.T I want to make a script where it follows the player when it's out of an "invisible box", kinda like the one on the Spongebob game. I'm thinking the problem is I have to end it with something?

Code: Select all
if player.x < view.x - 100

 ChangeParent("view", "player");

 

if player.x > view.x + 100

 ChangeParent("view", "player");



if player.x > view.x - 100

 if player.x < view.x + 100

  ChangeParent("view", "(none)");



if player.y < view.y - 100

 ChangeParent("view", "player");

 

if player.y > view.y + 100

 ChangeParent("view", "player");


if player.y > view.y - 100

 if player.y < view.y + 100

  ChangeParent("view", "(none)");








Re: I need to know some things.

PostPosted: Mon Jul 20, 2009 3:15 am
by pyrometal
Kingdaro wrote:How to rotate a sprite?

jimmynewguy wrote:1) you can't in GE unless you use Pyro's bmpfuntion (but then it's not good with realtime apps) so just do it in an image editor

lol, yep, I made those functions for that exact purpose but they're really slow unfortunately (avoid using "canvas actors" unless you have to).
Link: http://game-editor.com/forum/viewtopic.php?f=5&t=5819&hilit=+bmp24

DST wrote:Rotating sprites for 360 animations is easiest when you use Feral's sprite maker!

I strongly advise this also! Feral used my bitmap rotation function inside his application and made it easy to use for everyone's sake. He's awesome, but he unfortunately doesn't seem to hang around the forum anymore... Hope he decides to come back one day!
Link: http://game-editor.com/forum/viewtopic.php?f=4&t=5869

Welcome to the GE community by the way! ttyl now.

Re: I need to know some things.

PostPosted: Tue Jul 21, 2009 6:38 pm
by Kingdaro
Ignore my previous problem lolz I have a new one.

I've gotten the concept of the whole platformer controling. The jumping and moving stuff, also landing. Though, I'm having a little glitch with this transparent Tilesheet. When I go to the edge of the round pieces, it gets all glitchy. The player like goes inside the walls, even if it's like a giant block of solidness, then it gets propelled to the outside of the walls.

Oh and thank you all for the help :D

Re: I need to know some things.

PostPosted: Tue Jul 21, 2009 9:07 pm
by skydereign
What type of collision are you using for PhysicalResponse? It seems like just top, or top and bottom. What is happening is the player is allowed to pass through those tiles from the sides. The side is defined by any pixel's left or right side. Switch it to All sides, it would work better. Some bugs occur with this, but it depends on the game.

Re: I need to know some things.

PostPosted: Wed Jul 22, 2009 8:27 am
by Kingdaro
Thank you all! All your help has led me to making my first game. Not much, but a big step in the right direction. I plan to improve and expand it. More specifically, add enemies you have to jump on, more levels, and the famous red and blue coins. Also, a health and lives variable. I'm having trouble on this one but I'll figure it out soon enough.

Re: I need to know some things.

PostPosted: Thu Jul 23, 2009 12:18 am
by pyrometal
Hey that's pretty good for your first game! Keep up the good work!