• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Solid

H

Heat4Life

Guest
What does the Solid even do in GM:S? Is It use for good collisions or what?

All answers would be greatly appreciated! :D
 

Xer0botXer0

Senpai
gm manual:

An instance can be flagged as solid through the object properties, or by changing the value of this variable. If solid is true, a special collision event is generated whereby the instance is returned automatically to the position it was at in the step previous to the collision. If it is set to false, all collisions must be dealt with through the collision event.
 
H

Heat4Life

Guest
ehh... You all sure? So... You all want me to pretend that the solid stuff on GM:S doesn't exist? lol
 

Bingdom

Googledom
Basically it tries to prevent objects from going through it if you have another object with a collision event on them, doesn't always work and it has a possibility of making objects stuck.
 

Roa

Member
ehh... You all sure? So... You all want me to pretend that the solid stuff on GM:S doesn't exist? lol
Yes we're sure. Its a legacy feature that mark wanted canned in gm7. Its old and slow and very limiting, plus no one that uses them can use them right. They always come back flooding the forums and they just get told to do something else entirely. They're possibly the worst legacy thing in gamemaker thats still around.

I've personally been very vocal about getting them removed in studio.
 
H

Heat4Life

Guest
Yes we're sure. Its a legacy feature that mark wanted canned in gm7. Its old and slow and very limiting, plus no one that uses them can use them right. They always come back flooding the forums and they just get told to do something else entirely. They're possibly the worst legacy thing in gamemaker thats still around.
Oh... Okay, that's awesome. :D
 

Llama_Code

Member
Pretty much if you use it, be prepared for the. answers to the follow up questions you will have to be don't use solid.

It definitely needs to be removed, there are better ways of doing what it does.
 
A

Aura

Guest
Not as worthless and pointless as you think. It has its own advantages and disadvantages. Most issues arise when solid instances are not handled carefully. Solidity is not buggy per se.

The concept of solid instances in GameMaker is mostly for collision purposes. An ideal collision being a collision between a dynamic non-solid instance and a static solid instance. Various issues arise when you try to give motion to a solid instance, so solidity in GM is usually frowned upon. But if handled carefully, you should be fine.

Also, there are some functions that work only with solid instances, such as place_free() and move_contact_solid(), although alternatives for non-solid instances are also available. Those functions are widely used, thereby giving you an idea of popularity of solidity. Many programmers rely on solid instances for collisions without issues.

What matters more IMO is how you're using it, rather than what you're using.
 

Roa

Member
Not as worthless and pointless as you think. It has its own advantages and disadvantages. Most issues arise when solid instances are not handled carefully. Solidity is not buggy per se.

The concept of solid instances in GameMaker is mostly for collision purposes. An ideal collision being a collision between a dynamic non-solid instance and a static solid instance. Various issues arise when you try to give motion to a solid instance, so solidity in GM is usually frowned upon. But if handled carefully, you should be fine.

Also, there are some functions that work only with solid instances, such as place_free() and move_contact_solid(), although alternatives for non-solid instances are also available. Those functions are widely used, thereby giving you an idea of popularity of solidity. Many programmers rely on solid instances for collisions without issues.

What matters more IMO is how you're using it, rather than what you're using.
Seriously?

Many programmers?

What advantages does it have? All of its features can be replicated in code in a few lines, and be way faster in the process, plus can take specialized actions after collisions. The features of functions that support it are not in themselves a good thing, especially given every function for solids has a partner function for instances. The only advantage it has is being lazy. There is nothing ideal about them. They were, by marks own words, put in for rapid prototyping and not as a final solution. They have problems when you have more than 1 collision between 2 objects and they get stuck. They often times don't respond to collisions due to pushing out so you cant return if a collision has happened depending on the situation. You can't even control "collision layers", everything is either solid or not solid for every instance. There is very little control.

I agree with you on most things aura, but this is not one of them. People should be coming up with collision systems that suit them for their game. Solids promote terrible habits and problems. Solids are god awful.
 

Micah_DS

Member
Yes we're sure. Its a legacy feature that mark wanted canned in gm7.
I'm not disagreeing or anything like that, but I'm just wondering if you might be able to remember where Mark said this? Also, where is the source for the following quote, please?
by marks own words, put in for rapid prototyping and not as a final solution
I am also interested to hear some actual facts about why solids would be slower, as you stated a couple times.

