Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Suggestions and Feature Requests (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=21)
-   -   HTML5 Games (http://www.mysidiaadoptables.com/forum/showthread.php?t=4469)

Kyttias 04-30-2014 09:29 PM

HTML5 Games
 
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!)

IntoRain 05-01-2014 08:52 AM

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.


Quote:

Originally Posted by Kyttias (Post 29704)
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 Code:

$.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 Code:

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)).

Hall of Famer 05-02-2014 04:26 AM

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. ^^

Abronsyth 05-02-2014 01:01 PM

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

squiggler 05-05-2014 02:17 AM

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.

Ittermat 03-20-2016 04:10 PM

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)

FounderSim 03-21-2016 12:36 PM

I have a few available people can use as long as proper credit and link is giving somewhere on site.

You can check them out and download them here: http://gamemakersforums.com/resource.../javascript.4/
Every submission in this category is mine.

Tetris or Snake some people might like. If anyone got any other ideas for some little games, I might code them up for fun. =)

Ittermat 03-21-2016 12:43 PM

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?

FounderSim 03-21-2016 09:52 PM

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.

Kyttias 03-21-2016 10:38 PM

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.


All times are GMT -5. The time now is 03:36 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.