Advertisement Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    68
  • comments
    177
  • views
    82349

About this blog

Save your forks, there's pie!

Entries in this blog

 

Gurt in SVN repository

Oh hell, I had a nice long post made about the project status, and a server error killed it. Here we go again.


Public Project Repository.

You can pull it down if you want, but I'm not taking contributions yet.

updates:

sound system: multiple clips of the same sound can now be played. This is a major improvement in the quality of the sound system.
physics system: it looks reasonable now. It still has a few bugs, but for now it's serviceable


todo:

more documentation: I was bad, I haven't been commenting things like I should. I wanted to get the physics system fixed before I went back through and took care of it. Well, now I can
more unit testing: again, bad sean, bad. This is the primary reason why I was able to get the physics system working properly, so I want to go back through and get everything tested properly just to make sure nothing crops up in the future.
physics server: first step to making the game multiplayer will be to get the solar system simulation running on a server instead of in the game clinet itself. It will require me to undo some optimization work that I've done.
content system: I have no content system right now. All objects are hardcoded right now. Dirty, dirty, dirty.


That's it for now. I'm suprised with how much work I've gotten done on this project. In the next couple of weeks I expect it to drop dramatically, because I will be moving out to Illinois. More documentation and unit testing will help to keep me on track when I find time to work on the project again.

capn_midnight

capn_midnight

 

o rly? ya rly. no wai!

We got kicked out of our building today. Some kind of fire drill, I guess. All rather annoying. I made good use of the time, though. I picked up a girl in the crowd outside the building and got coffee with her. Got her number. Engage w00tb0t.

Wot wot?!?

capn_midnight

capn_midnight

 

i herd yuo like mudkips?

Okay, my asteroidish game is coming along. I've got about half of the bugs ironed out of the physics system. It's still returning bad results, but they aren't quite as bad as they were before. Apparently I was using a quadratic formula of " (-b +- sqrt(4*a*c) ) / 2 * c ". Obviously, this is not the way to true enlightenment. Buddha would be pissed.

I added a simple sound system, using pure Java Sound API mixing. Eventually I'll have options for selecting the desired audio mixer for systems with multiple mixers. For now I'm just taking whatever is the first mixer, which is not guaranteed to work on anything other than my machine (it's not that bad, it should at least be able to load the default Java software mixer). The sound system still needs work, but it's not a critical feature right now, just having it is enough for now.

Increased max resolution to 1152x864. Got my unit testing on. Added a name label to the planet. Abstracted a little more physics out of the rendering code. blah blah blah. Now that I've introduced sound I need to reinvestigate how to load resources out of a jar file (I had an epic fail on that last night, totally set up my system the bomb). Still lots of work to do.

capn_midnight

capn_midnight

 

physics

For my asteroids/elite-like project, I want to have featureful physics system. I've never really coded physics stuff before, but I have a pretty good handle on mathematics, so as long as I do enough relearning I should be fine. I've had a lot of success in the past with keeping this journal during my development process, so I'm going to do it again.

Before I get right into the physics talk, I should briefly describe the game. The idea is to create a multiplayer solar system sandbox. I want simple, vector-style graphics ala Asteroids, and I want a simple economy of trade/piracy, ala Privateer, Freelancer, etc. I have a bunch of ideas of things to add after that, but for now that's the basic idea.

For a first-cut system, I want to model all the ships and asteroids as if they were billiard balls. This is a pretty close approximation for the asteroids, but it's a little rough for the ships. However, at this point it doesn't really matter, as even simple billiards would be better than what I currently have (it's abysmal, I shant share it with you).

I'm using http://billiard-physics.net/ to brush up on my kinematics. I could rederive most of the equations, as I sort of remember most of them, and know how to find them, but I'd rather just save the time and look them up. I have my old college physics text down in the basement, as well as my calculus text. However, I remember these covering mainly static systems, dynamics wasn't really covered that much.

The game won't have a 100% perfect physics system, for example, I plan on setting the maximum velocity to something much slower than speed-of-light. Also, I will have to strike some kind of balance in conservation of momentum, as users arbitrarily accelerating into asteroids in a frictionless environment will increase the total kinetic energy in the system indefinitely (and I'm definitely NOT going to model chemical-to-kinetic energy transformations).

That's it for now. I'm going to Buffalo, NY for the Bills vs. Packers game on Sunday. Most of the code that I have written right now is mostly thumbnail sort of stuff and I will probably throw most of it away.

capn_midnight

capn_midnight

 

incompetence

At work, I'm tasked with fixing some bugs in a pre-existing application. We didn't write the app, but our client really likes us, so they gave us the work. Also, the company that originally did the work went bankrupt, so there is that issue. Somehow, they stay in contact with the lead developer, even though he's now on his second new job since the bankruptcy.

This web app is a simple ledger accounting thing for all of the various local groups in the state to use to track taxing for our client. It's basically an online version of quickbooks for these groups. They can enter in a few different types of data. All told, it's actually rather small, the database is only about 20MB total.

First, it's written in Java. This isn't horrible, Java on the server is nowhere near as bad as Java on the desktop (at least the toolchain is mature). Whoever originally wrote this application must have been tripping on LSD. It's a bunch of JSP files that all include each other in one way or another. It's a lot like some hackish PHP (is there any other kind?) that I've seen.

Second, it's written for Java 1.3. We run it succesfully on Java 1.4, but I first have to rewrite a sizable portion of the data access code.

So far, none of this is really that bad. Well, what I mean is, it seemed really bad when I first started on the project, but recent events really take the cake.

About four weeks ago, we got to a point where we had to move to the client site to continue working, so that we had access to their infrastructure and development databases. When we get there, the one machine they have for the three of us to work on (luckily we rotate days) is literally falling apart. I hit the power button and the face plate fell off. The red and blue phosphours in the monitor are starting to die, so everything has a greenish tint. Oh, there's also some banding on the display as well. The space bar on the keyboard only works half of the time. I just reallized today that there is not a padded cushion on the side of the mouse, that's a thick layer of grime.

It's running Windows 2000 that probably hasn't been reimaged in 6 years. Internet Explorer can't open new windows, meaning we can't use Exchange Webmail to access or work email. The Windows Find utility won't open, it just sits there looking at you like you're some kind of retard. The security policies won't let me open the run prompt, but I can navigate to CMD and run that. We can't get certain plugins to install for Eclipse, because for some unknown reason the installer thinks we're running an incompatible version of Eclipse (yes,I've verified we have the right version, as well as verified on another machine that the plugins install properly).