Sorry. I crave education on this matter. Feed me please. ?

Actually, I'd love to hear what anyone from YYG would currently say about solids. Interestingly enough, I didn't realize until I gave it some thought just now, but I guess I stopped using solids at some point without even meaning to. If solids really are as useless as people are saying here, I'm honestly hoping they will not be in GM Next. Actually, I'm kind of hoping GM Next will be taking away a lot of various crutches (yes, I know, nothing is going to be revealed; I'm not asking for info about GM Next, not speculating, not requesting - just stating my hopes), because there is a lot I had to unlearn from my previous years of using older versions of Game Maker, and I would've liked to have had things a bit more strict because it would've helped me a lot in the long run. I really want to adopt good programming habits, because bad habits generally mean worse games, flawed games, fun-sucking black holes of games, etc. Yet good habits do the opposite, opening massive doors leading into the magical jelly space filled with the unicorn panda candies, and you can make more fun awesome games when the doors are open to that special place. For the record, I'm referring to one's imagination combined with proper knowledge and thinking, and not talking about doing drugs.
 

Roa

Member
I'm not disagreeing or anything like that, but I'm just wondering if you might be able to remember where Mark said this? Also, where is the source for the following quote, please?

I am also interested to hear some actual facts about why solids would be slower, as you stated a couple times.

Sorry. I crave education on this matter. Feed me please. ?

Actually, I'd love to hear what anyone from YYG would currently say about solids. Interestingly enough, I didn't realize until I gave it some thought just now, but I guess I stopped using solids at some point without even meaning to. If solids really are as useless as people are saying here, I'm honestly hoping they will not be in GM Next. Actually, I'm kind of hoping GM Next will be taking away a lot of various crutches (yes, I know, nothing is going to be revealed; I'm not asking for info about GM Next, not speculating, not requesting - just stating my hopes), because there is a lot I had to unlearn from my previous years of using older versions of Game Maker, and I would've liked to have had things a bit more strict because it would've helped me a lot in the long run. I really want to adopt good programming habits, because bad habits generally mean worse games, flawed games, fun-sucking black holes of games, etc. Yet good habits do the opposite, opening massive doors leading into the magical jelly space filled with the unicorn panda candies, and you can make more fun awesome games when the doors are open to that special place. For the record, I'm referring to one's imagination combined with proper knowledge and thinking, and not talking about doing drugs.
I wish I could, but its just of those things that survives by word of mouth. You can barely google this man's name. We're talking stuff from late 90s and early 2000s. He never liked solids. He also never liked 3d. 3d writen in directX 7. He made things like this quite clear. In his books written on GM like the GM apprentice, he actively avoids them when given the chance to use them. Finding an actual source for this stuff would be very hard, but you might be able to dig up something in legacy forums. Normally I wouldn't tell people to go look themselves when asked for a source, but I can't even be sure its there anymore and I'm not putting the effort to go on a goose chase. You just have to go on the word of people from that used gm way back then. It might even be in the GM apprentice he said that.

but yeah, it iterates through all instance then pixel by pixel backs them out, then has some other sill responses for things like bouncing if you need it.

Vs only selected instances, using general collision boxes and what ever response you want.

I don't remember exactly 100% how they work, but per instance check, they are considerably slower with little control. THey are also prone to errors. This just multiplies with the more stuff you have going on.

As for yoyo, they said they will continue to keep it for legacy reasons and "backwards compatibility", but come GMS:2.0, its gone. I don't consider those few projects worth saving lol. BUT, yoyocompile probably strips it out if its never used.
 
Last edited:
N

NPT

Guest
I'm sorry but I just don't remember Mark interacting with the community as some in this topic suggests he did.

He posted announcements, occasional administrative things, became a little more active when new versions were released. Him commenting on programming was very rare. He was just too busy.

Regarding him being critical about using solid, again I don't agree with the alleged quotes being attributed to him. He used the solid feature in his tutorials and in his book the Game Maker's Apprentice.

He suggested it be used for stationary objects, that other objects should not penetrate.

Mark used in the Maze tutorial:
Next create three objects.
a. First make the wall object and give it the spr_wall sprite as image, name it
obj_wall and make it solid by checking the box labeled Solid. This will make it
impossible for other objects, in particular the person, to penetrate the wall. The wall
object does not do anything else....

The Catch the clown tutorial:
Instances of the wall object must be solid, that is, no other instances should be
allowed to penetrate them. To this end click on the box next to the Solid property
to enable it....

The Platform Game tutorial:
We create two objects. The block object is simply a solid object that has no events or actions. It simply sits there. The character object is a lot more complicated....

GameMaker's Apprentice:
Solid Blocks
Next we'll create a solid block that Pop can't destroy......
And many more.

Personally though, I would avoid it. It's like a lot of Novice features, it does an adequte quick and dirty job for novices, but once you get proficient at supplying your own collision events you can do a better job.
 

Roa

Member
I'm sorry but I just don't remember Mark interacting with the community as some in this topic suggests he did.

He posted announcements, occasional administrative things, became a little more active when new versions were released. Him commenting on programming was very rare. He was just too busy.

Regarding him being critical about using solid, again I don't agree with the alleged quotes being attributed to him. He used the solid feature in his tutorials and in his book the Game Maker's Apprentice.

He suggested it be used for stationary objects, that other objects should not penetrate.

Mark used in the Maze tutorial:
Next create three objects.
a. First make the wall object and give it the spr_wall sprite as image, name it
obj_wall and make it solid by checking the box labeled Solid. This will make it
impossible for other objects, in particular the person, to penetrate the wall. The wall
object does not do anything else....

The Catch the clown tutorial:
Instances of the wall object must be solid, that is, no other instances should be
allowed to penetrate them. To this end click on the box next to the Solid property
to enable it....

The Platform Game tutorial:
We create two objects. The block object is simply a solid object that has no events or actions. It simply sits there. The character object is a lot more complicated....

GameMaker's Apprentice:
Solid Blocks
Next we'll create a solid block that Pop can't destroy......
And many more.

Personally though, I would avoid it. It's like a lot of Novice features, it does an adequte quick and dirty job for novices, but once you get proficient at supplying your own collision events you can do a better job.
Every single one of those was while teaching drag and drop. At the end of thte GM apprentice, it completely drops for hard coded solutions and all of his other works never use it. We're talking catch the clown here and touching and exit through a maze, where collisions are not the fundimental aspect he is teaching. Having the solids was just something he suffered through to get people to the real ideas. Kinda hard to make a tut on clicking on the clown when over 80% of that would be writting a collision and bounce effect.

Its a hasty shortcut for simple test, thats it.
 
T

Tirous

Guest
Sure the solid-based collision system can be a tad slow, but i dont think its completely worthless. I still use it in my platformer projects, turning on/off the solidity of a object before testing it. It works, and in a lot of cases is good enough.

Its a mess, it could be improved considerably, but it gets the job done. (gamemaker in a nutshell ;D)
 
N

NPT

Guest
I'm not suggesting that Solid be used by anyone but for Novices.

The fact that those quotes are attributed with drag and drop is irrelevant. They demonstrate Overmars telling people (novices) to use Solid, this is completely incompatible with your claims.

Look, he never said anything like what you're claiming he did.

You can move the goal posts all you want, you're either mistaken or you made it up to give your original post undeserved authority.

They were, by marks own words, put in for rapid prototyping and not as a final solution.
This one was my favorite.
 

Roa

Member
I'm not suggesting that Solid be used by anyone but for Novices.

The fact that those quotes are attributed with drag and drop is irrelevant. They demonstrate Overmars telling people (novices) to use Solid, this is completely incompatible with your claims.

Look, he never said anything like what you're claiming he did.

You can move the goal posts all you want, you're either mistaken or you made it up to give your original post undeserved authority.
What type of mental gymnastic is that? I didn't move any goal post. You can not like a feature of a product and think it has negative sides effects, and still use it to get to the main point lol. He didn't use solids to teach solids. He used the solids system so that people could learn the basics without worrying and going into something that is obviously too advanced for users that have to drag and drop keyboard actions. How can you teach people things as simple as mouse clicks and adding points, when you have to focus on writing an entire collision engine? Its a bypass. Using it is not an endorsement. Come on dude. You're smarter than that.

I remember very clearly he made comments about how he highly advises not using solids or liking them, and that almost any custom solution was a better alternative.
 
There isn't anything wrong with solid. Most people like using custom variables for speed like hsp and vsp and like handling the collision response in their own way. The solid system handles collisions for you so you lose control of details. All you have to do is set speed and direction or hspeed/vspeed and the object moves automatically in the end of the step event. If there is a solid in the way, the object moves back to the xprevious/yprevious. You can fix things in the end step event and be perfectly fine using move_contact_solid but ideally movement and collision response should be done all at once imo. It's easier in the long run to avoid solid but it is perfectly fine to use it. You should make the game you want to make the way you want to make it.
 

Ninety

Member
NPT has sources for his claims. Roa doesn't, but says he definitely remembers very well. This is already turning ridiculous.

The bottom line is that Overmars's stance on solid is a little unclear. Overmars has had little to no interaction with the community since the early 2000s, and just about zero since YoYo purchased GM (feel free to correct me if I'm wrong). Statements he may or may not have made in 2005 have zero bearing on how users should use solid today. From what NPT posted, it's obvious Overmars clearly thought solid was a worthy tool for beginners, and it well may be, at least to teach basic concepts. I don't see how there's anything wrong with that. However that doesn't imply it has much value for intermediate and advanced devs.

I just don't get why programming advice given back in the days of GM5 should have much weight now, considering the kinds of games GM is used to make these days. Even if it comes from Overmars, as though quoting him automatically wins your argument. This topic is about whether solid is useful today. Endorsements of, or opposition to solid from 10 years ago shouldn't be the sole determining factor, and I really don't see why Overmars is still held up as this all-knowing GM god.
 
T

TimothyAllen

Guest
The solid feature is not bad and can be usefull... the solid feature when used with the collision event is usless. Just my opinion.
 

Roa

Member
There isn't anything wrong with solid. Most people like using custom variables for speed like hsp and vsp and like handling the collision response in their own way. The solid system handles collisions for you so you lose control of details. All you have to do is set speed and direction or hspeed/vspeed and the object moves automatically in the end of the step event. If there is a solid in the way, the object moves back to the xprevious/yprevious. You can fix things in the end step event and be perfectly fine using move_contact_solid but ideally movement and collision response should be done all at once imo. It's easier in the long run to avoid solid but it is perfectly fine to use it. You should make the game you want to make the way you want to make it.
Nothing wrong, expect when people try to use them, come here looking for answers, and then get told they have to redo their engine cause it wont work. Not much of an issue..out side getting stuck and not returning a collision...

NPT has sources for his claims. Roa doesn't, but says he definitely remembers very well. This is already turning ridiculous.

The bottom line is that Overmars's stance on solid is a little unclear. Overmars has had little to no interaction with the community since the early 2000s, and just about zero since YoYo purchased GM (feel free to correct me if I'm wrong). Statements he may or may not have made in 2005 have zero bearing on how users should use solid today. From what NPT posted, it's obvious Overmars clearly thought solid was a worthy tool for beginners, and it well may be, at least to teach basic concepts. I don't see how there's anything wrong with that. However that doesn't imply it has much value for intermediate and advanced devs.

