HTML5 Games

Forum
Last Post
Threads / Messages

Kyttias

Super Moderator
Super Mod
Joined
Jan 26, 2014
Messages
849
Points
18
Mysidian Dollar
58,199
Quickly replacing Flash, HTML5 canvas games are becoming popular and don't require any plugins to be downloaded or updated to jump right in. I've placed this thread in 'suggestions and feature requests' but I wanted to pose an open question to the community:

What sorts of minigames would be fun on YOUR site?

While some of us are dying for a battle system, the rest of us may be content with minigames, similar to the ones found on Neopets, etc. Usually these are puzzle or arcade games - clones of existing addictive games. Tetris, Snake, Asteroids - classics, but also more recent creations like Bejeweled.

I'm asking this because I'd really like to start working on a few simple games that are just clones of the sorts of games we already expect to idly play on our phones, etc. Once I've got a game prototype made, I'd like:

- The score to be integrated with Mysidia to deliver a payout in your site's currency.
- From there, optionally, a high score board for bragging rights.
- And in the final round of development, accomplishment badges that could be displayed on the user's profile.
- Other things could potentially be done - obtaining an item or pet (egg) directly without having to jot down a promo code as a reward for a particularly hard to achieve accomplishment.

There are so many types of commonly cloned games I can't begin to list them all - sliding puzzle, jigsaw puzzle, tower defense, higher or lower, space lander (thrust), brick break, tetris, asteroids, space invaders, memory matching (concentration), match 3 (candy crush, bejeweled), sokoban (chip's challenge), bubble shooter, mine sweeper, snake, jezzball, pipedream.

One thing I'd like to point out is that none of the above have a particularly difficult A.I. - these are not platformer jumping games, nor are they mazes. They also aren't complex creations, ala pinball or cards. Some will take more research than others. (And some can be made much more complex than they are at the base level. A basic sokoban game, as an example from above, is way less difficult than Chip's Challenge - which had a variety of tiles that burned you, warped you, slid you around, etc.)

What I'd like is a small discussion on games and one or two simple that would be perfect for your site (and what sort of art assets you'd imagine they'd have, theme-inspired, y'know?). I don't have the energy to devote all my time to helping everyone, but I'll gladly share my findings on whatever I do create.

From those more in the know on Mysidia, some advice for currency integration would be nice. (I don't want 'give users a promo code for an item they can sell' as an answer.) I know I can pass a number as a variable from Javascript to PHP, it's the PHP code required to add that to the current user's current currency balance that I'd like some help with. So once I already have an amount I want to add to a user's currency balance held in a variable, how would I go about doing that?

(And this thread can always be moved elsewhere, also. But games are a feature many of us would like to have - and though probably not something that can be directly added to the script - if documentation can be provided on how integration can be handled, that would be amazing!)
 
Last edited:
That's an amazing idea Kyttias! I have no idea about how to use HTML5 but I have made some games and I can help out if needed. I did a maze game in java including a manually-made maze and randomly generated mazes of different sizes, I can provide the code (it's a mess though :D). I will also be making a platformer game, no idea how it will end up, and I can also share that.

I remember that a few years ago when those card collection games were somewhat famous, most of the games available were memory games, sliding puzzles and jigsaw puzzles and they gave you rewards at the end, their code is somewhere around, if you need ideas for those.


