TarCraft
http://damocles11.byethost9.com/tarcraft.html
Repell the attackers on the spacestation.
You have to rescue your comrades first.
Second try, I was reworking this version a bit. There is still some optimization to do of course.
TarCraft
http://damocles11.byethost9.com/tarcraft.html
Repell the attackers on the spacestation.
You have to rescue your comrades first.
Second try, I was reworking this version a bit. There is still some optimization to do of course.
whilst i luv the graphics, they are just a little static for my liking… perhaps you can scavange some bytes from back ground sprites to allow some marine animation?
Its voxelgraphics actually.
But true, it looks too static.
Maybe I try some animated voxels.
But its kind of hitting the limit (for me) here.
Also the text has to go. Such a spacewaster.
Selection do not work if you go from downt to upwards.
if you like another pair of eyes to run over your code to look for possible optimisations then i am happy to have a look. PM me if you like.
Nice remake!
however, I’m worry about the copyright thing. Is it okay to use same sprite as them?
if not, then it’ll nice to see zergg as the enemy ;D
Hi, i have a question with understanding your sourcecode (http://damocles11.byethost9.com/applet/CraftCraft.java).
Somehow i have no idea how the passage between:
switch (unit [ i ][14])
and
g = imgScreen.getGraphics();
is working. Especially the “while (true)” loops do not seem to make any sense.
Regards
Locks up my browser every time. FF 4.0 linux 64bit.
The game runs fine on my Ubuntu.
Do you run an OpenJDK? I installed the original Java back, as I think OpenJDK ist still too flawed, and I dont see any
advantage for the normal consumer in it.
The code is the RTS-AI logic part.
The game is a bit old though, I will probably not submit it.
Was an early test on 4k.
latest java 1.7 here. Applets sux plain and simple…
You had posted about several problems with several other Javaprojects before.
How about updating your Firefox and reverting to Java1.6?
What else than applets to use for running a Javagame in a Browser then?
Yep thats right. It is my fault and i need to spend hours fixing things… don’t try that with paying customers… FF 4.0 is not old. I also tried java 1.6 and openjdk FWIW. Every 4k comp, the “does not work here” are ignored. Its does nothing for the comp.
You know perhaps there really is a problem at the 4k end? After all, other applets work fine for me. Its 4k in particular that doesn’t.
Yes i understood that these lines are for moving/attacking units responsible. To be honest i avoid using labels like hell so i have always problems with break and goto labels in general. Anyway especially these lines are confusing because i don’t see how this should work:
while (true) <---?
if ((other != i) && (unit[other][2] == 0) && (unit[other][14] != 5) && (Math.abs(unit[i][0] - unit[other][0]) < 2) && (Math.abs(unit[i][1] - unit[other][1]) < 2))
{
unit[i][14] = 0;
}
else
{
other++; if (other < unitCount)
{
continue;
}
break;
int other = 0;
while (true)
{
...
other++; if (other < unitCount)
{
continue;
}
break label4639; <---?
unit[i][15] -= 1;
...
unit[i][14] = 0;
break; <---?
..
How is the code working if there is a break inside?
In my approach break and continue are worth use, goto not. Break and continue only affect flow of looping.
@OP: but you should submit this
Whether goto’s worth using or not, I think you’ll have a hard time using it in java. But in general if you’re shaving opcodes to fit into 4k, don’t expect the most readable source code.
In this case her the label was the easiest option to leave the whole while-loop.
If it works, why not use it?
In my opinion, your TarCraft is the best looking game down here. These animated voxels are definitely something to deepen, considering your game and Star Vox 16K which uses them too.
why cant you select by dragging from the bottom to the top?
Just get the smallest x,y and the biggest x,y in the rectangle and check if a unit is in there
Screenshot looks good but doesn’t work here am afraid. Firefox 3, Java6, Win2000
Start new Level:1
Exception in thread “Thread-9” java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.(Unknown Source)
at java.awt.image.Raster.createPackedRaster(Unknown Source)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at java.awt.image.BufferedImage.(Unknown Source)
at T.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Win2000?!?!? O________O