I just don't get why programming advice given back in the days of GM5 should have much weight now, considering the kinds of games GM is used to make these days. Even if it comes from Overmars, as though quoting him automatically wins your argument. This topic is about whether solid is useful today. Endorsements of, or opposition to solid from 10 years ago shouldn't be the sole determining factor, and I really don't see why Overmars is still held up as this all-knowing GM god.
Wow, really?

NTP doesn't source anything. He points out he uses them in very early entry level tutorials. I also pointed out in the exact same book that he moves away from solids once he is past drag n drop and other books and projects he has made don't use it either. So they are both equally vague claims. The difference is mine actually follows some common sense of progression and has a simple explanation and the other is just a complete out of no where assertive assumption on something that can't even be measured.

Dude, that level and leap of logic in thinking is a total back flip. Thats like saying you endorse Macs over windows to everyone in a presentation, because your boss forced you to use his mac mini for a presentation vs bringing in the windows machine from your cubical you use everyday. He used the tool that got the presentation done, the main idea. Yeah, he uses solids. That doesn't prove he encourages their use lmao. To say otherwise is massive leap in assumptions. I mean, you might as well say he encourages drag n drop too. That's ridiculous.

I dont keep a personal log book of a guy I've never met from over half my life ago lol. I would like to believe and it would make sense that someone who programmed both solids and all the counter options to it would understand its limitations and be able to make an assertive opinion on it. Geez, why are people so bent on defending solids? There is nothing there to work with. Why would I lie about this? It's not like I need to invent extra reasons and emphasis on why solids are bad lmao. And yes, I very distinctly remember reference to it as "fast prototyping options" and not a real solution to the problem.
 