My first task is to get the app running on this workstation. Tomcat is already installed, my boss did that the day before. He spent a few hours n vain trying to get it to run, though. I get there and find out that he doesn't have the required environment variables set, but only after spending a few hours crawling over the configuration files that I don't rightly understand (we have other people in the company to handle deployment, I just write the damn code).

My second task is to get the application running off of the IBM DB2 development database. I contact the DBA and ask him for the connection details. He is a bit reluctant at first, "why do you need to know that info?" but I explain to him that I'm working on bug fixes for the application. Okay, so he relents and gives me the info. I spend the next hour crawling the internet trying to figure out how to properly create a JDBC connection to a DB2 database (we are primarly an Oracle house, we've never used DB2 for anything, and I've certainly never touched it before). I finally find a very, very good walk through and start fiddling around. First things first, I use the command line tools to connect to the DB and look at the data. Great, everything's good. I write up the JDBC connection string (I'm starting to get the hang of this), slap it into my code to replace the in-memory database I had been using as a fill in, and restart the application server. Every time the app tries to connect to the DB, the damn thing stalls.

Crawling google, crawling google. I start to think that maybe my connection string is wrong, so I fiddle around with it. Unfortunately, I determine that I had it *right*, because any time it was explicitly *wrong," the app would throw an Exception (as one would expect, actually). It's only when I have the correct connection details that the app hangs on me.

I went out on the web looking for bug info on the jdbc drivers. So, I start by looking up version numbers. Excellent, the database is running v8.2.2 and my workstation has the v7.2.3 client installed. Google revealse that the 7.2.3 *thin client* driver has a bug that causes the application to hang when one attempts to connect to a higher version database. The *thick client* driver does not have this bug. The thick client driver is not well suited to the task (the second user to visit the site will not be able to use it because the next application context will not be able to load the drivers, as the thick client locks them once they are loaded), but for development I can work with it until we upgrade the client on the workstation.

After a while of working in this way, suddenly it stops working, I'm getting Access Denied errors. I can't even use the command line tools anymore, either. It's getting pretty late though, so I went home.

The next day, I get an angry call from the DBA, chewing me out for using the production database for development. Apparently it through a security flag and locked itself down, which prompted a few hundred managers across the state to call this them and complain when they couldn't login to do their daily work. I appologize profusely, and ask for the connection details to the development database. He replies "I still have to set it up." The project manager behind me turns to me and says "that was supposed to have been done weeks ago" and I agree, it was one of the conditions that had to be met before we would come work on site. So, I call my boss (well, I try to, I never reached him, but that's a different story), and we stop work. For the next week. It took the DBA an entire week to get the development database up and running. Luckily it was the week I was on vacation, so I didn't miss much.

