Posts Tagged ‘screenshot’
Wednesday, July 9th, 2008
I downloaded a new Java tool today, called VisualVM which was released (version 1.0) yesterday and is going to ship with the SUN JDK starting with JDK 6 release 7.
This is a tool that allows you to view information about the java programs currently running on your computer (or a remote computer). It does not seem to provide as much information as JConsole or JManage, but it still gives the most essential information. Besides the tool is still pretty new (version 1.0), so I’m sure we will see lots of improvement in the near future.
Monitoring provides basic information about uptime, memory usage, threads and some other stuff:

The application also has a rudimentary profiler which allows you to see which methods are using cpu cycles, and which objects are hogging all the memory,

The program can also do a heap dump, allowing you to see the size and number of instances of each class. You can also inspect each and every object to view it’s variables and references:

The profiling part was pretty simple and would benefit from more work, but overall I’m pretty sure this tool(even though a bit low on features/information in it’s current state) will be a big hit, and a good entry to profiling and application management to many people.
A very nice feature I did not take a screenshot of is a visual timeline view of all the threads and which state they are in, very smooth
The software is also suppose to let you view core dumps, but did not get a chance to test this feature tonight.
Tags: computer, debug, heap, java, jdk, memory, profiling, programming, screenshot, software, sun, technology, timeline, uptime, visualvm
Posted in Computers, General, programming | No Comments »
Sunday, June 15th, 2008
I’ve had this post as a Draft ever since I came back from Austria (which is a weird-ass country by the way), mainly due to the fact that I managed to change ssh port on my server without changing the firewall
So I finally connected a keyboard and screen and set everything up the way they was, which meant I could commit the changes I did to the Trekwar game to the server, and get them on this computer and grab some screen shots.
Friday
It is now possible to move your fleets around the map, Client allows you to press the tile the fleet should move to and then tells the server to move the ships.
Saturyday
Fixed a bug where the local copy of the move orders where not updated properly, implemented the starsystem controll window:

Sunday
Implemented build orders, now possible to build structures on planets. Queue not implemented yet.
Airplane
On the airplane back home I implemented the asteroid belts (high-altitude programming is fun).
Notice the beautiful asteroids drawn in mspaint on my laptop’s touch pad

Tags: aircraft, asteroid, austria, bug, computer, fleet, game, gui, java, laptop, map, paint, planet, programming, queue, screenshot, server, ssh, structure, svn, trekwar, trip
Posted in Computers, Games, General, programming, Traveling | No Comments »
Monday, May 12th, 2008
The last week I have been finishing up the online registration system for Nidarosilder, a local ferret show here in Trondheim that we are attending in early September.

The system runs on jsp and postgresql and allows user to register, then they receive a password they use to log in. When logged in they enter their name and other info, and can add up to 20 ferrets. Also my friend Anne who organizes the show has a admin page where she can see all users/ferrets, and sorted displays to make it easier to set up the different classes for the show.
Seeing that the ferret system was ready thursday, I got to spend most of this long weekend (Dont have to work monday 12th because of some religion thingy) on my Startrek game.
I debugged the Research system, and had some problems with the object serialization between the server and the client (ObjectOutputStream.writeUnshared() only writes the ROOT object unshared.. I learned that the hard way). I also made the client show a counter that counts to next game turn, a animation that shows while downloading map data, I implemented the Order system, and now it is possible to move a starship.
Below you can see a federation fleet moving to sector 3:7 (the yellow dots show the path)

Thursday 22. I will be going to Austria with the people from work, so maybe then I will have the time to implement the build system when there =)
Tags: debug, ferret, ferret show, game, java, jsp, path, postgresql, programming, screenshot, serialization, software, star trek, starship, trekwar, webpage
Posted in Computers, General, programming | No Comments »
Wednesday, January 30th, 2008
Today I completely finished the research system of my Star Trek game Trekwar.
Well, I still have to crawl trough memory alpha to get images for all the 65 technologies in the game. but all the code and the GUI is complete:

Next I will make the client download and display the new map / research view each time the server starts a new turn.
After that I will be working on the order system, and doing either the build order system (creating new buildings on planets), or the fleet order system (moving starships, giving attack/colonize orders, etc..). Still LOTS to do, and it feels good to have Research out of the way.
Tags: client, game, gui, java, planet, programming, research, screenshot, software, star trek, trekwar
Posted in Computers, Games, General, programming | No Comments »
Monday, January 28th, 2008
I was in Åre Sweden this weekend, on a company excursion by Betradar (where I’m starting work Friday).

