Depends on what search engine you are targeting.. Each one weighs things differently..
Since Google now seems to be the biggest I'll give you a lil in sight...
Good/Strict HTML always helps, but not necessary...
Title Tag, Description and keywords are used to focus your page and what it is about.
ALT tags and wording in the page that references the title tag, description and keywords helps a great deal..
That is how most search engines work.. Now you have Google and there Page Rank...
Google uses the above but gives a greater weight to your page (ie shows it closer to the top of the list) by how many sites link to you that contain similar content. I, nor does anyone, have the exact formula for this as it's Google trade secret but here's sorta a general idea...
You have a site that is a racing game...
A site that deals with racing links to your game, you get +1
A site that deals with online games links to your game, you get +1
A site that deals with say a list of online racing games you would get +2
Google looks at the content of the page that is linked to yours and gives you more "points" if the page linking to yours is of a similar nature to yours.
Google also likes pages that change a lot

This is why I always have a little "notices" box on the front page that says what is going on in the game (ie Player X attacked Player Y and won).. Every time the google bot visits my site the site has information that has changed and thus I get a better placing then say a page that is always the same...
Getting the basics done for your page will get you a good ranking, tweaking those pages though to get a top ranking is something that takes a LOT of time and patience...