JavaScript - Website Games
I have a website and I am looking at putting a few quality games on it. I was thinking an online poker game, rpg, and a few others... I want a gooed mix of games put again I am not a gaming website. The main feature that I am trying to get is that when a customer of the site plays the games I would like them to earn credits. The customer at the end of the month with the most credits will receive a cash prize. Also maybe we could have a leaderboard or something too so that other customers can see that it is actually legit. If you have any resources thath you can think of or you know of something fairly close to what I am talking about please let me know.
Similar TutorialsI am going to be creating a few games (possibly up to 10) that are very basic javascript games. Most of them will be singleplayer, but 2 will be multiplayer. Could you guys tell me what you think the difficulty of making these will be? If they are too hard, they aren't really worth it. 1. balls fall and you try to avoid them. 2. tic tac toe multiplayer 3. something like "doodle jump" but where you move the keys around to move and you bounce off of platforms (would have to be randomly generated). sounds pretty difficult so i doubt ill do this one unless someone wants to help.. 4. 4 in a row multiplayer I will add more later. If you have any ideas for simple singleplayer games, please let me know! Thanks. i am making a web site for a flash games i have some games with .swf extensions and .exe extensions how ever i need to make the games be play online the .swf doing fine but with .exe i can't, so.... did or there is a code with activeX can do that? cuz' i don't know how i did or make work with microsoft virtual basic or c+ or class thing i take a look on this page http://www.codeproject.com/KB/cs/Cre...324#xx3536324x but i didn't do well help me please this so important for me.. please Not content with using Javascript for practical purposes, I decided to "engineer" and "physics engine" for a "game". Get ready for seconds of fun. Paste this bad boy into a new HTML file and hold on to your hats! Code: <!DOCTYPE HTML><html><head><style>#guy{position: absolute;width: 20px;height: 20px;background: #F00;}#playingArea{position: absolute;border: 1px solid black;border-bottom: 5px solid brown;width: 400px;height: 400px;margin: 50px;}</style><script type="text/javascript">var ground = 380;var guyX = 0;var guyY = 0;var guy;var timer = 0;var jumping = false;var jumper = 10;function render(){moveGuy();}function keyPress(e){if(!e)e = window.event;if(e.keyCode == 37 && guyX>0){guyX -= 4;guy.style.left = guyX+"px";}if(e.keyCode == 39 && guyX<380){guyX += 4;guy.style.left = guyX+"px";}if(e.keyCode == 38 && guyY>=ground){jumping = true;}if(jumping == true){guyY -= jumper;jumper--;guy.style.top = guyY+"px";if(guyY >= ground){jumper = 10;guyY = ground;jumping = false;}}}function moveGuy(){if(guyY < ground){guyY += 4;guy.style.top = guyY+"px";}}function start(){render();timer = setTimeout("start()",30);}function init(){guy = document.getElementById("guy");window.onkeypress = keyPress;start();}</script></head><body onload="init()"><div id="playingArea"><div id="guy"></div></div></body></html> Kidding aside, anyone here ever actually make any "games" in Javascript? Or know of any cool ones? ok i need a bit of advice.. I have a webpage and i want to put a section of another website on to my own website.. The Section i want to put on my website is on this page www.bebo.com/thegaadiscos and i only want to put the section with the comments on it... What i want is a bit like the face book section of this website http://www.alexandraburkeofficial.com/ How would this be done does anyone know.. I'm building a new website and I need to know where I can get a decent search engine script, a small commenting section and an easy to do login system. Thanks Hi guys, I want to add a big pic to my website for background, and the pic can change size with the displayer size. Can JavaScript do it? This is my website code. How can i make it? Thanks you! Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en"> <head> <title>Buy Cheap Jordans|Air Jordans Retro|Air force ones|Nike Dunks|gucci bags,bags wholesale</title> <link rel="icon" href="favicon.ico" mce_href="favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="favicon.ico" mce_href="favicon.ico" type="image/x-icon"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="keywords" content="nike air jordan shoes, zoom kobe shoes, nike dunk sb shoes, brand handbag" /> <meta name="description" content="Buy Cheap wholsale nike air jordan shoes, nike kobe shoes, dunk sb shoes, lv handbag, gucci shirts,online shop" /> <meta http-equiv="imagetoolbar" content="no" /> <base href="http://example.com/" /> <link rel="stylesheet" type="text/css" href="http://example.com/includes/templates/nike/css/stylesheet.css" /> <!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="http://example.com/includes/templates/nike/css/stylesheet_ie6.css" /><![endif]--> <script type="text/javascript" src="includes/templates/template_default/jscript/jscript_imagehover.js"></script> <script type="text/javascript" src="includes/templates/template_default/jscript/jscript_index.js"></script> </head> <body id="indexHomeBody"> <div id="mainWrapper"> <script type="text/javascript"> function help_display_block(id){ if(document.getElementById(id).style.display=='block'){ document.getElementById(id).style.display='none'; }else{ document.getElementById(id).style.display='block'; } } function help_display_none(id){ document.getElementById(id).style.display='none'; } </script> <div style="position:relative;"> <div onclick="help_display_block('help_d')" style="position: absolute; width:236px; height:35px;left:744px;top:70px;+top:66px;_top:68px "><img src="images/livetop.gif"/></div> <div id="help_d" style="position: absolute; width:236px; height:174px;left:744px;top:103px; +top:102px;background:url(images/livechatbg.gif) no-repeat left top; padding:10px; display:none;"><br /> <div style=" padding-left:10px;" > <A href="msnim:chat?contact=cheapshoesbag@aol.com" target=blank><img src="images/chat.gif" width="194" height="61" /></A><br /> <br /> <div style="padding-bottom:5px; font-weight:bolder"> E_mail:</div> <a href="mailto:cheapshoesbag@aol.com">cheapshoesbag@aol.com</a> <div style="padding-bottom:5px; font-weight:bolder"> MSN:</div> cheapshoesbag@hotmail.com</div> <div class="live_close" style="float:right; padding-right:20px" onclick="help_display_none('help_d')" ><img src="images/close.gif"/></div> </div> </div> <div id='key_wholesale'> Welcome! <a href="http://example.com/index.php?main_page=login">Log In</a> or <a href="http://example.com/index.php?main_page=create_account">Register</a> <!-- AddThis Button BEGIN --> <script type="text/JavaScript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> </div> <!--bof-header logo and navigation display--> <div class="wrap"> <a href="http://example.com/" id="hohologo" title="Welcome to our site!"> </a> <div> <h1 id="top_ueserinfo">nike air jordan shoes, zoom kobe shoes!</h1> <div id="toptab"> <ul> <li><a href="http://example.com/index.php?main_page=account" id="myAccount" class="hide" rel=nofollow><span>My Account</span></a> <!--[if lte IE 6]> <a href="#" id="myAccount"><span>My Account</span> <table><tr><td> <![endif]--> http://www.hellowallet.com The blue tabbed navigation that fills the page. Is that a jquery plugin or..? Hey all, I'm a total newbie in the JavaScript programming field, so please bear with me if I ask any ridiculously simple questions I am trying to make a study site for my university study group. What I'm trying to do is this: For a search term (say "Differential Equations"), find all pages in Wikipedia that match this term. Then, download all pages to local drive so that I and my friends can go over it later offline... (our study group does not have uninterrupted access to the internet). I tried this simple JavaScript code to get the searches: <html> <head> <script type="text/javascript"> function getpages() { var frm = document.getElementById("GetPages"); frm.submit(); } window.onload = getpages; </script> </head> <body> <center> <FORM method=GET action="http://www.google.com/search" name = "GetPages" id="GetPages"> <TABLE bgcolor="#FFFFFF"><tr><td> <INPUT TYPE=text name=q size=31 maxlength=255 value="site:wikipedia.org/ differential equations"> <INPUT TYPE=hidden name=hl value="en"> </td></tr></TABLE> </FORM> </center> </body> </html> It gives me the expected results. However, I'm not sure how to download the pages that the search returns. Also, Google returns only 10 search results per page by default - it would be nice to work around both these problems. I HAVE CHANGED THE LOCATION
I'm new to wordpress, I've just made a website and I want to make small modification: I want to remove the buttons in red. I thought it was CSS. But I've discovered that JS can't be overwritten by CSS so here I am. In firebug, I can see this: element.style { display: block; } When I change it to "display: none" buttons do disappear but I don't know in which file to find this sentence. A JS file is attached as txt. Can anybody give me a hand? This is the site: http://franciscourrea.com/sitio/ buttons by panchoskywalker, on Flickr Hey guys, I am new here, I have studied XHTML and CSS and will be studying JS next but I am now finishing up my very first site but need a script for a regular "form", can anyone tell me where i might be able to get such a script for free if possible please? The form in question is a simple "Mailing List" form with 6 entries, any help/links/leads will be appreciated.
I am building a website and on my homepage there is a small section where I want recent blogs to be posted. Of course I want a page for blogging also. Can anyone help me on how to do this? Thanks Hello. I finished building my website yesterday, but apparently it has a trojan on it. I don't understand how this could happen because I also have the website on godaddy and when I viewed that link- there was never a trojan. Right now were hosting the server on www.doteasy.com I do have an idea though, I think it might be because of a javascript I have on there in the index page - because I put it on so I could have a picture slideshow. Here are the two links to the site, if anyone would like to shed some light on this for me. Thanks. Here are the two websites: (both the same but different hosting companies) The one from doteasy.com has the trojan.... Doteasy.com: http://www.wmorinjr.com/Baba/index.html Godaddy.com: http://www.webdesignsbyapw.com/wayne/index.html How can I make a link or banner to be hidden after x clicks on it? And if possible to count only different IP clicks? Like if 30 users click on the banner and it is no longer shown in the site, unless I put some more clicks for it. Can you please help me, I will really appreciate this.
Hey there, so this is my first time using this website. I was wondering if anyone can help me resolve this problem. It is for my Website Development Class and I am going use this forum to help me understand the languages haha. But Anyways. My homework assignment I have to do is: Create a Web page named gpa.html that can be used to compute your grade point average given grades and hours for courses completed. The page should repeatedly prompt the user for course information, reading the course name, grade received, and credit hours for a particular course in a single dialog box. While the user is done inputting the information, it should display on the website like this: COURSE GRADE HOURS THL100 B+ 3 PHL107 A 3 ENG120 C+ 3 MTH245 A 4 CSC221 A 3 Total grade points = 58 Number of hours = 16 GPA = 3.625 So my problem is that when I tried to display it outside the while loop it only displays "NaN". Please Help and Thanks! Here is my code: <!DOCTYPE html> <html> <!-- gpa.html--> <head> </head> <body> <script type= "text/javascript"> document.write("Course - Grade - Credit Hours"); document.write("<br>"); var third; var total = 0; var total2 = 0; var total4 = 0; var t_hrs = 0; var user; while (user != "") { user = prompt("Hello User. Enter course name, grade, & credit hours (i.e CS3240 B+ 3), or click OK with no data to terminate."); var uInput = user.split(" "); document.write(uInput); document.write("<br>"); third = uInput[2]; t_hrs = parseInt(t_hrs) + parseInt(uInput[2]); if (uInput[1] == "A"){ letter2point = 4.0; } else if (uInput[1] == "B+"){ letter2point = 3.5; } else if (uInput[1] == "B"){ letter2point = 3.0;} else if (uInput[1] == "C+"){ letter2point = 2.5; } else if (uInput[1] == "C"){ letter2point = 2.0; } else if (uInput[1] == "D"){ letter2point = 1.0; } else if (uInput[1] == "F"){ letter2point = 0.0; } total = letter2point * third; total2 = total2 + total; total4 = total2 / t_hrs; } document.write(total4) </script> </body> </html> Reply With Quote 01-29-2015, 02:47 AM #2 felgall View Profile View Forum Posts Visit Homepage Master Coder Join Date Sep 2005 Location Sydney, Australia Posts 6,745 Thanks 0 Thanked 666 Times in 655 Posts If that antiquated JavaScript is what your course is teaching then I feel sorry for you. Just about every statement that you have there is listed on one of the "Bad Bits" pages of my Introducing JavaScript web site where it gives the reasons for not using those 20 year old code constructs in modern web browsers (which means IE5 and any browser more recent than that). A couple of suggestions to get you started. 1. The second document.write is not complete so everything from there onward is broken. 2. To convert to a number use Number((t_hrs) or (+t_hrs). If you must use parseint then always include the second parameter to specify the number base you are converting from parseInt(t_hrs, 10) - with regard to t_hrs it is a number to start with so doesn't even need this conversion. 3. Use === and !== instead of == and != as the two character versions don't always give the expected result where the three character versions always do. Hello, I am very new to javascript, and I'm having a hard time finding a way to easily add some chat code to our website without manually adding it to every page. Here's the deal: I need to add this code to every page of our website: Code: <div id="cihfi9" style="z-index:100;position:absolute;"></div><div id="schfi9" style="display:inline;float:right;"></div><div id="sdhfi9" style="display:none"></div><script type="text/javascript">var sehfi9=document.createElement("script");sehfi9.type="text/javascript";var sehfi9s=(location.protocol.indexOf("https")==0?"https://secure.providesupport.com/image":"http://image.providesupport.com")+"/js/mrcuser/safe-standard.js?ps_h=hfi9\u0026ps_t="+new Date().getTime();setTimeout("sehfi9.src=sehfi9s;document.getElementById('sdhfi9').appendChild(sehfi9)",1)</script><noscript><div style="display:inline"><a href="http://www.providesupport.com?messenger=mrcuser">Live Support</a></div></noscript> I would like the chat icon to appear at the top of each page next to our main menu links. Our main menu links are called from one javascript file. I would like to figure out a way to add this code to the javascript file, so I only have to add it once. The javascript file only has one line of code: document.write(all of our main menu links). Is there a way to add the chat code to the main menu javascript file so that the chat icon will appear on every page, or is this impossible? Thanks for your help! Hello Everybody, As all coders have no time I will bring it up directly. 1- We are launching a new website at a small ceremony. 2- The website will have initial page that has a button says "Launch Me". 3- When the official presses the Launch Me button we need it to rename the index file with the official page for the full website we created. We thought about coding a batch file that will have the FTP details and commands to rename the index file with the Official page, but the problem here is that we don't know how to create such a button that will execute the .bat file on the server side. All what we need is a button or any way that will rename the index file with the official one by pressing a button. Any tips people? Thanks in-advance. Hello Guys, Any one help me coding of java script coding for watch implementation in our website..... Thanks in Advance i look everywhere for html and Java snip its and all seem to be different, can somebody please tell me how to code something like this, also can the code be easy ish for example. if show is 5pm till 6pm an image appears if show is 6pm till 7pm an image appears i know this is possible but there are so many codes out there, thank you for your help Hey, Is there any javascript that i can insert in my website pages, that will turn it upside down? |