Last edited:

Ninety

Member
Geez, why are people so bent on defending solids?
Please read my post again. I'm disagreeing with NPT just as much as you.

From what NPT posted, it's obvious Overmars clearly thought solid was a worthy tool for beginners, and it well may be, at least to teach basic concepts. I don't see how there's anything wrong with that. However that doesn't imply it has much value for intermediate and advanced devs.
However that doesn't imply it has much value for intermediate and advanced devs.
 

RangerX

Member
Can you guys sell me some of your stuff? 'cause that seems to be good stuff.
"Solid" isn't good or bad or some magical stuff happening from I don't know where and sometimes working, sometimes making lylies sprouts from the ground.

"Solid" is just a built in variable. It's just a variable that some built in functions do use. It does no wrong, it does no good. You're simply using it or you don't. WTF really.
 

Ninety

Member
What claim did I make that you're disagreeing with?
That Overmars's stance on solids should have any bearing on how they're used. Although, now I'm not sure whether you were actually trying to argue that, or fact checking Roa. :p
 
N

NPT

Guest
That Overmars's stance on solids should have any bearing on how they're used. Although, now I'm not sure whether you were actually trying to argue that, or fact checking Roa. :p
I never made any claims about his stance on solids, that's purely Roa's domain. I just provided a lot of examples where he uses them which is completely inconsistent with Roa's claim.

