Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Chavo

Pages: [1] 2
1
JavaOp Support Archive / Re: JavaOp 2.1.2 To-Do List:
« on: September 15, 2009, 06:15:15 pm »
changelog goes in SVN commit! Generalizations = bad!

2
Lead's House of Shenanigans / Amazing new Energy Boost method
« on: September 02, 2009, 11:33:47 am »
Step 1: Have a regular, adequate sleep schedule
Step 2: drink enough water
Step 3: don't each too much sugar/have a balanced diet
Step 4: boost your metabolism with daily exercise
Step 5: Defeat insomnia by avoiding ocular stimulation right before bedtime
Step 6: Tired? Take a nap!

I've personally tried this method and while it seems like there are a lot of steps, there are NO CRASHES and NO SIDE EFFECTS!!!  Also, it is 100% FREE

I really think we should try to market this guys, we could put 5 Hour Energy and Random Energy Pill X out of business!


/cheap jab at Lead  :-*

3
General Discussion / Winners
« on: August 30, 2009, 11:39:34 pm »
For those of you even mildly interested in Heroes of Newerth, the dota-clone game that is in closed beta which I have been participating in heavily:

Team fiVe (my team), won the very first Competitve HoN tournament.  This wasn't a very big tournament and was primarily to help promote the cause, but still an exciting achievement! :)

http://www.gamereplays.org/heroesofnewerth/portals.php?show=news&news_id=532608&home

4
Gaming / Heroes of Newerth Beta
« on: June 22, 2009, 03:34:05 pm »
I have a few extra keys for this game if anyone is interested.  I'm not sure how much I can tell you in a public place like this because of the NDA, but I can tell you that it's a purist clone of DotA with a huge amount of improvements due to the fact that it has it's own engine rather than being a mod of Warcraft 3.  Hit me on AIM if you need more info than that.  The site is heroesofnewerth.com, but there's literally zero information there right now.  I'm not sure how soon they'll be releasing details but it should be in the next monthish.

5
Trash Can / Re: Can't Get bot to connect (using mac)
« on: May 26, 2009, 08:14:46 pm »
if that's not an attempt at trolling, you probably should give up on javaop

6
Botdev / W3G->W3GS
« on: February 23, 2009, 01:22:43 pm »
Project Goal
Host and 'replay' a warcraft3 replay file as a multiplayer custom game on battle.net.  Because warcraft3 replays are essentially just instructions for the engine to play the game over, it should be possible to use a replay file to instruct the engine to perform similar actions in a multiplayer context.  The W3GS protocol is known well enough to have determined that the action packets are extremely similar to the action blocks used in the warcraft 3 replay format which makes this even easier.

General process overview
  • parse replay file for player information, map filename, action list, and chat
  • create battle.net lobby with player information and map signature
  • allow human players to join as ghosted observers (they cannot see each other so as to avoid player-id limitations)
  • start game and inject modified actions & chat at the correct times

The problem
I currently have this process working with one catch: actions are injected properly but ignored by remote clients.  I have determined that this issue is almost certainly because of a specific portion of the data in an action block.

this is an example action block as it exists in the replay file

1F              timeslot block, contains action block (see w3g_format.txt, w3g_actions.txt)
2B 00          length of data to follow
FA 00          time in milliseconds since last interval
01              player ID of the action
26 00          action block length
16              action ID: change selection
02              select mode
01 00          number of objects
74 71 00 00  objectID1
76 72 00 00  objectID2
16              action ID: change selection
01              select mode
01 00          number of objects
26 73 00 00  objectID1
40 74 00 00  objectID2
1A              action ID: pre subselection
19              action ID: select subgroup
38 30 30 6E  itemID (constant)
26 73 00 00  objectID1
40 74 00 00  objectID2


The action block portion of the data follows the same format for W3GS packets with some differences in header data which is easy to create.  The issue here is that the objectID values are, at my best guess, relative memory pointers.  The objectID values for the objects created at map startup at the same for a given map.  When new objects are created, their assigned objectIDs may not necessarily be the same.  Generally they can be the same if the same sequence of events happens (I believe time itself is not important, which strengthens my belief that these point to memory locations).  Furthermore, once an object has been assigned ObjectIDs, they do not change.  Objects of the same type (acolytes, for example) will have the same offset between objectIDs which makes sense since two acolytes should take up the same amount of space in memory.  Different units/buildings will have different offsets.  When I say offset, I mean the difference between objectID1 of two sequentially created objects of the same type.  At this point, I do not have a strong opinion regarding the importance of the second objectID. Sometimes it is the same as objectID1, sometimes it is not.