At this point, I need to back up and take you down another branch in the story. Before the database locked itself down, I was able to get a good amount of work done. I came to a defect in the list that I couldn't quite figure out how to reproduce. So, after half an hour of phone calls, I eventually located someone that knew how to reproduce the bug. He showed me on the live application. While he is doing this, I'm noticing certain things, like the lack of certain bugs that I had made mental notes to fix. It's a little confusing, but I chalk it up to the fact that we hadn't been running on the DB2 database yet, maybe that was the source of the bugs. If only it were that simple.

While on vacation, I get a call from my boss. He has noticed the same thing, did a little checking on some file dates here and there, and reallized that *we didn't get the latest cut of the code*. Another work stop while the lackeys hunt down the latest code. They have no source control, and the last work done on the app was almost 2 years ago. After another week, they locate a number of different folders labeled as "backups". My boss looked through them briefly (he was heading out for a business trip, another client in North Dakota), and figured that one particular one looked like it might be the full code.

I get there today and start looking at it. There are 5 folders, and not a single one of them have the entire application. The full app is there, spread out in bits and pieces, but not all together. Additionally, some of the backup folders have newer files than others, all the changes overlap between the 5 folders. There are so many badly named backup folders and renamed files (main.jsp, main0.jsp, main.jsp.old, copy of main.jsp, you get the idea) that some files have as many as 9 distinct versions running around. All of the files have at least 3 versions, judging from file size and time stamp. So, I start piecing together a full application from the files with the latest time stamps (shit, windows find utility won't open). I get them all together, setup the application, and then reallize that these various backup folders might represent numerous different "forks" of the app from the LAST time they lost the latest source code.

I'm now in the process of trying to figure out what is the "real code." I started by comparing file sizes in bytes and time stamps. If both values are equivalent, then it's a pretty good bet that they are two copies of the same file. I now have anywhere from 3 to 9 copies of each file. I'm going through and running a file comparison utility (actually, I didn't know CMD had one until now, called FC.EXE) on them to see if files with different time stamps aren't duplicates. 9 versions of one file needs at most 8+7+6+5+4+3+2+1 = 36 comparisons (#1 to #2, #1 to #3, #1 to #4, ..., #7 to #9, #8 to #9). Multiply out by a few hundred files. It took me 6 hours to get through half of them. I still have the other half to go. I need to do it tonight so that the code is ready for the one other developer that is going to work on Saturday to try to make up some lost time.

capn_midnight

capn_midnight

 

gdnet.lounge.con

You know what I'm talking about. That's right, a conference just for the GDNet Lounge.

I'm talking Booze, Bread, and BSD Unix for all (what, you'd think I'd kill such a great alliteration?).

New York City. New Years Eve. New YOU.

The conference will open in a grand ceremony and the cutting of the floor caek that is shaped like pi. We'll have workshops on quitting peeing in the shower. We'll have brainstorming events on Hockey MMORPGs. We might even have a live 3H-GDC (actually, that last one is serious).

DO IT!!

capn_midnight

capn_midnight

 

Icon pics

[disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed][disturbed]
[disturbed][disturbed][disturbed][disturbed]

capn_midnight

capn_midnight

 

AAGHH!

I am so pissed off right now, and this is why:



MOTHER OF PEARL! LINE THE HELL UP!!!

This is a mapping application that we are customizing for a client. They have a format of data called RPF that ESRI MapObjects is particularly bad at cacheing. However, we found an open source project called OpenMap that handles RPF data very well. So it should be a whiz-bang process to create a custom MobObjects layer (the MapObjects API supports this) that uses the OpenMap code to spit out images. Making a small application that did nothing but spit out images given a path to RPF data and the extents of the image was nothing, simple task. Writing custom MapObjects layers is also not a big deal, we do it all the time.l

EXCEPT OPENMAP DOESN'T DEFINE MAP EXTENTS IN ANY SANE MANNER!!!!

