Show Posts
|
|
Pages: [1] 2 3 ... 5
|
|
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?
|
|
|
|
|
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.
|
|
|
|
|
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.
|
|
|
|
|
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.
|
|
|
|
|
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.
|
|
|
|
|
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.
|
|
|
|
|
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.htmIt 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.
|
|
|
|
|
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 
|
|
|
|
|
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){ 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; } } } |
|
|
|
|
|
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.
|
|
|
|
|
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?
|
|
|
|
|
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-368E1421BEFDA19BIt 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.
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|