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

webdevapreneur

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

112 Neutral

About webdevapreneur

  • Rank
    Newbie
  1. I am a complete novice at game dev. My experience is all mainly ASP.NET in C# and some Java desktop app development. I have only ever made one game, it was recently and using Java. It is a space invader / Galaga analog. My approach was different than yours as a whole, but I thought this may help you, because I had the same issue. Here is my bullet class: [source lang="java"]package game; import java.awt.*; import javax.swing.ImageIcon; //class that creates and manages a bullet instance public class Bullet { //instance variables //x and y coordinates of a bullet instance private int x, y; //image that holds the image of the bullet private Image img; //variable that holds the visibility of a bullet private boolean visible; //constructor public Bullet(int xS, int yS) { x = xS; y = yS; ImageIcon newBullet = new ImageIcon("src/images/bullet.png"); img = newBullet.getImage(); visible = true; }//end of constructor //method that moves a bullet public void move() { y += -2; if(y < 5) { visible = false; } }//end of move //method that returns bounds of bullet instance(used for collision detection public Rectangle getBounds() { return new Rectangle(getX(), getY(), 10, 30); }//end of getBounds method //method to return x position of a bullet public int getX() { return x; }//end of getX //method to return y position of a bullet public int getY() { return y; }//end of getY //returns the Image of a Bullet public Image getImage() { return img; }//end of getImage //method to set visibility of a bullet public void setVisible(boolean con) { visible = con; }//end of setVisible //method to return visibility of a bullet public boolean getVisible() { return visible; }//end of getVisible }//end of class Bullet[/source] Here is my fire method in my player class: [source lang="java"]public void fire() { Bullet z = new Bullet(x + 72, y - 20); bullets.add(z); }//end of fire() [/source] then I drew the bullets in the actionPerformed handler: [source lang="java"] //event that fires every time the swing timer ends(currently set to 5 millis) public void actionPerformed(ActionEvent arg0) { if(!playerDead) { ArrayList bullets = p.getBullets(); for(int i = 0; i < bullets.size(); i++) { Bullet m = (Bullet) bullets.get(i); graphics.drawImage(m.getImage(), m.getX(), m.getY(), this); } } }[/source] here is my player constructor: [source lang="java"]public Player() { //sets visibility to true visible = true; //get the path for spaceship image ImageIcon ic = new ImageIcon("src/images/spaceCraft.png"); //loads the image file into the image object img = ic.getImage(); //starting position x = 500; y = 800; //instantiate bullet ArrayList bullets = new ArrayList(); }//end of constructor[/source] When I call the fire method the 72 and (-20) are the offset so the bullet looks like it is coming out of the nose of the fighter image that is the player instance. I am not sure of your game type but hopefully this helps!