Typically, a map extent is defined as the min/max latitude and longitude. OpenMap on the other hand expects a center latitude and longitude, along with a map scale. Fine, whatever, except it completely ignores any concept of aspect ratio! But let's ignore that, let's just calculate the damn scale... wait, you CAN'T because a monitor's pixel-per-inch ratio is not fixed!

So, after much trial and error, I've come up with something that is a reasonable scale factor... I think. Panning the map left-right is good, panning it up-down is okay, but if you pan it diagonally you get this freaking fracturing of the image.

GHAKGHAKALHGAH!!!!!!!

capn_midnight

capn_midnight

 

Grad School Applications, round 2

Well, it's been almost a year and a half since the last time I attempted to gain acceptance to a graduate school. So, here is a statement of academic objectives that I've been working on:



capn_midnight

capn_midnight

 

TDD of graphical applications

I use a lot of Test Driven Development with my projects, mostly because I'm a shitty programmer without it, it is my crutch. But one problem with TDD is that it isn't really suited to anything graphical. You can do some generalized, precursory tests, stuff like making sure the image is the right proportions (like that's hard to do ;)), or checking pixels in very small images (large ones would be far too tedious), but nothing that really ensures that things are actually "right".

Regression testing is a possibility, but it requires screenshots from an existing system (kind of defeating the purpose of TDD), and the tests will fail even if there is 1 pixel different over 1 million pixels. Not very robust.

However, what possibilities lie in the field of signal processing? We can use various concepts of signal processing to compare a compressed image to the original image to get an idea of the level of information loss due to lossy compretion algorithms. What if we also employed neural networks in an attempt to recognize objects actually in the picture?

Again, another project that I will probably start with no intention of finishing.

capn_midnight

capn_midnight

 

A fellow illusionist?

Found this Master's Thesis Proposal dated from 2000.

He talks about investigating the possibility of using optical illusions in computer graphics if they can be used to achieve effects similar to traditional methods as long as the cost of that illusion is less than the traditional method. His portion on illusion is almost exactly the abstract from my paper. It's rather weird

The thing is, I've done google searches on "Optical Illusions in Computer Graphics" a number of times in the past (yes, I was looking for propogation of my paper), but I had never seen this piece before. Even when I originally did my research I didn't find this paper.

Anyway, I did some searches on the guy's name and found some other papers. As far as I can tell, it looks like he just gave up on illusion and chose to stick to Non PhotoRealistic (NPR) Rendering, for example cell shading.

capn_midnight

capn_midnight

 

Gearing up for 3H-GDC m.VI

Okay, we aren't going to have the automated submission system this time. I still haven't had time to do anything with it, and my webspace doesn't support any languages that I like (PHP is a toy that has long outgrown its bounderies).

I might make things a wee bit different this time. We've talked a lot about the base code issue. Some people think it's a great idea, some people don't like it. Here is a thought that I want to bounce off you folks to see if you like it or not:

The official contest runs for a week. The first 165 hours of the week are for developing a game framework. The theme of the contest will not be announced. The theme will only be announced before the last 3 hours of the week.

Any takers?

capn_midnight

capn_midnight

 

presenting at SE conference

One of my old profs is running a software engineering conference at my old university. She has asked me to give a brief presentation. I will be speaking on "the roll of testing in self-guided research."

I will be relating my experiences from my senior research project "Optical Illusions in Computer Graphics." I've identified three different types of testing that I utilized over the course of the project:


Unit Testing: in support of the Test Driven Development design paradigm that I used for the project
User Acceptance Testing: in the form of a survey ran here on Gamedev. The survey was used to determine the effectiveness of the optical illusion techniques.
Performance Profiling: in support of the justification of the project -- that it would provide data complexity similar to more complex, traditional techniques, at a "cost" equivalent to simpler, less data-complex techniques.

capn_midnight

capn_midnight

 

3H-GDC base code

The issue of base-code in the 3H-GDC. Here's why I think it should stay:


cheaters cheat, and I don't know how to stop them. So, allowing the base code elliminates their advantage.
beginners don't know how to code basic graphics, but they can probably figure out the logic. Complete noobs (dare I say, "nooblets"), can't figure out either, so they won't finish anything at all. With base code, perhaps it will encourage beginners (distinctly different than noobs) to stretch out and participate
I want the contest to be more about design and concepts than to be about coding prowress. I want some coding to occur, but one needn't be the next topcoder grand champion in order to win.


thoughts?

capn_midnight

capn_midnight

 

The Future of the 3H-GDC

Alright, so we just finished another wonderful contest, with the highest contestant participation yet. A total of 10 contestants and 8 submissions that came in on time. The submissions were actually all rather impressive for only 3 hours of work.

But where to take the 3H-GDC from here? It's starting to get really popular, and the prizes that were donated for this fourth one were really freaking expensive. I'm beginning to think it's time to get serious about the 3H-GDC.

How serious? Well, holding it regularly, having real corporate sponsors with really, really expensive prizes, having a real website with a real submission process. Basically, fixing everything that I do rather off the cuff right now.

Comments, suggestions? Please don't discuss the base-code issue here, I'm starting a new journal thread for it, as I do think it is a very important issue to get "right".

capn_midnight

capn_midnight

 

the nature of cursing

Note: this post will contain offensive language. As a treatise on the nature of cursing, I believe A) it's necessary, and B) it's appropriate.

