Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 5
1  Game Development / Newbie & Debugging Questions / Re: [SOLVED]how to load file depending on the folder where the Jar exists on: 2013-05-13 23:06:52
Thanks.  I will need to look into my programs to fix this, as I don't like populating ~.
2  Game Development / Newbie & Debugging Questions / Re: how to load file depending on the folder where the Jar exists on: 2013-05-12 01:45:52
1  
System.getProperty("user.dir") + path + to + your + file;


I've found that System.getProperty("user.dir") returns the home directory on Ubuntu (so if your jar is in /home/sam/Documents/PixelZombies/ it will return /home/sam/) unless you go to Terminal and cd to the desired directory and then run the jar via the Terminal.  So if you right click the JAR and click "Run in OpenJDK Runtime" (I believe that is what it is, but I'm not on Ubuntu right now) it will not return the right value.  This could actually just be an OpenJDK error, but if it isn't, is there a better way to get the same result?
3  Discussions / General Discussions / Re: Weirdest Practical Programming Language on: 2013-05-11 15:46:57
I think that HAI maybe just defines that it is a file?  I can't see it being the starting point because in the hello world example it says
CAN HAS STDIO?
which would obviously equate to
#include <stdio.h>
.  So I don't actually know what HAI is anymore.
4  Discussions / General Discussions / Re: Weirdest Practical Programming Language on: 2013-05-10 22:32:17
Hmm.  The LOLCODE example makes complete sense to me.
5  Discussions / General Discussions / Re: Programming on iOS on: 2013-05-07 23:17:19

I did not mean programming for iOS, because I am pretty sure that requires a Mac and then to actually put your app on your iPod that might require jailbreaking which I am not up for.  I meant programming on iOS, as in you open an app, type in some code, and then it gets compiled.
6  Discussions / General Discussions / Re: Programming on iOS on: 2013-05-07 04:00:10
Yeah I can't see anything Java related on iOS based on Apple not wanting it.  I think there is a Java app that compiles through the web but that's not what I'm looking for.  On Android I can definitely see Java-related compilers.  I don't really mind not being able to program Java on iOS anyway.
7  Game Development / Newbie & Debugging Questions / Re: strange if statement problem on: 2013-05-07 01:52:49
For string comparison, you need to use .equals() instead of ==.
8  Discussions / General Discussions / Programming on iOS on: 2013-05-07 00:42:21
Recently for my iPod Touch I got an app called C/C++ Compiler by Mr. Lee and after spending a couple hours getting a program I made in C to work on there, I was pretty happy.  I was able to make something on my iPod without needing to jailbreak or get a Mac to make an iPod app in Objective-C.  Today, instead of doing homework (okay I did actually do the homework later), I looked up some programming iOS apps and found that most do not support iPod Touch and instead go for iPad.  I completely get the reasoning.  Today I bought Texpad and Pythonista.  For Texpad, I saw it as really cool in that you can compile locally with just basic LaTeX packages, or, if you have internet, via the internet and then you can use all of the TeXLive packages out there.  For Pythonista, it looks like the best Python app out there.  There is Python 3.2, but that doesn't look as good.  Now, with Pythonista, it looks like, based on the examples, that I can nearly make apps within the app.  This has me pretty excited.  I love the portability of the iPod Touch, and being able to program on it would help me for when I have nothing to do at school (my computer is too expensive to bring).  Do you know of any really good programming apps to get?  Preferably if the app is for more platforms besides just iPad I'll look into it more.  I'm willing to spend quite a bit of money (a rarity for me), likely because I haven't bought much at all recently.
9  Games Center / WIP games, tools & toy projects / Re: A Java scripting language -- Leola on: 2013-04-21 16:23:12
For me, the graphics on the space invaders clone is flashing crazily and I heard no sound.  Obviously there seem to be some bugs.  Do you have any idea what's going on?
10  Games Center / WIP games, tools & toy projects / Re: A Java scripting language -- Leola on: 2013-04-21 00:37:41
This looks really cool!  I would love to test it out--is there a compiled library JAR out there?  Also, I love the love for the Packers and hatred of the Bears Cheesy
11  Game Development / Networking & Multiplayer / Re: Simple Auto-Updater/Patcher Library on: 2013-04-21 00:26:47
To any who use this library, I have just fixed a bug.  You can see the commit here.  The library JAR has been updated as well, and the link is in the first post.