They had rented a large cabin (250 m2), and around 20′ish employees hang out there from Friday to Sunday. I got to meet some of my soon to be coworkers, and I made some progress on my Star Trek Game (Which has kinda been stuck in development hell for the last two years).
Unlike some of my previous code that I have written, coming back to Trekwars (second rewrite I might add) was very pleasant, good planning and Object Oriented Design seems to have paid off
I was able to implement the tick/turn system, and did some GUI work on the galaxy view, and halfway implemented the system view and research view. I also worked a bit on the order system, so given a few more hours of development I think I could actually move fleets of ships around
Still much work to be done until the game is anywhere near playable
- Starship pathing algorithm and order system
- Server data limiting (The client receives a big map ‘the galaxy’ from the server, currently it sends EVERYTHING, but this will have to be changed so that users cant cheat by reading “secret” data. Also by making a custom user copy the server will enable fog of war, and “distort” information in far away areas where sensor strength/resolution is low)
- Sensor coverage algorithm (got it worked out on paper somewhere)
- Planet Build systems (halfway done)
- Combat resolution (ship to ship + ground combat)
- Colonization and Starbases + Listening posts construction
- Social tools (ingame mail + chat)
- Natural phenomena (black holes, neutron stars, nebula, wormholes, etc..)
It was really fun working on the game again, and hopefully I wont shelve it for so long again. Here are some screenshots showing the GUI stuff done this weekend.
Galaxy view – shows the map with systems and starships

Star system map – Shows details about a star system, panel to build new structures/ships is not implemented yet. BTW those are temporary planet pictures that I drew in ms paint with my laptop touchpad this weekend, I actually think they are kind of cute 

Research View – Only just started this, so it just show your current research tree err.. stack 

Tags: betradar, game, gui, java, programming, screenshot, snow, software, star trek, sweden, swing, trekwar, Work
Posted in Computers, Games, General, programming, Work | No Comments »
Tuesday, November 20th, 2007
While most of this weekend was well spent playing Crysis, I actually managed to get a bit of programming done. At work we usually work on several projects a day and we have to keep track of the hours we use on each project so that customers are billed correctly.. and at the end of the day it can get pretty hard remembering what you did and how long it took you to do it.
So i made this little Java application called TimeTrack that pops up every 45 minutes (or whatever you ask it to) and asks me what I’m doing. This should make it easier to write up my hours every Monday morning

It was also kinda therapeutic to work on a small program where I get to design everything, and there is no changing requirement specification and I can finish the program and put it behind me (well maybe I’ll throw in a few quick fixes). Anyway.. I’m going to continue my Halflife 2 install and try out Portal
Tags: code, crysis, gaming, half life 2, java, portal, programming, screenshot, software, timetrack
Posted in Computers, General, programming, Work | No Comments »
Thursday, August 23rd, 2007
I was updating the SendSMS program I wrote, and instead of a JTable I wanted the list of messages sent to display in a better looking and more intuitive way. I decided to just use a JLabel and use html for displaying the sent messages:

I had the JLabel in a JPanel with GridLayout(1,1), and the Panel inside the JScrollPane. The JScrollPane always have vertical but never horizontal scrollbars.
The following problem arose: When the message got to long, it would not wrap, and end of message would disappear to the right.
The solution is simple: set the Width of the JPanel with the label to be roughly the size of the application window..
That did the trick, now however the scrollbar never updates when the Label gets very tall.
Apparently you cant just set just width for the Panel, you also have to set height.. again the solution is simple, set the height of the panel to be the height of the JLabel.
However since the JLabel is inside the JScrollPane (at least, I think that is the cause) the getSize and getPrefferedSize will return only the visible height of the JLabel. It took some playing around with but finally got it working by using the getMaximumSize.. NOTE: dont use the width from getMaximumSize() cause it is ridiculously large
the code:
historyPanel.setPreferredSize(new Dimension(historyScrollPane.getViewport().getSize().width, historyLabel.getMaximumSize().height));
Now I just have to find out if that way of getting the components height works the same across different platforms
Tags: code, gridlayout, html, java, jlabel, jpanel, jscrollpane, jtable, programming, screenshot, scrollbar, sms, software, swing, technology
Posted in Computers, General, programming | No Comments »