The challenge here is to determine if it is possible to alter these objectIDs in such a way that the clients will be able to use the memory pointers correctly (seems unlikely if initialization isn't predictable) or to manipulate the game setup in such a way that the objectIDs will be correct for players watching the game.

I attached a zip file with some of my example data that I've been generating.  Any insight on this objectID challenge would be appreciated.

7
Unix / Linux Discussion / Uses for extra server resources
« on: February 04, 2009, 06:14:59 pm »
This isn't necessarily restricted to *nix platforms, but I have a significant amount of processing power available on my home network that I feel is being underutilized.  Specifically, a web server (Debian) that is probably at a good load (.07, .03, .01) for a web server but could easily handle more web services or provide more requests for database applications (MySQL database is local to the webserver), a FreeNAS box that is horribly underutilized (P4, 512MB RAM machine that does nothing but handle backups at the moment, the only reason I have this machine as a NAS is because it has the tertiary IDE port that allows me to RAID more drives). Lastly, I have a beast that I was using as a test machine for a while, but it's been sitting in the closet turned off for a month now.  I run most of my vm applications on my desktop that has plenty of resources available to do so.

Any ideas on what to do with the extra power? I've never really been interested in donating processor power to the *@HOME projects, but I'm looking for some good uses of these computers that are either interesting or useful.

8
General Programming / Extending a project to include wireless control
« on: January 16, 2009, 04:23:42 pm »
I have a microcontroller project that currently accepts input via a serial connection.  I'd like to extend by allowing wireless input.  I've done a bit of research and decided the easiest way would be for me to use the Bluetooth Serial profile (adding a Bluetooth module to implement a serial bluetooth receiver should be easy).  The part I have no experience with is creating an application to utilize the bluetooth stack and create the serial connection.  I was wondering if anyone had any experience here with bluetooth programming, or even j2me/similar mobile programs as I will likely want the application to work on my cell phone or PDA (Palm OS 2.x). 

Some specific questions I have include,
  • Do I need to include device discovery as part of the steps to create a Serial connection between the controller and device?
  • Are there any pitfalls to avoid when developing a mobile program compared to a desktop application or programming for an embedded device (a la microcontroller programming)?
  • Recommendations on language, API, IDE, or platform to use?

9
Entertainment District / This is not a rick-roll
« on: November 05, 2008, 01:44:51 am »
http://garyc.mooo.com:3232/rr/

(note link is harmless, but requires javascript/flash to be enabled)


10
Entertainment District / Clean Install
« on: April 14, 2008, 10:59:35 pm »
This is an article from TheDailyWTF.com that I found particularly humorous.

Quote from: http://thedailywtf.com/Articles/A-Clean-Install.aspx
Originally posted by "Dirk"...

    A friend of mine recently bought a product called PrintMaster. He had some trouble installing the software and called me up for some tech support. He was receiving an Error 1305, for which a quick Google search lead me towards the following:

        ... Completing a clean installation of the program will help to prevent conflicts that can occur. The remainder of this note describes the procedure...

    All right, I thought a clean install, let's read on and see how to do a clean install:

       1. Place a small amount of nonabrasive, liquid soap on the shiny side of the CD or DVD.
       2. Using your fingertips and warm water, gently rub the soap on the disc in a circular motion.
       3. Rinse the disc thoroughly and dry it using a clean, soft T-shirt or lint-free towel. Do not use paper towels or tissue paper.
       4. Install the program.

    Doing a "clean install" has now taken on a new meaning for me.

11
Gaming / Pardus
« on: November 27, 2007, 01:52:17 am »
Anyone into space-based, tick-based, browser-based MMORPGs?

I recently got into Pardus.

The tutorial is really boring and fairly lame, but it does a good job of teaching the basics.  Once into the actual game, it really gets fun.


Check it out and if you decide to play, I'm Chavo on Artemis, based in Sirion (Union, Heaven's Wrath Alliance).  Even if you don't start in the Union, its an easy day or two fly to our sector (where we can give you some starting resources to speed things up ;))

12
I needed something to consistently find the closest mirror.  At first I was thinking pings, but realized that relying on ICMP traffic would be a bad gauge if some mirrors disable it.  Then I considered location lookups based on IP but that is too broad for many purposes and often inaccurate.  So behold this 'psuedo-ping' solution! :P

Run it with debug on if you want more verbose information.

Code: [Select]
/*
 * Find the fastest mirror! :)
 */