EDIT:  Another bug fix commit here as I forgot to add my new method in all places necessary.  The necessary files have been updated.
12  Discussions / General Discussions / Re: Why don't many of you sell your games? on: 2013-04-13 15:23:30
I don't sell HungerGamesBoardGame because the idea isn't original and thus a lawsuit could arise if I tried to make money off of it.  I don't sell any of my other games because they aren't good enough to be generally appreciated.  Also, I doubt I'm old enough to legally do so anyway.
13  Game Development / Shared Code / Re: YUNPM - a Java Media Player on: 2013-04-11 00:24:15
Is there any source code for this available for download?  Or an easy way to modify the VideoPlaybackTest class?  I'd like to take a look and mess around with the options a bit.
14  Game Development / Newbie & Debugging Questions / Re: Simple Math Problem on: 2013-04-09 03:55:34
Oh god... not the distance formula again. *shudders in fear* We just finished using that awhile ago. Thanks for the link, I'll check it over.

I would use the shapes but it seemed easier just to figure everything out without them, it's worked quite well so-far.

What's wrong with the distance formula?  It's extremely helpful and very simple.  I think it's great.
15  Games Center / WIP games, tools & toy projects / Re: "Dungeon Man", A dungeon crawling adventure in Java with OpenGL (Alpha 0.1.0) on: 2013-04-07 20:13:05
Glad you learned a lot from the project!  It was cool to play.
16  Games Center / Showcase / Re: HungerGamesBoardGame on: 2013-04-07 16:52:53
I just tested this with Linux (Ubuntu 12.10) and found some bugs.  The coordinates of displaying everything seems to be slightly off on Linux, so I will have to detect OS then adjust lots of coordinates automatically.  Also, the buttons on the launcher aren't equal.  I apologize if you saw these before while playing, I never knew about them since I had never tested on Linux.  I will try to fix them now however.
17  Game Development / Newbie & Debugging Questions / Re: Which natives to include? on: 2013-04-07 15:29:06
I've just packed them all with all my games because with the internet these days it really makes no difference.  Also, if they copy onto a different OS they don't get hit with an error.
18  Discussions / Miscellaneous Topics / Re: Best Linux Screen Recorder? on: 2013-04-07 15:23:54
hmm im considering at least a trial on ubuntu

Yesterday I installed it alongside my Windows 7 via http://linux.about.com/od/dist/gr/dstwubi.htm

It works really well and now my computer has two OSes to work with.  Having a start-up screen (text, rather) let me choose between two OSes is really cool.  Only downside I can see is that the max hard drive space for your Linux/Ubuntu OS is 30 GB.  It just means I can't really use it for lots of gaming.  It's really good for testing multi-platform though and well worth it if you want to try it out.  Eventually you could ditch Windows all the way after you've used it for awhile.
19  Discussions / General Discussions / Re: Eclipse C# Plugin? on: 2013-04-06 17:24:13
I've started to play around with Eclipse plugins to see what you can do with them.  I think I'll slowly develop some C# Plugin and I doubt it'll amount to anything.
20  Games Center / WIP games, tools & toy projects / Re: [WIP][LWJGL] Spritomatic - sprite creation tool (for programmers) on: 2013-04-06 15:26:45
It looks very interesting and helpful.  I'll probably test it out when a release comes out.  One thing I am not a huge fan of, however, is that it exports code into the project.  It allows for customization, but I feel like much of it seems to be able to be stored within the library (if there is a library).  It's not a huge problem as many may like it, but I'm not a big fan of it.  I would be able to work with it but I'd just prefer if more data is stored within the library.  Also, in an unrelated note, I feel like the folder "res" in your project shouldn't be a source folder.  I'll be sure to try this out when a release comes out Cheesy
21  Java Game APIs & Engines / Java Sound & OpenAL / Re: Need a really simple library for playing sounds and music? Try TinySound. on: 2013-04-06 04:18:58
I have 1.82 GB of undeleted TinySound garbage.  I feel like maybe deleting the files wasn't originally accounted for in the source?  If so, you (kuusisto) should implement a basic scanner to scan for old undeleted files and delete them, like in this code bit:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
private void scanAndDeleteOldFiles(String name, String suffix){
   // if the download is aborted, a temporary file will be left behind. this method deletes all temporary files left behind in the past
  DirectoryStream<Path> ds = null;
   try {
      ds = Files.newDirectoryStream(Paths.get(System.getProperty("java.io.tmpdir")), name + '*' + suffix);
      for(Path file : ds){
         if(file.toFile().delete())
            System.out.println("Old file " + file.toFile().getAbsolutePath() + " deleted successfully.");
         else
            System.out.println("Old file " + file.toFile().getAbsolutePath() + " denied being deleted. That evil file!");
      }
   } catch (IOException e) {
      ErrorLogger.logError(e);
      return;
   } finally {
      try {
         ds.close();
      } catch (IOException e) {
         ErrorLogger.logError(e);
         return;
      }
   }
}
22  Game Development / Game Mechanics / Re: Calculating Theta... of What? on: 2013-04-04 00:51:14
What do you suggest otherwise?
23  Game Development / Networking & Multiplayer / Re: Simple Auto-Updater/Patcher Library on: 2013-04-04 00:50:03
I found a pretty embarrassing bug 3 days ago that I've forgotten to mention here.  I forgot to subtract one from the month variable to set it up so that January = 0 and so on when setting up Calendar so at the ends of months it could ignore updates submitted at the beginning of months.  I believe I added one to the month results to maintain compatibility with the C# version of the library (so that the two could work together), but I'm not sure.  Nonetheless, it is now fixed.  If anybody out there uses this though, be sure to update your launcher!  I also added a simple LICENSE file because I guess it should be done.
24  Discussions / General Discussions / Re: Eclipse C# Plugin? on: 2013-04-02 00:40:47
Couldn't you just make a process, inherit the IO, and then run the C# compiler on that process?
25  Game Development / Game Mechanics / Re: Calculating Theta... of What? on: 2013-04-02 00:27:53
Thank you!  I will add that code in the next time I work on the project (I added it to my to-do list).
26  Discussions / General Discussions / Eclipse C# Plugin? on: 2013-04-02 00:26:01
After discovering that Eclipse CDT does indeed work if MinGW is in the system path (on Windows) I thought, "What if there was a C# plugin for Eclipse?  I would only need one IDE for everything!"  I did a lot of Google searching to find that all plugins C# related were all outdated or abandoned, and it upset me.  I have no problem with my IDE SharpDevelop, but if there was a C# plugin for Eclipse it would be so cool!  I would love to try to make one, though I doubt I could pull it off by any means, but how hard would it be?  Would it be nearly impossible or doable with lots of hard work?
27  Game Development / Game Mechanics / Re: Calculating Theta... of What? on: 2013-04-02 00:24:33
Ah, does that increase speed by doing less trigonometric functions?  If so, I'll be sure to do that when updating my code in the future (as I need to fix it as it currently sucks).
28  Game Development / Game Mechanics / Re: Calculating Theta... of What? on: 2013-04-02 00:20:32
Ah yes, a good example of this is in the code for my game PixelZombies.  You can check out an example here https://github.com/Sammidysam/Zombies/blob/master/src/weapons/Bullet.java but the code is really bad and I apologize.  But the bullet takes the arguments x (mouse click x), y (mouse click y), manx (where the person firing the bullet is located x), and many (where the person firing the bullet is located y) and then calculates the angle.  Then, when moving, the code

1  
2  
x += Math.cos(angle) * SPEED;
y += Math.sin(angle) * SPEED;


is called.  Is this what you are looking for?  You can find the game here if you want to see it in action to make sure it works.
29  Discussions / General Discussions / Eclipse Automatic Perspective Switcher on: 2013-03-31 19:38:41
Today I came across a neat plugin for Eclipse, http://www.richinternet.de/blog/index.cfm?entry=1758AACF-910C-DE52-368E1421BEFDA19B

It will automatically switch perspectives when you open a file of a certain type associated with that perspective.  That's convenient for me, as I use three perspectives generally and some have icons at the top bar that others don't that I need.  I don't know if something like this has already been created for Eclipse, but I find it very convenient!

Sadly it isn't a plugin that you can install via the Install New Software menu, but it is simple to install nonetheless.  I suggest that you restart Eclipse after putting the JAR into dropins (if you had it open when doing so), then set file associations, then restart again.  That made it work for me perfectly.
30  Discussions / General Discussions / PyDev Needs Help! on: 2013-03-31 19:35:01
Upon opening a python file in Eclipse today, I got a message redirecting me to http://www.indiegogo.com/projects/pydev-and-liclipse-for-a-fast-sexy-and-dark-eclipse

Apparently PyDev is low on finances and needs help!  I thought I'd pass on the message, because I think that PyDev is fantastic.  I've never tried any other Python IDE, but I've never had to since I've had no problems with PyDev.  I'd prefer for it to stay supported so that I can use it in future Eclipse versions, because the less IDEs I have to install I find the better Cheesy
Pages: [1] 2 3 ... 5
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (70 views)
2013-05-17 21:29:12

alaslipknot (80 views)
2013-05-16 21:24:48

gouessej (111 views)
2013-05-16 00:53:38

gouessej (106 views)
2013-05-16 00:17:58

theagentd (117 views)
2013-05-15 15:01:13

theagentd (106 views)
2013-05-15 15:00:54

StreetDoggy (150 views)
2013-05-14 15:56:26

kutucuk (174 views)
2013-05-12 17:10:36

kutucuk (171 views)
2013-05-12 15:36:09

UnluckyDevil (180 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.181 seconds with 20 queries.