• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Rezkon

Members
  • Content count

    17
  • Joined

  • Last visited

Community Reputation

110 Neutral

About Rezkon

  • Rank
    Member
  1. As i think i fixed the error being canvas missed <canvas id="pongGame" And then Uncaught ReferenceError: onKeyDown is not defined
  2. Well it seems all the CSS is fine in the code, centered; and that :S I cant see a reason it wouldnt be
  3. So i tried running it with JSbin and it seems it stops around where the CSS Ends and doesnt really reach the script at all, anyone see a reason why?
  4. <!DOCTYPE html> <html> <style type="text/css"> /*This block gives the canvas a centered element*/ #pongGame { background:url(http://www.allstate.com/resources/Allstate/images/ni/NI-LinkedIm-Banner.jpg); background-size: 75%; background-repeat:no-repeat; background-position:center; border:1px solid #1666AF; } /*This block centers the contiant of the page*/ #container { position: fixed; top: 50%; left: 50%; ; margin-top: -275px; text-align: center; } /*This is the font for the scoreboard and text*/ #Score { margin-left: 500px; font-family: 'Rambla', sans-serif; font-size:28px; color: #717073; border: 2px solid #1666AF; margin-bottom: 5px; } /*This block sets the color text of the score board*/ #playerScore { color: #EE3424; } #compScore { color: #EE8722; } </style> <meta charset="utf-8" /> <link href="http://fonts.googleapis.com/css?family=Rambla:700" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> </head> <body> <div id="container"> <div id="Score"> You: <span id="playerScore">0</span> <span style="color: #6db33f;"><b>//</b></span> Computer: <span id="compScore">0</span> </div> <canvas width="800" height="500"> Your browser does not support HTML5 </canvas> </div> <script> $(document).ready(function() { //Global Variables var directionX; var directionY; //Stage var canvas; var ctx; //delcaring the context of the element var WIDTH; //Width of the canvas element var HEIGHT;//this will be the height of the cnavas element //ball var x;//Postion of X-Ball var y;//Postion of Y-Ball var ballRadius = 10; //This is the radius of the ball (pxiels) //Paddles var PaddleHeight = 70;/*This displays the height of paddles*/ var PaddleWidth = 10;//Displays width of paddles// var playerPaddle; //this the variable of the player paddle// var playerPaddleColour = "#EE3424";//Delcares the paddle to being white aka colour// var compPaddle; //Same as players expecet COMP// var compPaddleColour = "EE8722";//this is the colour of the computers paddle (orange) //attach event listeners $(document).keydown(onKeyDown); $(document).keyup(onKeyUp); //flags var upPressed = false; var downPressed = false; //interval variable var refreshStage; //set upPressed or downPressed if up or down are pressed// function onKeyDown(evt) { if (evt.keyCode === 38) { upPressed = true; } else if (evt.keyCode === 40) { downPressed = true; } } //unset upPressed or downPressed if the up or down are let go function onKeyUp(evt) { if (evt.keyCode === 38) { upPressed = true; } else if (evt.KeyCode === 40) { downPressed = false; } } function init() { //get the canvas element canvas = $('#pongGame')[0]; //get the context of the element ctx = canvas.getContext("2d"); //set our width and height variables equal to the width //and height of the canvas element WIDTH = canvas.width; HEIGHT = canvas.height; //set the starting height of the paddles to the center //of the y-axis playerPaddle = (HEIGHT / 2) - (PaddleHeight/2); compPaddle = (HEIGHT/ 2) - (PaddleHeight/2); //set the x and y values for where the ball will start //in this case the center of the canvas x = 400; y = 250; // Direction of the Ball Via X,Y directionX = 4; directionY = 6; //This Function clears the stage below every 100th of //a second (10ms) refreshStage = setInterval(drawGame, 10); //this function brings it white function clearStage() { ctx.clearRect(0,0,WIDTH, HEIGHT); } } //This function Draw the Game Stage function drawGame() { //Controls the Direction again// x += directionX; y += directionY; //First wipe the old frame clearStage(); //draw the sidelines drawSideLines(); //Draw the ball drawBall(); //check to see if the downPressed flag equals true if (downPressed === true) { //make sure there is room for the paddle to move further down if(playerPaddle + PaddleHeight + 20 <= HEIGHT) //sets the postion of the paddle to move further down //Draw the Player paddle, passing variables defined above drawPaddle(0,playerPaddle,PaddleWidth,PaddleHeight,playerPaddleColour); //draw the comp paddle, passing variables defined above drawPaddle(WIDTH - 10,comPaddle,PaddleWidth,PaddleHeight,compPaddleColour); } //this is a function to draw the side lines// function drawSideLines() { ctx.beginPath(); ctx.rect(0,0,WIDTH,15); ctx.closePath(); ctx.fillStyle="#1666AF"; ctx.fill(); ctx.beginPath(); ctx.rect(0,HEIGHT - 15,WIDTH,15); ctx.closePath(); ctx.fillStyle="#1666AF"; ctx.fill(); } //This is drawing the ball, simples!// function drawBall() { ctx.beginPath(); ctx.arc(x,y, ballRadius,0,Math.PI*2, true); ctx.closePath(); ctx.fillStyle="6DB33F"; ctx.fill(); } //This draws the paddle// function drawPaddle(xaxis,yaxis,pwidth,pheight,pcolour) { ctx.beginPath(); ctx.rect(xaxis,yaxis,pwidth,pheight); ctx.closePath(); ctx.fillStyle=pcolour; ctx.fill(); //call the init function init(); } } }); </script> </body> </html> So far ive tried to fix my capitalization, tryed to put them in the right tags hoping that it would run via that, but nothing atm Sometimes a blue background will show up but its not very consistent,
  5. I think its because my script isnt with in the <body> Tags. Tried switching some things up but nothing seemed to fix anything, i just get the scoreboard there isnt any errors in NetBeans, so im not sure atm.
  6. Just tried and i got a error   Uncaught ReferenceError: $ is not defined index.html:3 Resource interpreted as Font but transferred with MIME type font/woff: "http://themes.googleusercontent.com/static/fonts/rambla/v1/kIZPeiOLKnKdd6L5mB1Cnz8E0i7KZn-EPnyo3HZu7kw.woff".
  7.   He can't make pong. You expect him to be able to run Linux? Go buy Windows 8. It's cheap. The hardware requirements are low. And really you have no excuse not to. Especially if you actually want to program something.   I think he is a SHE!. Anyways, IMO Buy windows 7 from ebay or something or just buy the serial key, download it and then put it in your version BOOM LEGIT Windows, if your pc is that old it cant even update to new windows.. you should really switch to linux or something,
  8. Thanks man, some of the errors were simple as Missing ; or == should be === but the issue im having is nothing is showing up when i run it on chrome or firefox, just a Scoreboard :\ Im not quiet sure why though, it seems like the code is correct i might have some of it in the wrong place though
  9. ok so im working on a pong game and i dont know many good programming practice's, placements, and that which im trying to learn now this is a draft of the script im trying to use uncomplete so id like someone even proof-read it, confirm if its a bad or a simple error The File is the code im using im still learning alot but i play to make pong then snake then more of those "Classic" Games to get a idea of programming games Edit: File wont attach, ill post script here   <script> $(document).ready(function() { { //Global Variables //Stage var canvas; var ctx; //delcaring the context of the element var WIDTH; //Width of the canvas element var HEIGHT;//this will be the height of the cnavas element //ball var x;//Postion of X-Ball var y;//Postion of Y-Ball var ballRadius = 10; //This is the radius of the ball (pxiels) //Paddles var paddleHeight = 70;/*This displays the height of paddles*/ var paddleWidth = 10;//Displays width of paddles// var playerPaddle; //this the variable of the player paddle// var playerPaddleColour = "#EE3424";//Delcares the paddle to being white aka colour// var compPaddle; //Same as players expecet COMP// var compPaddleColour = "EE8722";//this is the colour of the computers paddle (orange) //attach event listeners $(document).keydown(onKeyDown); $(document).keyup(onKeyUp); //flags var upPressed = false; var downPressed = false; //interval variable var refreshStage; //set upPressed or downPressed if up or down are pressed// function onKeyDown(evt) { if (evt.keyCode == 38) { upPressed = true; } else if (evt.keyCode == 40) { downPressed = true; } } //unset upPressed or downPressed if the up or down are let go function onKeyUp(evt) { if (evt.keyCode == 38) { upPressed = true; } else if (evt.KeyCode == 40) { downPressed = false; } } function clearStage() { ctx.clearRect(0,0,WIDTH,HEIGHT); } init(); }; function init() { //get the canvas element canvas = $('#pongGame')[0]; //get the context of the element ctx = canvas.getContext("2d"); //set our width and height variables equal to the width //and height of the canvas element WIDTH = canvas.width; HEIGHT = canvas.height; //set the starting height of the paddles to the center //of the y-axis playerPaddle = (HEIGHT / 2) - (paddleHeight/2); compPaddle = (HEIGHT/ 2) - (paddleHeight/2); //set the x and y values for where the ball will start //in this case the center of the canvas x = 400; y = 250; //This Function clears the stage below every 100th of //a second (10ms) refreshStage = setInterval(drawGame, 10); //This function Draw the Game Stage function drawGame() { //First wipe the old frame clearStage(); //draw the sidelines drawSideLines(); //Draw the ball drawBall(); //check to see if the downPressed flag equals true if (downPressed == true) { //make sure there is room for the paddle to move further down if(playerPaddle + paddleHeight + 20 <= HEIGHT) { //set the new postition of the playerPaddle down 5 pixels playerPaddle +=5; } } //check to see if the UpPressed flag equals true// else if (upPressed == true) { //make sure there is room for the paddle to move up if(playerPaddle - 20 >= 0) { //set the new postion of the paddle up 5 pxs playerPaddle -= 5; } } } //Draw the Player paddle, passing variables defined above drawPaddle(0,playerPaddle,paddleWidth,PaddleHeight,playerPaddleColour); //draw the comp paddle, passing variables defined above drawPaddle(WIDTH - 10,comPaddle,PaddleWidth,paddleHeight,compPaddleColour); } //this is a function to draw the side lines// function drawSideLines() { ctx.beginPath(); ctx.rect(0,0,WIDTH,15); ctx.closePath(); ctx.fillStyle="#1666AF"; ctx.fill(); ctx.beginPath(); ctx.rect(0,HEIGHT - 15,WIDTH,15); ctx.closePath(); ctx.fillStyle="#1666AF"; ctx.fill(); } //This is drawing the ball, simples!// function drawBall() { ctx.beginPath(); ctx.arc(x,y, ballRadius,0,Math.PI*2, true); ctx.closePath(); ctx.fillStyle="6DB33F"; ctx.fill(); } //This draws the paddle// function drawPaddle(xaxis,yaxis,pwidth,pheight,pcolour) { ctx.beginPath(); ctx.rect(xaxis,yaxis,pwidth,pheight); ctx.closePath(); ctx.fillStyle=pcolour; ctx.fill(); } </script> <style type="text/css"> /*This block gives the canvas a centered element*/ #pongGame { background:url(http://www.allstate.com/resources/Allstate/images/ni/NI-LinkedIm-Banner.jpg); background-size: 75%; background-repeat:no-repeat; background-position:center; border:1px solid #1666AF; } /*This block centers the contiant of the page*/ #container { position: fixed; top: 50%; left: 50%; ; margin-top: -275px; text-align: center; } /*This is the font for the scoreboard and text*/ #Score { margin-left: 500px; font-family: 'Rambla', sans-serif; font-size:28px; color: #717073; border: 2px solid #1666AF; margin-bottom: 5px; } /*This block sets the color text of the score board*/ #playerScore { color: #EE3424; } #compScore { color: #EE8722; } </style> <link href="http://fonts.googleapis.com/css?family=Rambla:700" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <div id="container"> <div id="Score"> You: <span id="playerScore">0</span> <span style="color: #6db33f;"><b>//</b></span> Computer: <span id="compScore">0</span> </div> <canvas width="800" height="500"> Your browser does not support HTML5 </canvas> </div>
  10. No. You will end up making errors. You should learn a language first, but you will run into issues while making a game. There's no way to guard yourself against that before you start. Dig into the one of the languages you listed, that you find most comfortable, and then get back to making games when you're feeling adept with making text based applications.   Sure, you could go with javascript too. You could do a browser based game. But first, start. Im talking in the sense that because i dont understand a language fixing simple bugs or that would be a massive thing due to what i know isnt enough, i might go with javascript for a bit considering im about to take up a programming course for studying, so i think i should grasp them then make a game with what i learn at school?     Yeah, that sounds like an idea. Or, if you find that you're really interested in learning to program, try making games in your spare time. What I meant is that whatever you've got to work with should be sufficient to get started. Avoid procrastination, even if you're convinced you lack some important skills. As long as you pick small, simple projects, and as long as it's "just" a hobby, you'll benefit from the practice. You start working with javascript now, and you'll be ahead of your class when it's in session.   Im not quiet sure if i should stick with unity as a engine and just fiddle with it, or try to use a simpler engine for a 2d game and slowly progress with it, but im kinda confused because the java i know is basic. So should i brush up my java skills for a while before even attempting? Edit: i think im going to start with basic basic games like PONG, and that to get a grasp then edit some of it and change it around, and keep doing that till i feel im good with making my own game.
  11. Ok so im using Unity3D with this tutorial [url]http://www.rocket5studios.com/tutorials/make-a-2d-game-with-unity3d-using-only-free-tools-part-2/[/url] Now ive done the sprites and all that but i only get some werid as looking pink box, so im not sure what do or how to progress from here i dont have the slightest clue so if anyone would care to help would be great :D
  12. No. You will end up making errors. You should learn a language first, but you will run into issues while making a game. There's no way to guard yourself against that before you start. Dig into the one of the languages you listed, that you find most comfortable, and then get back to making games when you're feeling adept with making text based applications.   Sure, you could go with javascript too. You could do a browser based game. But first, start. Im talking in the sense that because i dont understand a language fixing simple bugs or that would be a massive thing due to what i know isnt enough, i might go with javascript for a bit considering im about to take up a programming course for studying, so i think i should grasp them then make a game with what i learn at school?  
  13. i understand what youve saying ive been following tutorials and stuff and somewhere something happends and it causes it to mess up being like the spite not showing or running or anything expect a pink thing, i guess i should learn more basic java script so i know how to fix those errors
  14. Fair enough, what would you say is the best laguage to start with for the type of game i want to achive.
  15. So i should learn all this stuff, worry about the programming aspect later :)? Which would be great considering im doing a programming course in a couple of weeks so id have a better idea Is there any engines, software you would advise i should try?