Levels

Talk about making games.

Levels

Postby The achievement » Mon Feb 20, 2006 6:14 pm

Hi guys I was wondering how i make levels in the game not just one huge game. Can sombody help me on that? Would be appreciated!!!!
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby Troodon » Tue Feb 21, 2006 8:43 am

It depends do you want level to change with time or with actor placement. There are many ways to change levels, I make it with a goal actor wich transports the main actor to the 2nd level when collision.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby The achievement » Wed Feb 22, 2006 7:42 pm

So i make a collision to a wall with my main character that walks,jumps,etc. i dont get what you mean, is there a code for this or event,collision,then script editor?? Give me some ideas, would be much appreciated!!!! I mean if you would like to!! :D
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby Troodon » Thu Feb 23, 2006 7:46 am

Make a goal actor. (for example a flag where is written "Level complete")
When the main actor collides with the goal actor it is tranported to another place.

main actor
->collision (any side of goalActor)
->script editor
Code: Select all
x = 2588;
y = -2100; //this x and y coordinates tell where the actor will be after collision.


I hope this helped. If not, keep asking! :D
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby The achievement » Sun Feb 26, 2006 5:25 pm

ok i see what you mean but i still didnt do it yet but i will try, but i think i am on the same path as you, ok so you are telling me when i hit like a diamond (anything that goes up for a score)at the end of the level i can transport? I think thats it.. :?
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby The achievement » Sun Feb 26, 2006 8:26 pm

Tekdino i think it worked but when i hit the Flag, my main actor just disappeared?? Is that supposed to happen????
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby DilloDude » Mon Feb 27, 2006 12:57 am

Make sure the view is moved with the character as well.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby The achievement » Mon Feb 27, 2006 1:00 am

Um......... What? View is that where you see the character while your and it moves when ur character moves? Please explain more clearly. Sorry i coudnt get what you mean!
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby Fuzzy » Mon Feb 27, 2006 7:09 am

tekdino wrote:
Code: Select all
x = 2588;
y = -2100; //this x and y coordinates tell where the actor will be after collision.



You can also do this: make a flag actor and also a destination actor. Then you just borrow the destination actors x and y. This might seem like extra work, but then you can move around the destination without having to fiddle with the teleporter actors(if you have several of them).

Code: Select all
x = NextLevelStart.x;
y = NextLevelStart.x;


You could also use a lookup table. If your game has stages within a level and save points along them, you just have a player variable that records the stage number. This is then used to look up two values from array.

you'd put this in the collision between the player and the save point actor.
Code: Select all
Player.savepoint=Player.savepoint+1;
CollisionState("Event Actor", DISABLE);


and then when the player dies...
Code: Select all
Player.x = Xarray[Player.savepoint];
Player.y = Yarray[Player.savepoint];


So you can see, its possibly more complicated, but its also more versatile. In the case of save points, each save point could be a clone; you wouldnt need to modify any of them. It would make it a snap to add an extra in if you thought you'd need it.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby The achievement » Mon Feb 27, 2006 9:02 pm

Hi pete! ok so i make a flag or an object that lets me teleport right? then i do x = 2588; for where you go to teleport to. Then after that i make a desination actor and then put this code y = -2100; then i just go to level 2 right? :?
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby Kodo » Mon Feb 27, 2006 10:04 pm

I too use filled regions to mark destinations when moving the view around,, it makes it soooo easy and you dont have to worry about coordinates :)

[on level complete]
view.x = destination_filledregion_name.x;
view.y = destination_filledregion_name.y;
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

Postby The achievement » Mon Feb 27, 2006 10:26 pm

ok on my level complete i have a flag, Is that ok? or do i need a Filled region to do this code? Also, when i do this code(if i can) on the flag so i go to draw actor,script editor? im confused Im sorry for asking so many questions! No really i am sorry! I am taking all your time away and you guys are being so nice but im confused :?
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby Kodo » Mon Feb 27, 2006 11:14 pm

yeah, it doesnt have to be a filled region, it can be any actor you like. I just use filled regions because they dont require an animation/image, look tidy in the editor and the x and y positions are clear ( x:0 and y:0 are in the top left corner of the box)
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

Postby The achievement » Tue Feb 28, 2006 12:54 am

ya but for odd reason when i hit the flag, my main actor just disappears somewhere. What is up with that??
User avatar
The achievement
 
Posts: 220
Joined: Sun Feb 12, 2006 11:01 pm
Location: United States,Massachusetts
Score: 0 Give a positive score

Postby DilloDude » Tue Feb 28, 2006 10:10 am

Is the player actor the parent of the view?
If not, when the player collides with flag, have
Code: Select all
x=filledregion.x;
y=filledregion.y;
view.x=filledregion.x-200//The center of the view actor is the top-left corner-use half the view's width instead of 200
view.y==filledregion.y-100//see above

Otherwise, the player collides with the flag and moves to the filled region's location, but the view dosen't and you will just see th player disappearing.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Next

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest