Post new topic    
Page «  1, 2, 3  »
Slime Knight
Send private message
 
 PostThu Jun 30, 2011 1:27 am
Send private message Reply with quote
I have a new goal now: to make the first working tool in the HW suite, RELOADspy. It will be a single window with a tree-view on top and information about the selected node on the bottom.
Red Slime
Send private message
 
 PostThu Jun 30, 2011 1:47 am
Send private message Reply with quote
Interested in seeing how this goes... Got any builds for download somewhere, or is it just the java source files at this point?
Slime Knight
Send private message
 
 PostThu Jun 30, 2011 2:02 am
Send private message Reply with quote
Just the source right now.
Slime Knight
Send private message
 
 PostTue Jan 31, 2012 2:59 am
Send private message Reply with quote
Coding now continues after a long hiatus. If you know Java and are interested in joining the project, tell me.
 
 PostTue Jan 31, 2012 3:13 pm
Send private message Reply with quote
Truthfully, I would be more interested in a program that let people play your games online. If I am anywhere I am ready and willing to work on my game, everything I need is on my computer, and I would already have my computer with me, being able to edit online seems a tad pointless.

Being able to host the game online to play would be AMAZING though! Post that up on some facebook, and watch the like's roll in! heh...I wish...
We are Narkotix Team! We call ourselves such, because we aim to make games that are addicting as drugs!