Swear words primarily must be offensive. It has to be a taboo word that one uses out of context from its actual denotation. Most of our current swear words are slowly becoming less taboo, meaning their status as swear words is diminishing. There are some notable exceptions, like "nigger" and "faggot" that are becoming more taboo. However, words like "fuck" and "bitch" are definitely decreasing in their taboo level. When my grandmother can say "I am so sick of that fucking asshole", then you know the impact of those words is not quite the same as what it used to be (of course, my grandmother also works at a bar...).

Because of the necessity of the taboo of a word, made up words are not usable as swear words. For new swear words, you must find a word that is not commonly used, is taboo, and is not currently used as some form of epiteth. Racial slurs are quite taboo, but they're already in use, so they do not qualify. For a new curse word to be any good, people must blush or even gasp when they hear it. This is not a nicey-nice game.

I mentioned that the word is used out of context. Words often have conflicting conotations and denotations. Take this (very) short list

word denotation conotation
===================================
fuck to copulate (when used alone) an expression of anger
bitch a female dog a complaining woman
shit fecal matter an expression of anger
faggot a bundle of a homosexual male
sticks and
twigs used to
transport embers


Notice that the words themselves have certain features in common, specifically they are short, often monosyllabic (the word "faggot" is most frequently used as just "fag"), and often composed of hard consonant sounds. Thusly, the word "languish" would not make a good curse word, as it is too long and composed of mainly soft sounds.

So, what short, harsh words fit this necessary taboo nature, and in what context would using them make them a reasonable curse word?

capn_midnight

capn_midnight

 

3H-GDC Prize organization

So far:
1 month GDNet+ from capn_midnight
3 months GDNet+ from Fruny
1 year GDNet+ or an Amazon item of equal or lesser value from Prozac
1 year GDNet+ or a programming-related book retailing less than $100 (wow) from kSquared

capn_midnight

capn_midnight

 

bad for your health

As you know (or should know) work is bad for your health, especially the work we do.

I'm thinking of taking Aikido classes. I found this really cool school. It's not really flashy, it's in the middle of nowhere, it's in an old church, the boxing ring takes up most of the floor, and there are no membership contracts. It's kind of weird to walk into a church, go upstairs, and see weapons every where. Hmmm. I observed a class last night, it looks like a lot of fun. I may have to unlearn all the Taekwondo I learned for my black belt.

capn_midnight

capn_midnight

 

Refactoring with Pong, ep 2

okay, last time on Refactoring with Pong, we demonstrated a poorly designed program, a pong game written in under 30 minutes, with no attention paid to design, naming convention, or documentation.

Now, the engineering process wasn't completely lost. A lot of problems were completely skipped because I used Eclipse. There are a lot of times where Eclipse just won't let you be a stupid programmer, unless you are absolutely ademant about it. Specifically, Eclipse made sure I had all the right classes imported (as well as made sure there were no extra packages imported), as well as made sure each method stub for each interface was at least included in the source file.

However, Eclipse did NOT tell me when I multiplied the y coordinate of the ball by -1 instead of multiplying the y component of the ball's velocity by -1 for bouncing off the side walls. Damn you, you stupid piece of garbage, do what I mean!

Okay, let's discuss the code:

import java.awt.Color;
import java.awt.Cursor;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.image.BufferStrategy;
import java.util.Random;

import javax.swing.JFrame;
import javax.swing.Timer;

/*
* Created on Jul 13, 2005
*
*/

