Show Posts
|
|
Pages: [1] 2 3 ... 11
|
|
1
|
Game Development / Newbie & Debugging Questions / Re: [Final Decision] LWJGL or LIBGDX
|
on: 2013-05-03 16:13:22
|
LibGDX doesn't force you to do anything... It is dead simple to set up a project for desktop only.
1) Download LibGDX (stable or nightly, doesn't matter) 2) Open Eclipse 3) Create a Java Project 4) Add libs: gdx.jar, gdx-natives.jar, gdx-backend-lwjgl.jar, gdx-backend-lwjgl-natives.jar ... attach the sources if you want. 5) Code
Well, couldn't find that anywhere when I tried to set it up. I ended up using the GUI tool to set up my projects, and that creates at least 2 projects. But hey, like I said, I'll give LibGDX another swirl some time, and there's a far bigger chance that I'll do it, now that I know that I'm not forced to have multiple projects for 1 game. 
|
|
|
|
|
2
|
Game Development / Newbie & Debugging Questions / Re: [Final Decision] LWJGL or LIBGDX
|
on: 2013-05-03 15:54:37
|
My personal biggest hassle with LibGDX(The second biggest reason I wont be using it, at least for now), is that it assumes that I'll be developing to multiple platforms at once. I don't give a shit about mobile platforms(If I did, I'd learn to code in their native language, e.g. Objective-C for iPhone/iPad(Yes, I know, Android uses Java, but I don't use Android and don't care much for their broken market and fractured platforms)) and I don't care about WebGL either, so I rather dislike that the default setup of LibGDX forces me to have several projects in Eclipse, just to make a simple desktop game. I managed to set up LWJGL, with javadoc/source code attached, far far faster than I figured out how to setup a LibGDX project. But like I said, I'll eventually try out LibGDX, but until then I'll be "wasting" my own time. Personally I think the best answer to this question is to just link to the sites, and let the person asking the question do some reading, instead of trying to bias them towards something. And when they've reached a decision, help them with their questions about whatever platform they chose, instead of saying "omg omg, x is so much better than y!!one11! lyk serisly!" Repeating what've been said already: Choose whatever you find the most easy, and move on when/if it becomes necessary. 
|
|
|
|
|
4
|
Game Development / Newbie & Debugging Questions / Re: Fix "my" method to make an object A move toward X,Y coordinates
|
on: 2013-04-22 11:13:20
|
@davedes I didn't install any extra things, so what I'm using is standard download and install from http://www.oracle.com/technetwork/java/javase/downloads/index.html (Also notice, how I myself mentioned that everything in Java were libraries... So you're just repeating what I already said with your "bla bla library bla bla"  ) @the general popylation And someone that has programmed for a few month probably should spend their time learning basic concepts before trying to learn graphics programming. I know a lot of people in here thinks that a game is utter crap, unless it has fancy graphics that can rival that of AAA companies, and thus it's a big must to learn OpenGL..... But imho then that's utter and complete bullshit. Graphics is the least important in a game. 
|
|
|
|
|
5
|
Game Development / Newbie & Debugging Questions / Re: Fix "my" method to make an object A move toward X,Y coordinates
|
on: 2013-04-21 13:42:22
|
The only problem is, that you wouldn't know how to produce a competing high-tech wheel without looking back on the experience of generations of engineers, using it, learning from it, and then, eventually, if it makes sense, creating your own improved thing. Using a matured library is not the lazy but the professional way.
So uhm.. If you aren't able to create a high tech thing, without looking back at other high tech things, then how did the first high tech things appear? Magic? And yes, using a full fledged library, before learning any basics is surely laziness. And very *few* on this forum can be called professional game developers. And I really don't get the whole argument that you should just use a library to do everything for you. Do you use a library to wipe your own ass too(Mmm, paper jokes)? I completely agree that a library can be helpful. But there never should be a point where someone say "Oh, instead of learning how to actually do what you want to do, just use X library, it'll do everything for you, even make your coffee." For simple 2d, for beginners, there's nothing wrong with learning the robes, before taking on a full fledged library. At least encourage people to THINK before telling them that they can achieve world peace, if they use library X. :/ And where's the need to use LWJGL for any of this? Here is some code for that using LWJGL's Vector2f class: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Vector2f mouse = new Vector2f(Mouse.getX(), Mouse.getY());
Vector2f dir = new Vector2f(mouse.x - x, mouse.y - y);
dir.normalise();
float speed = 2f; dir.scale(speed);
x += dir.x; y += dir.y; |
Here's the same code, using javax.vecmath.Vector2d: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Vector2d mouse = new Vector2d(Mouse.getX(), Mouse.getY());
Vector2d dir = new Vector2d(mouse.x - x, mouse.y - y);
dir.normalize(); float speed = 2f; dir.scale(speed);
x += dir.x; y += dir.y; |
And Mouse.getX() / Mouse.getY() could be taken from my own MouseController class. Teach people to learn some basic stuff, before teaching them to use a library, and please for the love of <whatever you think is epic/awesome/holy/etc>, do NOT involve new people in your wars of what library is the most epic. It's just a waste of time. @alaslipknot Do a few basic Java2d games, before moving to a big fat library(The joke here is, that most of what's shipped with Java is already libraries, which is why there's the whole throwing around of "why not write machine code then, if you don't want to use a library, blablabla"). Just get a feel for how things work and how to structure your stuff. Once's you've gotten down sprites, etc. etc., then you can start learning OpenGL and one of the many libraries out there(Of which most use LWJGL internally, as far as I've seen...). Cheers and good luck! 
|
|
|
|
|
8
|
Game Development / Newbie & Debugging Questions / Re: Typecasting in render method?
|
on: 2013-04-18 09:22:57
|
Keep in mind though that java2D can only render ints which means that a slow movement stutters due to the loss of precision. You can easily get away with a game update rate of 30 and render rate capped at 30 and keep things smooth with only integer movement rates. Another reason why java2D sucks for rendering.
Are you claiming that other things can render coordinates as floats? E.g. render at (10.5, 10.5)? So rendering only half of the eleventh pixel on both axises?
|
|
|
|
|
11
|
Game Development / Newbie & Debugging Questions / Returning generic Maps
|
on: 2013-04-17 14:45:05
|
Is there a prettier way of doing the following? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| public static <T, E> Map<T, E> loadMap(File file, Map<T, E> map) { try { FileInputStream fis = new FileInputStream(file); ObjectInputStream ois = new ObjectInputStream(fis); Object o = ois.readObject(); if(o instanceof Map) { map = (Map<T, E>) o; System.out.println(map); }
ois.close(); fis.close();
return map;
} catch(IOException | ClassNotFoundException e) { e.printStackTrace(); }
return null; } |
At first I didn't return anything, because I thought that Objects(Map in this case) were passed by reference, so I just assigned the value of whatever was read, to passed Map. However, this didn't alter the value outside of the function call. So now I need a Map to get the types it uses and then return a map. :/ 1 2
| Map<Foo, Bar> foobar; foobar = (Map<Foo, Bar>) loadMap(file, foobar); |
just isn't as good looking as plain old loadMap(file, foobar); or foobar = loadMap(file)  (These two variants is the ones I like the most  (Looks the most pretty xD)) Cheers! 
|
|
|
|
|
14
|
Discussions / General Discussions / Wee, LWJGL 2.9.0 looks to be out soonish!
|
on: 2013-04-16 13:22:34
|
Personally, I'm looking very much forward to the release of LWJGL 2.9.0, so that I can start using it on my Mac(Yes, I know, use Windows, blah blah blah  ), and actually learn some OpenGl and stuff! I've already got a small game planed out, that I'll make with it. (Along side with my attempt at a tower defense game(which currently is Java2d)) Anyone has some up to date tutorials on OpenGL/LWJGL? I'll be looking through https://github.com/mattdesl/lwjgl-basics/wiki because that seems like a good start, but more resources wouldn't be bad.  Cheers!
|
|
|
|
|
16
|
Discussions / General Discussions / Re: Steam Questions
|
on: 2013-04-16 09:01:48
|
Aha, a good reason to use the overlay since very recently:
13) ability for users to upload guides, videos and maps for games, which you can access directly from within the overlay while playing
Arh, but I don't use the guides, videos or maps either. xD Though admittedly it's cool that it's available within easy reach. 
|
|
|
|
|
17
|
Discussions / Miscellaneous Topics / Re: Razar Black Widow Ultimate! DEAD!
|
on: 2013-04-16 08:49:51
|
You may not need a $100 keyboard but higher-end keyboards with macros can actually save you money by saving you time. For example: I have the non LED version of the blackwidow with some of the following key binds (Note: You can have many layout modes): - M1 - Runs the eclipse project
- M2 - Types "System.out.println("");"
- M3 - Formats the code
- M4 - Comments out the selected line(s)
- M5 - Rename shortcut
- Any key can be set to launch a program (you could make a Java bot binded to it), a combination of keys with a specific time interval, etc
The time it would have taken to do all those things will eventually pay for itself. Windows+5 to start Eclipse (Windows 7, when apps are in the quick start, you can start them with Windows+# where # is their location from the left to the right, starting with 1) "syso" -> ctrl+space ctrl+s (Yes, auto format code when I save) ctrl+7 - comment out/in line(s) ctrl+alt+r - refactor variable, function, etc. On osx for me, the only difference is that I do "cmd+space" type "ecli" and hit enter, to start Eclipse, and instead of ctrl on most of the hotkeys, I use cmd. xD
|
|
|
|
|
20
|
Game Development / Newbie & Debugging Questions / Re: Finding the time at which intersection takes place.
|
on: 2013-04-15 14:02:32
|
Well, not checking for collision at each step could cause your object to jump through other objects. Say object A is 10x10 pixels and moves to the right with a speed of 20px/tick, it starting position is (0, 10), measured from the top left corner, now at (15, 15) there's an object which is 2x2 pixels in size. This object will be completely ignored if you only check for collision at (0, 10), (20, 10), (40, 10), etc. etc. I hope this makes a little sense.  Cheers! 
|
|
|
|
|
21
|
Discussions / General Discussions / Re: Steam Questions
|
on: 2013-04-12 20:33:00
|
10) The overlay is a really nice feature, which is even available in non-steam games (most anyway) 11) built in voice chat function
I actually very rarely use the overlay, and I've never ever in my life used their voice chat function.  Didn't think anyone used their voice chat, to be honest. With Skype, Mumble, etc. etc. etc.
|
|
|
|
|
23
|
Discussions / General Discussions / Re: Steam Questions
|
on: 2013-04-11 21:32:11
|
|
Well, Steam has been out longer than more or less all smartphones(Steam was released in ~2003), soooo... ^_^
But yeah, they've gotten a heck of a lot of things right.
|
|
|
|
|
24
|
Discussions / General Discussions / Re: Steam Questions
|
on: 2013-04-10 16:16:52
|
Yes, that is EXACTLY what I have been saying. The only way to really fight piracy is making the legal way more easy , comfortable and enjoyable.
I couldn't agree more, and that's what Steam has gotten exactly right.
|
|
|
|
|
25
|
Discussions / General Discussions / Re: Steam Questions
|
on: 2013-04-10 14:21:35
|
|
I'll admit, if I can't get a game as a physical box or through Steam(And I'd like to be able to add my physical boxed game to Steam too), then odds are I wont be buying it.
(Plus, I think Steam has made it less viable to download pirated games, because it's just that much easier to get them through Steam, instead of having to deal with loads of cracks, and what not.)
|
|
|
|
|
26
|
Game Development / Articles & tutorials / Re: Using Grids for collisions
|
on: 2013-04-10 14:13:08
|
|
SHC, I suppose creating new objects every tick would create a lot of garbage. Only way, that I can see, around that, would be to store all entities in a list and then iterate through that list and add them to the grid. (Not sure how much extra ram this'd use extra though, probably not twice as much because of pointers.) Thus when you remove an entity from the list of entities, it'll be removed from the grid 'automatically.'
|
|
|
|
|
30
|
Game Development / Newbie & Debugging Questions / Re: [libGdx] Loading screen
|
on: 2013-04-09 13:18:01
|
Sounds like what you want/need is to have multiple states/screens/whatever-you-want-to-call it. so something like: Where activeScreen is, in this case, an instance of Screen which handles how it'll be drawn. Then you can generate the map while that screen is active? (Horrible explanation, right here!  )
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|