I could have provided a lot more, I have Aprentice in both Phsical and PDF. He uses Solid all the time in many of the games. He never once states an opinion that even remotely supports Roa's claim. Go to the GMC search for "solid" posted by Overmars, nothing. Go to Twitter and google Mark's tweets for "Solid", nothing.

Him using Solid for beginner material and not intermediate or higher does not support Roa's claim's.

I can't prove he didn't say something, nobody can. But I can demonstrate that his using them is inconsistant with Roa's claims about what he said about them.
 
N

NPT

Guest
Can you guys sell me some of your stuff? 'cause that seems to be good stuff.
"Solid" isn't good or bad or some magical stuff happening from I don't know where and sometimes working, sometimes making lylies sprouts from the ground.

"Solid" is just a built in variable. It's just a variable that some built in functions do use. It does no wrong, it does no good. You're simply using it or you don't. WTF really.
Solid is more than just a built-in variable, it actually changes how collisions are handled.

If a collision occurs with a solid object and if there is a collision event, than the moving object will be placed back to it's previous position when a collison occurs. If there is no collision event ithan the solidity of the non-moving object has no impact.
 

RangerX

Member
So you're telling me that I can have 2 object, one moving into the other one (that would be solid) and just by putting a collision event with no code in it, my object would do stuff?
 
Nothing wrong, expect when people try to use them, come here looking for answers, and then get told they have to redo their engine cause it wont work. Not much of an issue..out side getting stuck and not returning a collision...
If user error was how every function and feature was judged, what do we have left? Anything? Yes it is simplified logic. Can a game be made with it? Absolutely. Should it be used? Depends on the game and programmer. I've made full platformers using it without bugs. If you have bugs, submit a ticket. Not hard.
You tested that? Care to share?
It does actually work. Try it yourself.
 
N

NPT

Guest
I don't believe that. If I comment out my collision code in my game (that does factor the "solid" flag), my character will go through the ground no sweat.
I don't care what you believe.

  1. Make a square object, mark it solid, place it in the room.
  2. Make a round object, place it directly to the right of the square put in its creation code direction=180 speed =1
  3. Run the game. The round object will pass right through the square object.
  4. Add to either of the two objects a collision event with the other. Put just a comment.
  5. Run the game, upon collision the round object will now stop.
  6. Uncheck the solid, run the game again. It will pass right through.