public class Pong extends JFrame implements MouseMotionListener, MouseListener, ActionListener
{
int p1x = 10, p1y = 0, p2x, p2y = 0, bx, by, bdx, bdy, s1 = 0, s2 = 0, state = DEAD, minspd = 2;
static int DEAD = 0, PLAY = 1;
Random r = new Random();
BufferStrategy bs;
Timer t;
Pong()
{
super("Pong in 27 minutes");
this.setBounds(0, 0, 800, 600);
this.addMouseMotionListener(this);
this.addMouseListener(this);
this.setVisible(true);
this.createBufferStrategy(2);
this.setBackground(Color.BLACK);
this.setForeground(Color.WHITE);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
bs = this.getBufferStrategy();
t = new Timer(1, this);
p2x = this.getWidth() - 10;
t.start();
}
/**
* @param args
*/
public static void main (String[] args)
{
new Pong();

}
public void mouseDragged (MouseEvent arg0)
{
// TODO Auto-generated method stub

}
public void mouseMoved (MouseEvent arg0)
{
p1y = arg0.getY();
}
public void actionPerformed (ActionEvent arg0)
{
update();
paint();

}
public void paint()
{
Graphics2D g = (Graphics2D) bs.getDrawGraphics();
g.clearRect(0, 0, this.getWidth(), this.getHeight());
g.setColor(Color.WHITE);
g.fillRect(bx-5, by-5, 10, 10);
g.fillRect(p1x-5, p1y-20, 10, 40);
g.fillRect(p2x-5, p2y-20, 10, 40);
g.setFont(new Font("fixedsys", 24, 24));
g.drawString(""+s1, this.getWidth()/3, 60);
g.drawString(""+s2, this.getWidth()*2/3, 60);
g.drawLine(this.getWidth()/2, 0, this.getWidth()/2, this.getHeight());
if(state == DEAD)
{
g.drawString("click a mouse button to start play", this.getWidth() - 500, this.getHeight()/2);
}
bs.show();

}
public void update()
{
if(state == PLAY)
{
bx += bdx;
by += bdy;
if(bx >= this.getWidth()){
s1++;
state = DEAD;
}
else if(bx0){
s2++;
state = DEAD;
}
if(40>= by || by>=this.getHeight())
{
bdy*=-1;
}
checkPaddles();
AIMove();
}

}
public void checkPaddles()
{
if(p1x - 5 5 >= bx && p1y - 20 20 >= by)
{
int dy = by - p1y;
bdx *= -1;
bdy += dy/10;

}
else if(p2x - 5 5 >= bx && p2y - 20 20 >= by)
{
int dy = by - p2y;
bdx *= -1;
bdy += dy/10;
}
}
public void AIMove()
{
if(by > p2y) p2y += 7+minspd/2;
if(by 7+minspd/2;
}
public void mouseClicked (MouseEvent arg0)
{
if(state == DEAD)
{
bx = this.getWidth()/2;
by = this.getHeight()/2;
bdx = r.nextInt(5)+minspd;
bdy = r.nextInt(5)+minspd;
minspd++;
state = PLAY;
}

}
public void mouseEntered (MouseEvent arg0)
{

}
public void mouseExited (MouseEvent arg0)
{
// TODO Auto-generated method stub

}
public void mousePressed (MouseEvent arg0)
{
// TODO Auto-generated method stub

}
public void mouseReleased (MouseEvent arg0)
{
// TODO Auto-generated method stub

}
}


there are so many things wrong with this code, I don't even know where to begin. Probably the biggest thing is that only half the code is there.

"Wait... what?" you say. "I'm looking at the code right now. I see two paddles, a ball, a window to play in, and enough processing to actually get the game running, even have score keeping. What could be missing?"

Tests. This code is not tested. The fact that it even ran the first time was only because Eclipse let's you know when the code is free of syntax errors AS YOU CODE. I wrote code without ever writing a single test first, and that is just a cardinal sin.

Though tests are not actually a refactoring process, they are essential to refactoring. The tests are what tells you "you stupid programmer, you 'fixed' the code and now nothing works". They also tell you exactly what happened after you "fixed" the code.

What else is wrong... bad variable names, lack of any reasonable OOP features, completely monolithic design, duplicated code (maybe I could have got it done in less than 27 minutes if I hadn't duplicated so much code), and a GUI intertwined into the logic code causing a tanlge worse than the cables behind your desk (seriously, how do they get that way? I remember draping them neatly back there, why the tangle?). It's amazing I ever got this thing to run.

Ugh, I've sickened myself. I need to stop for today. Think about these problems and we'll meet again tomorrow.

capn_midnight

capn_midnight

Sign in to follow this  
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!