(and no, we don't condone, or do drugs.)
Slime Knight
Send private message
 
 PostThu Feb 02, 2012 6:23 am
Send private message Reply with quote
Narkotix Team wrote:
Truthfully, I would be more interested in a program that let people play your games online. If I am anywhere I am ready and willing to work on my game, everything I need is on my computer, and I would already have my computer with me, being able to edit online seems a tad pointless.

Being able to host the game online to play would be AMAZING though! Post that up on some facebook, and watch the like's roll in! heh...I wish...


You're confusing Java with Javascript. This is a standalone program.
Metal King Slime
Send private message
 
 PostFri Feb 03, 2012 5:51 am
Send private message Reply with quote
I'm impressed that you've picked it up again; that's something most people doing similar projects have failed at :)
Slime Knight
Send private message
 
 PostFri Mar 23, 2012 8:20 pm
Send private message Reply with quote
If there is anyone out there who knows Java, I'm kinda stuck on a particular problem...

http://stackoverflow.com/questions/9845940/how-do-i-handle-a-multi-type-tree-system-in-java

Also, here's a prototype GUI:
Super Slime
Send private message
 
 PostFri Mar 23, 2012 11:08 pm
Send private message Reply with quote
I'm no Java expert, but I think Thomas has it here. You don't need generics; you could do something like this:

Code:
private int intData;
private double floatData;
private String stringData;

int getInt() {
   if (type == INTTYPE) return intData;
   throw WrongTypeException;
}

double getFloat() ...
String getString() ...
ReloadNodeType getType() ...


This might not be exactly the way to go about it, but I've seen this design pattern elsewhere. In that particular example, it is a lot more forgiving about type conversion, but again, I'm no Java expert.
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Liquid Metal King Slime
Send private message
 
 PostSat Mar 24, 2012 3:48 am
Send private message Reply with quote
Yeah, I don't really know java either, but you only need to be able to read and write the tree structure to/from a file. There is no need to exactly re-create reload's tree-structure with java, since you can just use some existing java tree structure. (We don't have that luxury in FreeBasic, but I would love it if we did)
Slime Knight
Send private message
 
 PostSat Mar 24, 2012 10:31 pm
Send private message Reply with quote
Changed the RELOAD code to be more compact and less dependant on generics. If you want to be on this project, feel free to ask!
Metal King Slime
Send private message
 
 PostSun Mar 25, 2012 2:07 am
Send private message Reply with quote
The different integer RELOAD on-disk node types should all be loaded to a single in-memory integer RELOAD node value type. There are different on-disk integer types just so that the most efficient one can be used when serialising the tree. The OHR's RELOAD implementation distinguishes between in-memory and on-disk node types. You're not the first to make this mistake; the documentation should be improved. (Edit: did so, but there's not much to see)

Also, technically a string node with value "3" and an integer node with value 3 are equivalent ways of encoding the same value, but we don't currently depend on that flexibility. Unless you create a RELOAD document using xml2reload (resulting in the string "3" being optimised to the integer 3), which your implementation wouldn't handle.
Slime Knight
Send private message
 
 PostMon Mar 26, 2012 7:01 am
Send private message Reply with quote
Here is the improved RELOADNode class:

Code:
package hamsterwrench.data.reload;

/**
 * @author Matt
 *
 */
public class RELOADNode {
   
   //declarations
   private ReloadNodeType type;
   private short byteData;
   private short shortData;
   private int intData;
   private long longData;
   private double floatData;
   private String stringData;
   
   //constructors
   public RELOADNode() {
      type = ReloadNodeType.NULL;
   }
   
   public RELOADNode(short data, boolean isByte) throws ReloadOutOfBoundsException {
      if(isByte){
         if(data >= 0 && data < 256){
            type = ReloadNodeType.BYTE;
            byteData = data;
         } else throw new ReloadOutOfBoundsException();
      }
      else{
         type = ReloadNodeType.SHORT;
         shortData = data;
      }
   }
   
   public RELOADNode(int data){
      type = ReloadNodeType.INT;
      intData = data;
   }
   
   public RELOADNode(long data){
      type = ReloadNodeType.LONG;
      longData = data;
   }
   
   public RELOADNode(double data){
      type = ReloadNodeType.FLOAT;
      floatData = data;
   }
   
   public RELOADNode(String data){
      type = ReloadNodeType.STRING;
      stringData = data;
   }

   public short getByteData() throws ReloadWrongTypeException {
      if(type == ReloadNodeType.BYTE) return byteData;
      else throw new ReloadWrongTypeException();
   }

   public void setByteData(short byteData) throws ReloadWrongTypeException, ReloadOutOfBoundsException {
      if(type == ReloadNodeType.BYTE){
         if(byteData >= 0 && byteData < 256) this.byteData = byteData;
         else throw new ReloadOutOfBoundsException();
      }else throw new ReloadWrongTypeException();
   }

   public short getShortData() throws ReloadWrongTypeException  {
      if(type == ReloadNodeType.SHORT) return shortData;
      else throw new ReloadWrongTypeException();
   }

   public void setShortData(short shortData) throws ReloadWrongTypeException  {
      if(type == ReloadNodeType.SHORT) this.shortData = shortData;
      else throw new ReloadWrongTypeException();
   }

   public int getIntData() throws ReloadWrongTypeException  {
      if(type == ReloadNodeType.INT) return intData;
      else throw new ReloadWrongTypeException();
   }

   public void setIntData(int intData) throws ReloadWrongTypeException  {
      if(type == ReloadNodeType.INT) this.intData = intData;
      else throw new ReloadWrongTypeException();
   }

   public long getLongData() throws ReloadWrongTypeException  {
      if(type == ReloadNodeType.LONG) return longData;
      else throw new ReloadWrongTypeException();
   }

   public void setLongData(long longData) throws ReloadWrongTypeException  {
      if(type == ReloadNodeType.LONG) this.longData = longData;
      else throw new ReloadWrongTypeException();
   }

   public double getFloatData() throws ReloadWrongTypeException  {
      if(type == ReloadNodeType.FLOAT) return floatData;
      else throw new ReloadWrongTypeException();
   }

   public void setFloatData(double floatData) throws ReloadWrongTypeException  {
      if(type == ReloadNodeType.FLOAT) this.floatData = floatData;
      else throw new ReloadWrongTypeException();
   }

   public String getStringData() throws ReloadWrongTypeException  {
      if(type == ReloadNodeType.STRING) return stringData;
      else throw new ReloadWrongTypeException();
   }

   public void setStringData(String stringData) throws ReloadWrongTypeException  {
      if(type == ReloadNodeType.STRING) this.stringData = stringData;
      else throw new ReloadWrongTypeException();
   }
   

}


Also, the limits are there so that an inappropriate value for the type won't be written to disk during serialization.
Slime Knight
Send private message
 
 PostTue Mar 27, 2012 12:57 am
Send private message Reply with quote
James, would it be OK if I used some sprites from Wandering Hamster as icons?
Super Slime
Send private message
 
 PostTue Mar 27, 2012 2:10 am
Send private message Reply with quote
Ichiro wrote:
Here is the improved RELOADNode class:


I feel like I was helpful. Was I helpful?
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Display posts from previous:
Page «  1, 2, 3  »