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

rubsnick

Members
  • Content count

    96
  • Joined

  • Last visited

Community Reputation

106 Neutral

About rubsnick

  • Rank
    Member
  1. Thanks everyone for your responses I've been working on it for a while and I just cannot seem to get past my problem. He stays up in the air regardless of what I do. :/ Here is my code What the hell am I doing wrong... [source lang="java"] if(Gdx.input.isKeyPressed(Keys.SPACE)&&man.y<=150&&AllowJump==true) { stateTime += Gdx.graphics.getDeltaTime(); // #15 currentFrame = walkAnimation.getKeyFrame(stateTime, true); man.y += 450 * Gdx.graphics.getDeltaTime(); if(man.y>150) { AllowJump=false; } } //This is my Release if(!Gdx.input.isKeyPressed(Keys.SPACE)) { if(man.y>=50) { man.y -= 350 * Gdx.graphics.getDeltaTime(); } if(man.y<=50) { AllowJump=true; } }[/source]
  2. [quote name='America Freeman' timestamp='1355173776' post='5009199'] You could create a bool where jumping only works if it's false. Set it to true once they reach the 50 pixel limit, and then reset it back to false when they're touching the ground again. Does that make sense? [/quote] Yes it makes sense, that would actually work quite nicely. I have no idea why I didn't think of it any sooner.
  3. [quote name='Steve_Segreto' timestamp='1355172729' post='5009193'] You might have to use some math. It won't be as complex as a physics engine, so the code will still be efficient. Basically, define a number of pixels per frame for gravity, like -20. Then apply this to your character's y-position each frame, clamping to the current height of the platform he is standing on (so he doesn't sink through the ground). Each time they press jump button add a positive number of pixels per frame to counteract gravity. Like +30 per jump button press. Manage the height of the character so it doesn't go over +50 pixels above the ground and you've got it! [/quote] That's exactly how I emplemented it. but If I keep the button pressed he never goes down. My gravity get cancelled out.
  4. I sort of cheated in my Physics Department I want to make my Code Efficient. I don't want it to do any complex physica algorithms since I"m developing the game for a Cell Phone and want it to work on the weakest ones avalible. So thus I cheated on my physics. When you press the jump button he jumps and he has a limit of 50pixels. He won't go past 50 pixels. Which is great so no matter how long the button is pressed he won't go past his boundry. The main problem I'm having is even after the button is pressed he will simply just float. He reaches the limit but only floats. I want my character to act like sonic. The longer the press the higher he goes but once he reachers his peak I want him to fall back down. I just don't know how to bring him down. I tried to check if he was at 50px subtract it until 0 but it only does it once before he goes back up (thanks to the game loop). So I don't really know how to time the input out or what would the best course of action be.
  5. So I follow this tutorial get everything set up and working and follow it to the letter. Test the desktop version and it works. Everything is just peachy and fine. I then try out the android version of it. Bam it won't start instantly force closes. I decided to start again from scratch maybe I missed something something didn't work. This time I just skip and try to compile the default project. Lo Behold it works display the default thing in both places. I think awesome to myself, so I code what I need to code just show a simple .png with some looping music. Compile it on Desktop it works. Great I think to myself nice now lets try android. I try the android version and it won't work. I tried via emulator and via my phone. No dice. Nothing it just shows me the default project that was compiled. So I think to myself WTF? I deleted the compiled .apk and try to run it again. Same thing happends. I'm truly at a loss at to what I need to be doing. Here is the link to the tutorial [url="http://code.google.com/p/libgdx/wiki/SimpleApp"]http://code.google.c.../wiki/SimpleApp[/url] I'm using Eclipse Juno with the latest version of libgdx and I tried every single target version messing with the androind manifest and using various androind emulators with different OS versions. So I'm truly at a loss as to what i"m going to do or what the hell the problem might be. EDIT: I discovered the problem is. Any Texture must be in the power of two. so instead of 48 I used 64x64 and everything worked just fine.
  6. http://pastebin.com/i4pG9N5b Alright that's my new Code, I managed to learn some stuff and now whenever I click it it changes background, It's pretty awesome... Now I"m over the hurdle and no longer need help. Thanks man tough.
  7. This is my code so far....[url="http://pastebin.com/LxmSuMe8"]http://pastebin.com/LxmSuMe8[/url] [img]http://a7.sphotos.ak.fbcdn.net/hphotos-ak-prn1/s720x720/534458_393227180701838_100000436774205_1280431_541445092_n.jpg[/img] I have the mouse pointer working so far and all that jazz... Basically I want to click on the buttons and the balls up there to create the shapes. I already have an idea of how the algorithms work but I just want to know how to make the buttons work. :/ My code isn't commented yet but I"m going to do it soon and update it for your guys ease but it's pretty straight forward... I know it's ugly but sorry guys.... anyway tips would be wonderful
  8. Hey thanks everyone... I'm still having difficulty. I"m understanding the theory behind it no problem. I just don't know how to update it... or Don't understand why it's not working. :/ I'm going to post my entire code everything works and I'm just kinda tired after trying to quite some time... Anyone have any ideas? Here is my code. [code]using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media; namespace Breakout { /// <summary> /// This is the main type for your game /// </summary> public partial class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; Texture2D paddle; Vector2 paddlePosition = Vector2.Zero; Texture2D ball1; Vector2 ball1Position = Vector2.Zero; Texture2D ball2; Vector2 ball2Position = Vector2.Zero; Boolean movingUp, movingLeft, movingUp2,movingLeft2; public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; } protected override void Initialize() { base.Initialize(); } protected override void LoadContent() { movingUp = true; movingLeft = true; movingUp2 = true; movingLeft2 = true; spriteBatch = new SpriteBatch(GraphicsDevice); paddle = Content.Load<Texture2D>("Paddle"); paddlePosition= new Vector2((graphics.GraphicsDevice.Viewport.Width/2)-(paddle.Width/2), (graphics.GraphicsDevice.Viewport.Height-80)); ball1 = Content.Load<Texture2D>("ball"); ball1Position=new Vector2((graphics.GraphicsDevice.Viewport.Width/2)-(ball1.Width/2), graphics.GraphicsDevice.Viewport.Height-115); ball2 = Content.Load<Texture2D>("ball"); ball2Position = new Vector2((graphics.GraphicsDevice.Viewport.Width / 2) - ((ball2.Width / 2)+250), graphics.GraphicsDevice.Viewport.Height - 115); } protected override void UnloadContent() { } protected override void Update(GameTime gameTime) { PaddleMover(); Ball1mover(); Ball2mover(); BalltoBallCollision(); base.Update(gameTime); } protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.AlphaBlend); spriteBatch.Draw(paddle, paddlePosition, Color.White); spriteBatch.Draw(ball1, ball1Position, Color.White); spriteBatch.Draw(ball2, ball2Position, Color.White); spriteBatch.End(); base.Draw(gameTime); } } } [/code] Here is where all of the important stuff happends (movement etc) it's in the other partial class. [code]using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media; namespace Breakout { public partial class Game1 { public void PaddleMover() { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit(); if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.Left) && paddlePosition.X >= 0) { paddlePosition.X -= 15; } if (Keyboard.GetState(PlayerIndex.One).IsKeyDown(Keys.Right) && paddlePosition.X <= (graphics.GraphicsDevice.Viewport.Width - 150)) { paddlePosition.X += 15; } } public void Ball1mover() { if (movingUp) { ball1Position.Y -= 3; } else { ball1Position.Y += 3; } if (movingLeft) { ball1Position.X -= 3; } else { ball1Position.X += 3; } if (ball1Position.X <= 0 && movingLeft) movingLeft = false; if (ball1Position.Y <= 0 && movingUp) movingUp = false; if (ball1Position.X >= (graphics.GraphicsDevice.Viewport.Width - ball1.Width) && !movingLeft) movingLeft = true; if (DetectPaddleBallCollision()) { movingUp = true; } } public void Ball2mover() { if (movingUp2) { ball2Position.Y -= 3; } else { ball2Position.Y += 3; } if (movingLeft2) { ball2Position.X -= 3; } else { ball2Position.X += 3; } if (ball2Position.X <= 0 && movingLeft2) movingLeft2 = false; if (ball2Position.Y <= 0 && movingUp2) movingUp2 = false; if (ball2Position.X >= (graphics.GraphicsDevice.Viewport.Width - ball1.Width) && !movingLeft2) movingLeft2 = true; if (DetectPaddleBallCollision2()) { movingUp2 = true; } } public Boolean DetectPaddleBallCollision() { if ((ball1Position.Y + ball1.Height) >= paddlePosition.Y && (ball1Position.Y + ball1.Height) < (paddlePosition.Y + 4) && (ball1Position.X + ball1.Width) > paddlePosition.X && ball1Position.X < (paddlePosition.X + paddle.Width)) { return true; } else { return false; } } public Boolean DetectPaddleBallCollision2() { if ((ball2Position.Y + ball2.Height) >= paddlePosition.Y && (ball2Position.Y + ball2.Height) < (paddlePosition.Y + 4) && (ball2Position.X + ball2.Width) > paddlePosition.X && ball2Position.X < (paddlePosition.X + paddle.Width)) { return true; } else { return false; } } public void BalltoBallCollision() { //Controlls ball 1 movement if (ball1Position.Y == ball2Position.Y && ball1Position.X == ball2Position.X) { ball2Position.Y = -ball2Position.Y; ball1Position.Y = -ball1Position.Y; } } } } [/code] Any help would be appreciated.... I obviousl have no idea what I"m doing.
  9. I've made the paddle and everything and it works but when they touch it they don't recognize one another so I tried to implement this collision but it doesn't seem to work properly. I"m assuming I might need more variables but I"m not entirely sure. :/ I know the code might be a bit messy I"ve been taking from everywhere to learn this. So any tips? This chunk controls the overall movement of the balls [code]public partial class Game1 { public void Ball1mover() { if (movingUp) { ball1Position.Y -= 3; } else { ball1Position.Y += 3; } if (movingLeft) { ball1Position.X -= 3; } else { ball1Position.X += 3; } if (ball1Position.X <= 0 && movingLeft) movingLeft = false; if (ball1Position.Y <= 0 && movingUp) movingUp = false; if (ball1Position.X >= (graphics.GraphicsDevice.Viewport.Width - ball1.Width) && !movingLeft) movingLeft = true; if (DetectPaddleBallCollision()) { movingUp = true; } if (DetectPaddleBallCollision()) { movingUp = true; } } public void Ball2mover() { if (movingUp2) { ball2Position.Y -= 3; } else { ball2Position.Y += 3; } if (movingLeft2) { ball2Position.X -= 3; } else { ball2Position.X += 3; } if (ball2Position.X <= 0 && movingLeft2) movingLeft2 = false; if (ball2Position.Y <= 0 && movingUp2) movingUp2 = false; if (ball2Position.X >= (graphics.GraphicsDevice.Viewport.Width - ball1.Width) && !movingLeft2) movingLeft2 = true; if (DetectPaddleBallCollision2()) { movingUp2 = true; } } [/code] This code works I just think it'll help with the understanding the movement. The detectPaddleBallcollision methods return true or false of the boolean Movingup and moving left. So I tried to do somethign that came to mind which is this [code] public void BalltoBallCollision() { //Controlls ball 1 movement { if (ball1Position.Y == ball2Position.Y ) movingUp = false; if (ball1Position.X == ball2Position.X) movingLeft = false;} if (ball1Position.Y == ball2Position.Y ) movingUp2 = true; if (ball1Position.X == ball2Position.X) movingLeft2 = true; }[/code] When I implement that the balls do collide but I have a problem with the paddle, it'll somehow control both of them... so I"m not entirely sure how to "fix" it... I'm thinking of adding several other boolean variable so they don't interfear with the general movement. But I don't know how I would implement them. Anyway So any idea on what I could do here? If need be I"ll uplaod the entire project if it'll make things easier.
  10. [quote name='Antheus' timestamp='1328722880' post='4910959'] [quote]#1.A game called "Survival", there are a lot of bubbles coming from above floating down and you're a ship of some sorts shooting at these bubbles. The bubbles collide with one another, and tada! They change their vector direction.[/quote] This would be [url="http://www.play.vg/games/4-Asteroids.html"]"Asteroids"[/url] or one of its millions of incarnations. [quote]#2. A game called "Stargate", you're a ship it's similar to the last one but these blocks are falling from above. You pretty much just have to shoot these blocks falling from above.[/quote] [url="http://www.youtube.com/watch?v=BQYyhreWFD4"]Stargate[/url]. Otherwise, it's any top-bottom shooter. On PC, [url="http://www.youtube.com/watch?v=pYa2g9_5Ss4"]Raptor [/url]is considered the be the pinnacle of the genre. [quote]So yeah I'm just trying to figure out what to do or how to do it.[/quote] Depending on your skill, replicating one of such games, without art, is a day's worth of effort. But considering the simplicity, there should be ample source code out there, but likely of very variable quality. Original sources are definitely not in C++. Aside from C++ not even existing in 1981, arcades were absurdly limited in hardware and all effects were possible only due to special tricks or dedicated chipsets. It wasn't until 90s and general purpose PCs managed to catch up to those capabilities. As such, original source, even if it is still preserved somewhere isn't of any use, since it's chip/model specific. [/quote] Thanks I think he just mean current source code of clones. He mentioned any code not the real source code. Thanks for the tips... He mentioned bubbles and that game also being top down. But asteroids is close enough.
  11. #1.A game called "Survival", there are a lot of bubbles coming from above floating down and you're a ship of some sorts shooting at these bubbles. The bubbles collide with one another, and tada! They change their vector direction. #2. A game called "Stargate", you're a ship it's similar to the last one but these blocks are falling from above. You pretty much just have to shoot these blocks falling from above. I'm not entirely sure how these games work or how to make them but I I can't find them I need to make them. So any code in C++ would be greatly appreciated.... He said these games where from the 1980's arcades and should have free source code there. But I'm not quite sure if these games even existed. So yeah I'm just trying to figure out what to do or how to do it.
  12. Thank you guys... I've decided to use Unity 3D since I'm not well versed with gamedevelopment yet. This works wonderfully! Thank you.
  13. i'm going to make a game that is half crazy taxi and half Twisted Metal. I originally intended to make it 3D but I can't seem to find a decent 3D android engine. I intend to make this game avalible on the market for free and mainly to learn. I've designed the game from head to two but I'm missing 3D modelling and what not. I just need to find a good 3D engine for android that is free. Any tips clues or ideas?
  14. [quote name='DarklyDreaming' timestamp='1322610968' post='4888914'] Your criteria are a bit dismal... what exactly are you trying to [i]accomplish[/i]? It isn't clear from what you posted. Given the thread title and what you said, all I can recommend for now is [url="http://www.blender.org/"]Blender[/url] or [url="http://sketchup.google.com/"]Sketchup[/url]. [/quote] Yeah I'm just trying to have some assets to show off in my game bible thingy. Essentially AUTOCAD but free... :/ I just need to know how to do these drawings and hopefully once they are done I could potentially take advantage of my work and export them to the actual game.