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

CaptainJester

Members
  • Content count

    1907
  • Joined

  • Last visited

Community Reputation

523 Good

About CaptainJester

  • Rank
    Contributor
  1. Why don't you target Android? There are just as many Android devices as iphone/ipad. If you use LWJGL it already has a port for OpenGL ES which Android supports.
  2. [quote name='Prefect' timestamp='1313823276' post='4851503'] Have you looked into the generation of Sudoku puzzles? There are quite a few articles and discussions online on that subject, and it seems to me that under the hood, this Sherlock puzzle can probably be thought of in rather similar terms as Sudoku. The problem can be expressed as that of finding a solution to a set of logical constraints, and puzzle generation consists of adding constraints while keeping the problem feasible, or removing constraints while keeping the solution unique. So my thinking is that once you have read up on Sudoku, you could try to abstract the ideas used for puzzle generation in that context, and then transfer them to the type of puzzle you want to create. [/quote] Thanks Prefect. I never thought of that. It is similar to Sudoku in some ways. I'll take a look.
  3. Thanks for the replies.
  4. No one hear of this game? Or no one knows what it might be?
  5. You would have to show me what you want to do. If you post a screenshot of what you have now and describe what you want I can help.
  6. If you still want to give GridLayout a try, the trick with it is that all the cells will be the size of the largest component in any one of the cells. So all components will be expanded to fill the same amount of space. One way to shrink the size is if you are using buttons in the grid you can set the insets on the buttons to be smaller than normal. That will reduce the overall size of the button. I don't have any problems working with layout managers, so if you show some code of what you are trying to do, or show a screenshot and say what is wrong with it, I can probably point out the problem.
  7. I'm sure some of you have heard of the game Sherlock by Everett Kaser [url="http://www.kaser.com/sherwin.html"][color="#476c8e"]http://www.kaser.com/sherwin.html[/color][/url]. I was wondering if anyone knew what kind of puzzle generation algorithm would be used in this? The executable is very small yet it holds 64k combinations, so each puzzle is most likely generated on the fly. Any ideas?
  8. It is rare for any layout manager to use anything other than preferredLayout.
  9. [quote name='rip-off' timestamp='1312929779' post='4846935'] [quote] Don't name a variable the same name as a class or it will confuse the compiler. This is a horrible practice. Also using 1 letter variable, method and class names is also heavily discouraged. If your goal is to try and have a small program, you can include an obfuscator like ProGuard that will reduce your output class file size. [/quote] The OP explained that this is for a "dare". That said, the obfuscator isn't a bad idea. You write your program normally. You then find/write a second program that generates the "short hand" from Java source/class files. Finally, run the latter on the former! If there are any open source Java source obfuscators, they might help as a base on which to build. [/quote] I missed the dare part. ProGuard is in SourceForge so it is opensource.
  10. Don't name a variable the same name as a class or it will confuse the compiler. This is a horrible practice. Also using 1 letter variable, method and class names is also heavily discouraged. If your goal is to try and have a small program, you can include an obfuscator like ProGuard that will reduce your output class file size.
  11. Check out LWJGL. It is a cross platform OpenGL Java library. [url="http://www.lwjgl.org/"]http://www.lwjgl.org/[/url]
  12. [quote name='Runicode' timestamp='1303083359' post='4799652'] And now it works fine. What the heck happened. Why must the files be closed for this to work? [/quote] File writing is buffered to a certain extent and if you don't close the file the buffer doesn't always get flushed properly.
  13. I am pro Java, but you could probably just go with PHP.
  14. Quote:Original post by LorenzoGatti I find GridBagLayout unfit for actual coding, and experience left me a deep dislike and distrust for the visual GUI builders needed to use it "effectively". Instead of making complex kitchen sink panels with write-only layout specifications, I usually nest meaningful and very simple panels (with few children) liberally, using the simplest layout managers. BorderLayout offers a very natural way to distribute extra space when resizing (the center position is stretched and the borders aren't) and to align components inside the parent (in the center stretched two ways, in a border stretched one way, not stretched in any corner using two nested panel). I never used both vertical and lateral border positions in the same BorderLayout panel because assigning the corners to the top and bottom locations is arbitrary and because the corresponding components are usually unrelated; instead I nest a BorderLayout for each direction, using only one border location or two opposite ones. GridLayout, normally with one row or one column, is as user friendly as BorderLayout for the uncommon use case of splitting available space into equal parts. Ditto
  15. I'll just talk about the GradientPaint class. In the constructor you set 2 points and a colour for each point. If you draw a line between those two points that is the line that the gradient will follow. Every point on that line represents a slight transition from the first colour to the second. That calculated colour is then projected perpendicular to the line in both directions to infinity. If you specify a cyclic gradient this will coninue down the line in both directions, even beyond the specified points. If you make it acyclic then anything beyond the specified points will be the colour of the closest point. ie if you specify a straight line like this: new GradientPaint(100, 100, Color.YELLOW, 300, 100, Color.Red) anything to the left of 100, 100 will be yellow and anything to the right of 300, 100 will be red. The coordinates themselves are specified in screen space. So imagine that the gradient is already drawn on the screen in the background and the shapes that you draw just unmask the gradient so it can be revealed to the viewer.(This isn't the way it happens, it just helps to imagine it that way.) I have attached some cade that will hopefully show what I am talking about. import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.GradientPaint; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.JFrame; import javax.swing.JPanel; public class Test extends JPanel implements KeyListener { private static final long serialVersionUID = 1838370841892213081L; private int screen = 0; public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D)g; g2.setColor(Color.BLACK); g2.fillRect(0, 0, 800, 600); g2.setFont(new Font("Courier new", Font.PLAIN, 20)); switch(screen) { case 0: g2.setColor(Color.WHITE); g2.drawString("Horizontal", 40, 15); g2.setPaint(new GradientPaint(100, 100, Color.YELLOW, 600, 100, Color.RED)); g2.fillRect(50, 25, 500, 50); g2.fillRect(0, 125, 500, 50); g2.fillRect(300, 225, 450, 50); break; case 1: g2.setColor(Color.WHITE); g2.drawString("Diagonal", 40, 15); g2.setPaint(new GradientPaint(50, 50, Color.YELLOW, 550, 550, Color.RED)); g2.fillRect(50, 50, 500, 500); break; case 2: g2.setColor(Color.WHITE); g2.drawString("Diagonal", 40, 15); g2.setPaint(new GradientPaint(50, 50, Color.YELLOW, 550, 550, Color.RED)); g2.fillRect(50, 50, 240, 240); g2.fillRect(300, 50, 240, 240); g2.fillRect(50, 300, 240, 240); g2.fillRect(300, 300, 240, 240); break; case 3: g2.setColor(Color.WHITE); g2.drawString("Diagonal", 40, 15); g2.setPaint(new GradientPaint(50, 50, Color.YELLOW, 550, 550, Color.RED)); for(int i=0;i<5;i++) { for(int j=0;j<5;j++) { g2.fillRect(50 + (j * 100), 50 + (i * 100), 90, 90); } } break; case 4: g2.setColor(Color.WHITE); g2.drawString("Diagonal", 40, 15); g2.setPaint(new GradientPaint(50, 50, Color.YELLOW, 550, 550, Color.RED)); for(int i=0;i<5;i++) { g2.fillRect(50 + (i * 100), 50 + (i * 100), 90, 90); } break; case 5: g2.setColor(Color.WHITE); g2.drawString("Diagonal", 40, 15); g2.setPaint(new GradientPaint(50, 50, Color.YELLOW, 550, 550, Color.RED)); for(int i=0;i<5;i++) { g2.fillRect(50 + (i * 100), 50 + (400 - (i * 100)), 90, 90); } break; case 6: g2.setColor(Color.WHITE); g2.drawString("Diagonal", 40, 15); g2.setPaint(new GradientPaint(50, 50, Color.YELLOW, 550, 550, Color.RED)); g2.fillOval(50, 50, 500, 500); break; case 7: g2.setColor(Color.WHITE); g2.drawString("Diagonal", 40, 15); g2.setPaint(new GradientPaint(50, 50, Color.YELLOW, 550, 550, Color.RED)); g2.fillOval(50, 50, 500, 250); g2.fillOval(50, 300, 500, 250); break; case 8: g2.setColor(Color.WHITE); g2.drawString("Diagonal", 40, 15); g2.setPaint(new GradientPaint(50, 50, Color.YELLOW, 550, 550, Color.RED)); g2.fillOval(50, 50, 250, 500); g2.fillOval(300, 50, 250, 500); break; } } public Dimension getPreferredSize() { return new Dimension(800, 600); } public static void main(String args[]) { JFrame f = new JFrame(); Test t = new Test(); f.add(t); f.addKeyListener(t); f.pack(); f.setVisible(true); } @Override public void keyPressed(KeyEvent e) { int keyCode = e.getKeyCode(); if(KeyEvent.VK_1 <= keyCode && keyCode <= KeyEvent.VK_9) { screen = keyCode - KeyEvent.VK_1; repaint(); } } @Override public void keyReleased(KeyEvent e) { } @Override public void keyTyped(KeyEvent e) { } }