From those more in the know on Mysidia, some advice for currency integration would be nice. (I don't want 'give users a promo code for an item they can sell' as an answer.) I know I can pass a number as a variable from Javascript to PHP, it's the PHP code required to add that to the current user's current currency balance that I'd like some help with. So once I already have an amount I want to add to a user's currency balance held in a variable, how would I go about doing that?

The php part, I implemented AJAX's post method for user registration. It's black magic, basically. I don't remember it well, but basically

PHP:
$.post('/register/checkusername', {username:input},function(result) {
							if(result[0] != '0'){
								$('.divUsername').html('<i>Username is empty or is already being used:</i>' + input)
							}
							else
							{
								$('.divUsername').html('<i>Username can be used:</i>' + input)
							}
						});

This is the ajax I used in the registerview.php. I'm sending the input and receiving the result. My username checking function is in the register.php file in the checkusername function, that's why I link to /register/checkusername. The result is actually the full php page including the result echo'd that I want, I have no idea why. But that's why I use result[0]

This is the checkusername function:

PHP:
public function checkusername(){
	$mysidia = Registry::get("mysidia");
	if($mysidia->input->post("username") == NULL)
	{
		throw new NoPermissionException("You specified an invalid action that cannot be completed.");
	}
		$document = $mysidia->frame->getDocument();	
		$document->setTitle("error");
		$username = $mysidia->input->post('username');
		$count = $mysidia->db->select("users",array("uid"),"username = '{$username}' LIMIT 1")->rowCount();
		echo $count;
	}

I sent input as username.

What I *think* you need to do is create a function in a file that receives the money and adds it to user's cash (mysidia->user->changecash(moneyToAdd)).
 
Last edited:
I like it too, very interesting idea. It may be a bit tricky to integrate the game with this script, but its totally doable. I guess IntoRain already has some ideas in her mind, good luck with that. If there are technical problems involved with the way the script works, lemme know. ^^
 
I've actually been thinking on this for a while...of course I have too much on my plate to be dealing with coding or art now, but later on in life (when it's not Finals season) I'll be doing more research on this...I know a lot of us in the Mys community are dying for a way to incorporate mini-games and earning currency into our sites (me included).

Not a helpful post, I know, but just wanted to show my support and also mention that I'll be looking more into this myself...of course I have a really shaky understanding of PHP so I may not be of much use for a while XD
 
Adding my love, even if I can't add my support! :happycbig:
One game I absolutely love is Bridges. I like puzzle games like that. Bejeweled and brick break are two big ones I will play all day to the detriment of all else. :ohnoes: Also fun for the kids is a coloring 'game' with a basic paint bucket function (example). Not sure how feasible that one would be.
 
I know this is an old thread! I just wanna say I'd like to see more games for the mysidia script! especially ones we can edit the images on and things- (if possible)
 
The ones in the list are ones I'd like to see- especially the match 3 game, block break, bubblepop, tetris and so on... XD

I also wanna eventually add A number guessing game, and a coin flip game to my site...and maybe slots and stuff too..

but do we know how to implement so the scores will give points/prizes?
 
You would have to talk more to @IntoRain about that. In the game over area of the JavaScript code for the games you would need to send the score by a ajax request to a php file and update points/prizes based on what you want to give in the php file.
 
I've already managed to do this with my higher or lower game. I bought some source code of a game from CodeCanyon and plan on hooking it up to my game whenever I've got the time (it was ~$13). Eventually I'll have something to report, but it'll be a while.
 
Every "game" would need to either

A) follow the same specific "Send Score" design
B) every game would need to be edited to follow the same "Send Score" design.


The PHP part for score could be the same base that could work with every HTML5 game, but EVERY game would need to follow the same pattern of sending the score to the PHP file.

Either way, A or B still needs to be done.
 
More or less, yeah. Some games are simple enough to follow standard, others may need something more complex... but once you've done it once, it shouldn't be hard to edit (if you know what you're doing). My current system just kind of sends a 1:1 score to currency, so if you earn 1000 points you get 1000 currency... other games may different and need to convert the score to a proper amount of currency. And it all could really use some better security.

Anti-cheating mechanisms are important and the more unique it is for each game, the better. Checking if a score is even possible is important.
 
More or less, yeah. Some games are simple enough to follow standard, others may need something more complex... but once you've done it once, it shouldn't be hard to edit (if you know what you're doing). My current system just kind of sends a 1:1 score to currency, so if you earn 1000 points you get 1000 currency... other games may different and need to convert the score to a proper amount of currency. And it all could really use some better security.

Anti-cheating mechanisms are important and the more unique it is for each game, the better. Checking if a score is even possible is important.


Anti-cheating mechanisms are very important. That will be the hardest part itself. Every game would require its own anti-cheat file/code. Anti-cheating wouldn't really be needed at first. The more popular these types of systems are the more it is trying to be exploited. I believe in time/score kind of anti-cheating system most of the time.

Ex: Tetris
If you submitted a score with 73 lines cleared in 40 seconds. You a Tetris code. j/k. CHEATER!
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,274
Messages
33,114
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top