Follow-up on my grass…
No AA:
8xTSRAA with supersampled alpha test:
Screenshot comparison: http://screenshotcomparison.com/comparison/110083
Follow-up on my grass…
No AA:
8xTSRAA with supersampled alpha test:
Screenshot comparison: http://screenshotcomparison.com/comparison/110083
I am supporting indie games and made a video
A6VMT0HrXIg
I implemented the Bresenham algorithm for drawing and filling ellipse : http://www.java-gaming.org/topics/fill-ellipse-from-a-fragment-shader/35411/msg/335293/view.html#msg335293
Il will continue on the fragment shader version with advises of other members.
Started learning Perl a little while ago after getting inspired from playing with regex’s. Wrote my first Perl command-line “guess the number” game today, amongst other things, to test some of the language’s nuances. There’s something strangely refreshing about going back to basics.
…I guess I’ll go join perl-gaming.org now???
Got loops working in PoppetScript, the 3D modelling language you don’t need.
model: "ground"
pointsPerArc:6
texture: "grass"
bottomLeft: 0.0,0.505
topRight: 0.5,1.0
mesh: "ground"
loop: 20
offset: 0.0, 0.0, 10.0
loop: 20
offset: 10.0, 0.0, 0.0
properties:
useTexture: "grass"
line:
offset: -100.0, 0.0, -100.0
vector: 0.0, 1.0, 0.0
start: 0.0, 0.0, 0.0
end: 10.0, 0.0, 0.0
line:
offset: -100.0, 0.0, -90.0
vector: 0.0, 1.0, 0.0
start: 0.0, 0.0, 0.0
end: 10.0, 0.0, 0.0
line:
offset: -100.0, 0.0, -100.0
vector: 0.0, 1.0, 0.0
start: 0.0, 0.0, 0.0
end: 10.0, 0.0, 0.0
I have identified another flaw, I have appreciated myself in my previous post.
All I did was changed the link URLs a bit, and it worked fine. It is not in the count though.
Been prototyping an R-tree implementation using fancy Sort-Tile-Recursive bulk loading, as detailed here.
Generated from random points, notice the nice, clustered, non-overlapping (leaves) packing:
Probably one of my favorite data structures.
Was looking through some old code of mine (a couple years old) and discovered that, in this particular project, I kept a diary of sorts in the comments… Each day, when I implemented something new or fixed something, I would do a little entry of what I did that day and general feelings along with the date. It was very strange and slightly nostalgic.
Nice job. Looks great.
I found that caching objects in local groups can speed up 2D pathfinding and even rendering significantly. I made something similar for polygons (regions) rather than points which was just a simple 2D array of tiles. Would be interesting to see your algorithm working with overlapping regions too.
What do you plan to use your algorithm for?
Made myself a simple game updater, got a problem: how do i launch the downloaded .jar file?
example:
Patcher.jar
Game/Game.jar
Game/Test.png
the Game.jar loads the Test.png like this:
new File("./Test.png");
I tried the following Code inside the Patcher.jar to launch the Game.jar:
Runtime.getRuntime().exec("java -jar ./Game/Game.jar");
but there’s 2 problems:
first: the Game.jar doesn’t fine the Test.png file anymore cause it doesn’t search in the Game folder
second: the Patcher.jar has to stay open for the Game.jar to keep running, i want the Patcher.jar to close
Anyone knows how to get that? ._.
Sounds like the good ol’ Bin.
R-trees can be used for arbitrary shapes as well, both storage and queries, the two types of queries most suited to them is intersection/containment (given shape S, what objects in the tree intersect it?) and k-nearest neighbors.
I’m entering a contest which requires fast spatial queries; I deemed R-trees the way to go.
Now to port it to C… :persecutioncomplex:
the current directory is the directory from where java was launched from. If it can’t find it then you didn’t execute your jar in the same directory as Test.png
To run a totally separate process in java is tricky because there isn’t a platform independent way to do it. For windows you can force it by maybe doing cmd /c
Runtime.getRuntime().exec("cmd /c start java -jar ./Game/Game.jar");
You are probably ok on linux / mac osx but if not you could use nohup.
// Path to Game directory
Path directory = Paths.get(SomeClass.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toAbsolutePath().resolveSibling("Game");
// Path to Game.jar
Path targetJar = directory.resolve("Game.jar");
ProcessBuilder pb = new ProcessBuilder("java");
pb.command().add("-jar");
pb.command().add(targetJar.toString());
pb.inheritIO();
try
{
pb.start();
}
catch(IOException e)
{
e.printStackTrace();
}
// Clean up launcher here.
cleanUpLauncher();
// Then exit
System.exit(0);
Additionally, never use relative paths for loading resources.
public static Path assemblePath(String... path)
{
// Get the fodler the jar is located in.
Path target = Paths.get(SomeClass.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toAbsolutePath().getParent();
for(String p : path)
{
target = target.resolve(p);
}
return target;
}
Which can be used like this: [icode]Path resourceFile = assemblePath(“path”, “to”, “your”, “resources”, “some_resource.png”);[/icode]
All the code I’ve provided uses Java 7+. If you need a Java 6 version, I can provide that too.
How’s the trackball? I always thought those were neat, but have never used one.
Absolutely amazing, been using them for 3 years and have never gone back.
I used one for about 3 years as well (I don’t anymore), and they’re great except that I think it’s a little harder to be as precise. Also, I noticed that performing dragging gestures were sometimes a little hard, even after using one for that long.
Today (and the last few weeks) I mostly got very frustrated at not having any time to do anything - day jobs suck. About to get distracted writing a mini-game so I can say I’ve done something in the last month or so.
Cheers,
Kev
Ah yes the curse of the day job. Well mine is going so badly right now i may well not have one really soon :-\
What did i do today? Broke even more code that was suppose to be released months ago.