Show Posts
|
|
Pages: [1] 2 3
|
|
4
|
Game Development / Networking & Multiplayer / Re: Choosing a database software
|
on: 2012-04-21 14:13:43
|
|
When picking your data store I'd say it's not about what language you're writing your code in, but rather what kind of data you're intending to store and what the requirements around reading and writing are.
I would also suggest you stay away from OR frameworks or at least seriously evaluate the pros and cons of using one. They tend to put you in a right mess if you use them the wrong way.
|
|
|
|
|
5
|
Discussions / General Discussions / Re: Ok, memory management problem
|
on: 2009-07-06 11:53:55
|
|
I'm using Lucene for a project at work and I managed to have an index at the third of the size of the original data. I also did some index speed tests.
Test facts Number of files: 95.000 Total amount of data: 1.13 GB
Test 1 (single thread indexer) In this first test I just wanted to index all the data.
Time consumed: 12 minutes 12 seconds
Test 2 (multithreaded indexer) In this second test I used multiple threads to index all the data to see if I could speed things up. Time consumed: 6 minutes 17 seconds
Test 3 (searching) My final test was a search test. In this test I have changed one of the 95.000 files to contain my name and I run a search on it.
Time consumed: 93 milliseconds
Those are my very simple test results for Lucene. In the end I went for single thread indexing because I usually don't have that many things to index. I index things as they are added. My test files were basically text files with about 12Kb data each, the typical thing I wanted to index.
// Json
|
|
|
|
|
10
|
Game Development / Newbie & Debugging Questions / Re: Stop old Thread when a new one will be initialized
|
on: 2009-06-19 14:40:16
|
|
Maybe you should try and take another approach and not use a separate thread. You could just initialise a frame and keep it referenced and whenever you get a joystick action you set the labels and whatnot on the frame and then you make it visible. Once the 1 second time limit is up you hide the window and start all over. If there is a new action while the window is already open, just reset the timer and change the information in the window.
// Json
|
|
|
|
|
11
|
Game Development / Newbie & Debugging Questions / Re: Stop old Thread when a new one will be initialized
|
on: 2009-06-18 11:28:29
|
Maybe you can alter your code somewhat like this. At the end of your action class. 1 2 3 4 5 6 7 8
| if(display_window) { if(this.displayInfo != null && this.displayInfo.isAlive()) { this.displayInfo.getFrame().dispose(); }
this.displayInfo = new DisplayInfo("title", window_text, 250, 50, 1000); this.displayInfo.start(); } |
Also make sure you add a new member to that class called displayInfo which is of type DisplayInfo. You will also need to modify your DisplayInfo class and add a reference to the created JFrame. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
| import javax.swing.*; import java.awt.*; public class DisplayInfo extends Thread { String title; String text;
int width = 400; int height = 100;
int time = 3000;
JFrame frame;
static int instances = 0; static DisplayInfo instance;
public DisplayInfo(String title, String text, int width, int height, int time) { if(instances>0) { instance.stopInstance(); } ++instances; instance = this; this.title = title; this.text = text; this.width = width; this.height = height; this.time = time; }
public void run() { this.frame = new JFrame(title); this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.frame.setUndecorated(true); JLabel label = new JLabel(instances+" - "+text, JLabel.CENTER); label.setForeground(new Color(0xBB, 0xBB, 0xBB)); this.frame.getContentPane().add(label);
this.frame.setSize(width, height);
Toolkit toolkit = Toolkit.getDefaultToolkit(); Dimension screenSize = toolkit.getScreenSize();
int x = (screenSize.width - frame.getWidth()) / 2; int y = ((screenSize.height - frame.getHeight()) / 3) * 2;
this.frame.getContentPane().setBackground(new Color(0x33, 0x33, 0x33));
this.frame.setLocation(x ,y); this.frame.setVisible(true);
try { Thread.currentThread().sleep(time); } catch(InterruptedException ie) { }
this.frame.dispose(); }
public void stopInstance() { --instances; this.stop(); }
public JFrame getFrame() { return this.frame; } } |
Now that will give you a solution for closing the actual frame and the thread should die automatically after your set time anyway. However you might want to consider implementing Runnable instead of extending thread and also adding a boolean with a while loop in the run method because thread.stop() has been deprecated. // Json
|
|
|
|
|
13
|
Games Center / Featured Games / Re: Minecraft
|
on: 2009-06-10 11:34:19
|
I released multiplayer the other day, and registrations shot through the roof. Over 24 hours, I got about 1200 registrations, and there currently are about 200 players playing it online. Holy moly!
Grats Markus, well done! // Json
|
|
|
|
|
14
|
Game Development / Game Play & Game Design / Re: New member: can I ask for some guidance?
|
on: 2009-06-10 11:32:40
|
When I started game programming back in the days I was into C++ myself and I went through most of the OpenGL tutorials on http://nehe.gamedev.net/There are also some nice articles there and alot of the tutorials have been ported to LWJGL and JOGL as well. Personally I've not ever owned a programming book ever until my employer just bought me the SCJP training book. I'm planning on getting some OpenGL books soon to see what I've missed out on  Good luck on your quest of inner knowledge and please post your work in progress in the appropriate forum as well when you feel ready, everyone here are keen on giving guidance and feedback to each other. // Json
|
|
|
|
|
15
|
Discussions / General Discussions / Re: jdk 6u14 - whats new ?
|
on: 2009-06-10 11:13:34
|
|
Yeah the blacklist seems interesting, there doesn't appear to be a blacklists file with this release though or am I wrong?
The "new" garbage collector is also available in this release for anyone to try it out.
// Json
|
|
|
|
|
20
|
Games Center / Featured Games / Re: Rescue Squad 2!
|
on: 2009-05-26 09:22:38
|
I shall give it another go tonight and check out the tutorials  I'm still somewhat confused to why you need the night vision and flares because you can see just fine without them. Maybe it needs to be even darker when you are out there  I was also thinking about weather effects, that would be rather cool in higher levels. Makes the flying somewhat more difficult. // Json
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|