Go try it, instead of ranting abut you not believing it because you don't think it's how you think it behaves. It makes you look ridiculous.

*EDIT - my post contains RangerX's original post before he changed it.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
@Heat4Life : A lot of your questions can be solved by simply perusing the manual... :rolleyes:

Collisions: http://docs.yoyogames.com/source/dadiospice/000_using gamemaker/events/collision event.html
Also, if the object being collided with is solid, before the collision event code is run the instance is placed back at its previous position before the collision was registered, but only if there is a collision event defined.
Solid: http://docs.yoyogames.com/source/dadiospice/002_reference/objects and instances/instances/instance properties/solid.html
If solid is true, a special collision event is generated whereby the instance is returned automatically to the position it was at in the step previous to the collision. If it is set to false, all collisions must be dealt with through the collision event.
Behind the scenes, all solid really does is set the x/y position to xprevious/yprevious before continuing to resolve the collision event, which is why a collision event, even with only a comment will cause it to be triggered.

As for the great Mark Overmars debacle, I have to side with NPT on this one. In my 8 years as a member of this forum and 10 years following GM and its community, I can't remember Mark O. ever speaking out against using solid, nor any other part of GM. That just wasn't how he worked. His forum and online interactions with people were rare and he certainly never talked badly about any aspect of the program, as far as I can remember.

Now, OTHER people that have worked on GM have indeed spoken out against solid. Mike D. has often referred to it as "evil" and has been very vocal about how it shouldn't be used, for example a quick search of the old GMC turned up this:

http://gmc.yoyogames.com/index.php?showtopic=521756&view=findpost&p=3845748
GameMaker sidesteps the issues of interpenetration by simply moving back a step to before the collision happened, and this is rubbish. To do anything like this properly you need to be able to resolve the collision point and bounce correctly, and if you have many collisions inter-penetrating, GamemMaker will, and does, just fail. That said, it does okay for what it is... a very simple system that tries to help as best if can, but make no mistake, it's not good at handling solid objects.
He also wrote a tech blog about how inefficient using the solid functions is: http://www.yoyogames.com/blog/2

So, maybe someone is confusing Mike D for Mark O?

Anyway, the tl;dr here is that as long as you understand how it works and the limitations it imposes you can use solid and it will do the job just fine, but it's not the most efficient way of doing things.
 
A

Aura

Guest
Solid used for:-
-Preventing other objects that follow the player e.g. -Enemies- from getting inside the player but otherwise they will still outside the player.
That's a bad example of how solid instances can be useful. Solid instances are meant to be static. Try giving motion to a solid instance and you'll see issues arise yourself.

-They are the only method -I am think but unsure- that work with motion_add()
No.

You can use it like this:-
Code:
if(place_meeting(x,y,obj_solid)) then {
other.solid = true;
speed = 0;
} else {
other.solid = false;
}
That code does not make sense, as other has no meaning outside the with construction and the Collision event. If that code is to be put in a Collision event, place_meeting() serves no purpose at all. And in case you're confusing the function with the GML equivalent of the Collision event, you're wrong. Also, toggling on and off the solidity of an instance dynamically is another bad practice that you seem to promote there.
 

RangerX

Member
I don't care what you believe.

  1. Make a square object, mark it solid, place it in the room.
  2. Make a round object, place it directly to the right of the square put in its creation code direction=180 speed =1
  3. Run the game. The round object will pass right through the square object.
  4. Add to either of the two objects a collision event with the other. Put just a comment.
  5. Run the game, upon collision the round object will now stop.
  6. Uncheck the solid, run the game again. It will pass right through.

Go try it, instead of ranting abut you not believing it because you don't think it's how you think it behaves. It makes you look ridiculous.

*EDIT - my post contains RangerX's original post before he changed it.
Am not ranting. Not even being enthusiastic here. Its actually you who seems stingy and taking this personal way too much.
In the light of what Nocturne said though, I don't like an engine pulling "phantom code" as I would call it but apparently the case is so simple here that I am back my original opinion regarding the general reactions in this thread. By reading it, especially Roa's stuff, it was like GameMaker is witchcraft and all sort of "problems" and random 💩💩💩💩 happens.
 
Top