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


  • Content count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About NuLogic

  • Rank

Personal Information

  1. Hmm, there is main thread, which controls animator function, but to create another thread to do such thing, I think is not ergonomic. And yes, it is a turn based game, player hits, enemy counter-attacks. And please, tell me more about flags, because currently character object reacts on key presses and immediately executes some functions like attack, jump and change image. I tried to delay enemies attack action in such way: [code] if(ENTER pressed) { executionTime = currentSystemTime + 1000; // delay for 1 sec } if(ENTER pressed && currentSystemTime >= executionTime) { attack } [/code] but it simply doesn't works, it is only performed once (execution time is equal to current time) and later execution time is always greater than current system time. So could you tell me more about game states? I understand, that after certain action it should change, but how it is performed? I mean technically, game sleeps during state change or what?
  2. Hello, I am making fighting java game, and I have one problem, when I press attack key, enemy must respond and also attack player, I know how to do it, but I need to make a short delay between actions, player attack action must be performed immediately, and enemy must attack only after one second, how to make such thing? Sample code on playerEnemy: [code]public void keyPressed(KeyEvent e) { int key = e.getKeyCode(); if (key == KeyEvent.VK_ENTER) { attack(); } }[/code]
  3. At least, how to reach that weapon object?
  4. Hello, I am creating Java game, it is my first game, so I am still a noob in that case. I got stuck in one thing: I have created main menu, after selecting start new game, user must select weapon (ex. dagger with JButton), this is how it looks: [code]public class GUI { public GUI() { initGUI(); } public void initGUI { (..................some methods.........................) final JButton newGame = new JButton(new ImageIcon(..)); newGame.setLocation(250, 420); content.add(newGame); final JButton buttonDagger = new JButton(new ImageIcon(..)); buttonDagger.setLocation(250, 420); content.add(buttonDagger); class NewGameAction implements ActionListener { @Override public void actionPerformed(ActionEvent e){ newGame.setVisible(false); daggerButton.setVisible(true); frame.add(new Barracks()); } } class DaggerAction implements ActionListener { @Override public void actionPerformed(ActionEvent e){ daggerButton.setVisible(false); Weapon w = new Weapon("Dagger", 3, 8, 5); frame.add(new Arena()); } } buttonDagger.addActionListener(new DaggerAction()); newGame.addActionListener(new NewGameAction()); } } [/code] Class DaggerAction is inside initGUI function, is an initialization of daggerButton, after clicking on that, dagger must be created. So my problem is, how I can reach that Weapon w object? Or maybe there is an option to create it's copy somewhere during DaggerAction initialization? Or maybe there is an other way to initialize such select thigs? I will really appreciate your help, thanks. GUI is the main class which handle all the graphics. And I want to appear weapon object in Barracks class, which is initialized after starting new game.
  5. yes, I am just exactly reading about it, I will repaint that stuff
  6. Can you give advice, how to put objects other objects like buttons on the background? Because my game background is hiding that objects, they are under background, how to take them out?
  7. ok, I will try thanks for yout continuous support
  8. I already know, how to make that stuff, i need normal menu, which will let to select any stuff, like New Game, Load Game etc. [img]http://farm4.staticflickr.com/3441/3400027440_84edc00573.jpg[/img] but I am a bit confused, for which functions and libraries I should search to make such like upper one? Using Java SE.
  9. Hello, I just started to work with my graphical game, it is simple, but I need some information, how the game menu is created? I have been searching everywhere, but there is only explained how to create menu bars, but I need simple menu like New Game, Options for example in the middle of the screen. This is my GUI class, it contains only background and menu bar on the top, maybe someone can say, how I can implement normal one? : [code]import java.awt.Color; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import javax.swing.*; public final class GUI { JFrame frame; public GUI() { frame(); } // Adding background image and JMenuBar on the top public void frame() { frame = new JFrame("My Game"); try { frame.setContentPane(new JLabel(new ImageIcon(ImageIO.read(new File("D:/bg.png"))))); } catch(IOException e) { System.out.println("No image"); } frame.setResizable(false); frame.setSize(800, 449); JMenuBar menubar = new JMenuBar(); frame.setJMenuBar(menubar); JMenu file = new JMenu("Meniu"); menubar.add(file); JMenuItem exit = new JMenuItem("Exit"); file.add(exit); JMenu help = new JMenu("Help"); menubar.add(help); JMenuItem about = new JMenuItem("About"); help.add(about); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); class ExitAction implements ActionListener { @Override public void actionPerformed(ActionEvent e){ System.exit(0); } } class AboutAction implements ActionListener { @Override public void actionPerformed(ActionEvent e){ JLabel label; frame = new JFrame("About"); frame.setResizable(false); frame.setSize(200, 200); label = new JLabel("Author: ED"); Font font = new Font("Arial", Font.ITALIC, 12); label.setFont(font); frame.add(label); frame.setBackground(Color.BLUE); frame.setVisible(true); } } exit.addActionListener (new ExitAction()); about.addActionListener(new AboutAction()); } }[/code] How I you would add menu? Also I tried to put a text box, but it hides under the background, how to take it from the back?
  10. Thank you [b]bollu[/b] for fix, [b]mickd, [/b]thisis my other question, I noticed, that most of people store data in xml files, but my game will be really small, it will only containt 3 weapons and 3 armors also 2 players (human and computer), so maybe there is a way just to implement them all dinamically while game starting just with Weapon longSword = new Weapon("Long Sword", 10); without storing data somewhere[b]? 6510, [/b]abilities of the swords are the same, different only stats, same with armors, maybe you can give any example? I have been searching for it, but I did not find any simple ones. Because it is just my first java game at all and it will be simple for the first time. After finishing I will bring it here as object to learn
  11. Hello, I have class Weapon: [code]class Weapon { private String name; private int min_damage; private int max_damage; private int weight; public Weapon(String name, int weight) { this.name = name; this.weight = weight; } public int getMinDamage() { return min_damage; } public int getMaxDamage() { return max_damage; } public void setMinDamage(int x) { min_damage = x; } public void setMaxDamage(int x) { max_damage = x; } }[/code] and I want at beginning of the program to create three weapons like longSword, shortSword, saber, each of it would have parameters min_damage, max_damage, name and weight, so how I need to create them? I am thinking about two ways, first: [code]Weapon longSword = new Weapon("Long Sword", 10); longSword.setMinDamage(5); longSword.setMaxDamage(10);[/code] second: [code]class longSword extends Weapon{ // same actions like upper }[/code] but I realise, that both methods are wrong, maybe you have any advice for java programming newbie? Thank you in advance