import java.io.IOException;
import java.net.ConnectException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;

public class MirrorSelector {

private static boolean DEBUG = false;
private static int MAX_TIME = 1000; // timeout time in ms and default length if an error occurs

public static InetSocketAddress selectMirror(InetSocketAddress[] mirrors)
{
Socket s = new Socket();
long[] times = new long[mirrors.length];
long start;

for(int i=0;i<mirrors.length;i++)
{
try{
s = new Socket();
start = System.currentTimeMillis();
s.connect(mirrors[i], MAX_TIME);
times[i] = System.currentTimeMillis() - start;
s.close();
if(DEBUG)
System.out.println("Connecting to " + mirrors[i] + " took " + times[i] + "ms");
}
/* I considered condensing all the specific exceptions into a generic handler
* since they all respond basically the same way
*/
catch(SocketTimeoutException ste)
{
System.out.println("Address " + mirrors[i] + " timed out");
times[i] = MAX_TIME;
}
catch(ConnectException ce)
{
System.out.println("Connect Exception: " + ce.getMessage() + " for " + mirrors[i]);
if(DEBUG)
ce.printStackTrace();
times[i] = MAX_TIME;
}
catch(SocketException se)
{
System.out.println("Unable to connect to " + mirrors[i]
     +", there may be a problem with your network connection.");
if(DEBUG)
se.printStackTrace();
times[i] = MAX_TIME;
}
catch(IOException ioe)
{
System.out.println("Error connecting to " + mirrors[i]);
if(DEBUG)
ioe.printStackTrace();
times[i] = MAX_TIME;
}
}

int fast_id = 0;
long fast_time = MAX_TIME;
for(int i=0;i<times.length;i++)
{
if(times[i] < fast_time)
{
fast_id = i;
fast_time = times[i];
}
}

return mirrors[fast_id];
}

public static InetSocketAddress getClosestMirror(String hostname, int port)
{
InetAddress[] ips;

try{
ips = InetAddress.getAllByName(hostname);
}
catch(UnknownHostException uhe)
{
System.out.println("Unable to resolve host: " + port);
return null;
}

InetSocketAddress[] mirrors = new InetSocketAddress[ips.length];
for(int i=0;i<ips.length;i++)
{
mirrors[i] = new InetSocketAddress(ips[i], port);
}

return selectMirror(mirrors);
}


public static void main(String[] args)
{
System.out.println("Fastest: " + getClosestMirror("google.com", 80));
}
}

13
Unix / Linux Discussion / Linux ERRORLEVEL equivalent?
« on: April 16, 2007, 11:03:04 am »
I have a simple script that I use to keep an application running on a windows machine:

Code: [Select]
:loop
;// execute a shell command
IF ERRORLEVEL == 1 GOTO loop
pause > nul

The program this is keeping alive I'm wanting to move to an offsite server that is running Linux.  Obviously I'll need to convert the script to something bash can understand, but the ERRORLEVEL variable is where I am lost.  ERRORLEVEL in Windows is a variable that holds the integer return value of the last command that executed.  For any normal program termination that is usually 0.  I have this particular program set to return 1 (System.exit(1)) when there is an error.  It logs the error on its own and this script restarts the program.  Anyone know the linux equivalent?

14
General Programming / MySQL performance.
« on: March 21, 2007, 10:23:57 am »
I'm writing an application/website that have a shared MySQL database (local to both).  I've abstracted all the mysql queries to their own layer so that my program could easily be switched to another type of backend.  In any case, I'm trying to decide how to implement some of the classes that handle queries.

First Decision:
a) maintain one/few connections to the myssql server using keepalive requests
b) open/close connection for every set of queries (ie open at the beginning of every method, close at the end of every method)

Keeping in mind its on localhost, it seems like option a) would be more efficient, but b) seems to be the correct way if I'm following general IO paradigms.  For some calls, I could be doing 200 transactions in a second or two so I'm hesitant to choose b).


Second Decision:
What is the best way to store arrays of data?  Right now I'm using a varchar that holds a string with space delimitted integers but it seems there has to be a better way.


Third Decision:
a) fewer tables, more columns
b) more tables, fewer columns

does it matter?

Anything other suggestions from mysql design gurus?

15
General Discussion / SMF boards question
« on: January 23, 2007, 05:55:13 pm »
I didn't know where else to put this.

for the "I'd like to join!", you have it setup so that regular members can create topics, but not reply to others

I'd like to mimic this behavior (for different functionality) on another board but don't see how you are doing so, help?

Pages: [1] 2