Show Posts
|
|
Pages: [1]
|
|
1
|
Game Development / Newbie & Debugging Questions / Re: Where to learn 2D-vectors
|
on: 2011-02-06 23:54:21
|
The function, Math.atan2(y, x) can give you the angle of your mouse compared to the sprite. You could rotate your sprite to this angle or something similar to show that the angle is correct.
That's what I'm trying to work with, but for some reason I can't seem to get the mathemathics right, hm, but I might have an idea to try out. (I guess what I can't see really is how to count the angle as 0,0 is top-right corner, not bottom-right. But as I said, I just got an idea what to try (if statements  )) My 2D vector class: [...] If you want to create a vector between two points, such as the gun position and the mouse position, for animation, you can do like this: [...]
Great, thanks .. but, I won't copy it, because that not learning  I will read the methodes that you'd use and rewrite them (Great that you have some comments in there)  Well, thanks again, both of you 
|
|
|
|
|
2
|
Game Development / Newbie & Debugging Questions / Where to learn 2D-vectors
|
on: 2011-02-06 15:25:47
|
Hey all I've been working on this small 2D-side scroller, after following MrJavaHelp's game tutorials on youtube. I asked here and on another forum for how to solve my idea of a shot following the mouse-press. I wanted to do this with angles, but I can't seem to get it right. On the other forum where I asked, I got the answer to drop angles, and use vectors, and he linked me to R 2-vectors on wikipedia, a short, non-informative text (in my view) So, now I've been watching about 30min different youtube-videos explaining what a vector is, and I kind of get it now. But I have no idea how to implement or use it in Java/programming. .. So, where to find examples or tutorials or something that shows how and where to use vectors in Java-2D? (Or, do anyone here have an personal example?  ) Thanks if anyone has an answer //M
|
|
|
|
|
4
|
Game Development / Newbie & Debugging Questions / extends both KeyAdapter and MouseAdapter
|
on: 2011-02-05 17:51:31
|
Hey all I've followed MrJavaHelps tutorials at youtube, and continued on the little game made. But, he did the following (kind of): 1 2 3 4 5 6 7 8
| private class ActionListener extends KeyAdapter{ public void keyReleased(KeyEvent e){ spelare.keyReleased(e); } public void keyPressed(KeyEvent e){ spelare.keyPressed(e); } } |
Spelare is my player-object, the functions does send the event on to the player to react to them. So, I wanted to use the MouseAdapter the same way, but it doesn't work; 1 2 3 4 5 6 7 8 9 10 11 12
| private class ActionListener extends KeyAdapter, MouseAdapter{ public void keyReleased(KeyEvent e){ spelare.keyReleased(e); } public void keyPressed(KeyEvent e){ spelare.keyPressed(e); } public void mouseClicked(MouseEvent e){ test = new Point(e.getX(), e.getY()); spelare.mousePressed(e); } } |
The point is for testing, but, I get an error when trying to do this: Syntax error, insert "ClassBody" to complete ClassDeclaration So, uhm, how to approach this?Thanks for answers //M
|
|
|
|
|
6
|
Game Development / Game Mechanics / Trigonometry Java
|
on: 2011-02-05 16:17:01
|
Hello all I'm making a 2D side-scroller .. really simple with paint-graphics. Right now you can shoot "lazers" forward, but I'd like them to go after a mousePressed So, I've made it work so far that I've got the mousePressed X and Y, now I want a angle so that I can change the y-position of the "lazor" (  ) after the angle, this is my approach showed with paint-skills:  This is how I would calculate the V on my calculator .. Is there a function like the "tan-1" in Java? (I can't seem to find any when googling) If not - what to use?Thanks for answers And sorry if I choose the wrong forum section  //M
|
|
|
|
|
8
|
Game Development / Newbie & Debugging Questions / Re: Asking about newbie books - again
|
on: 2011-01-13 07:00:28
|
Don't get this if you're not into 3D at all! I'm not into 3D myself, and I feel like I blew a little money when reading those chapters. Ofcourse stuff like particles and flocking boids would just be easier to write in 2D, when you have the logic for it in 3D so it isn't really that bad.. Only the 3D/Java3D-specific stuff. I would like to learn 3D, and that it's in Java3D doesn't matter for now because I've just got to make something, not something good (Bad reason, I know)  Thanks for good answers about Killer game programming, and if life could be easy I would've bought that book a while ago - but it can't be  The problem for me is that - can the old book be better than the new one? "Pro Java 6 Game Development" is from the same author as Killer game programming, which gives me the choice of an older, more tested book, or a newer and less reviewed one. I even mailed the author himself for some months ago, and as a reply to a reply to my reply (2nd mail from him, as an reply to my second mail  ) I got this: Mattias,
Probably KGPJ is better to start with.
- AndrewWhich kind of again points to Killer game programming ... hm  Well thanks for the answers but don't stop answering 
|
|
|
|
|
9
|
Game Development / Newbie & Debugging Questions / Asking about newbie books - again
|
on: 2011-01-06 19:00:08
|
Hey all (Read bolded questions at bottom if you dont want to read the story) For about a half year ago, or more, I started a thread here asking for which book to choose for the project* I'm about to work on - a introduction into java gaming (learning how to create basic games in java) *A subject in school called "project", we choose something to work about, for a little over a half year, and then write reports etc. Anyway, back then when starting I wanted some help, because I was completely new into this (well, almost), as of which book to choose. So I did a lot of research about the books, reviews and then compared them to the age of the book. The found books were (Ordered by how much I wanted them) Killer Game Programming in Java - Andrew Davison
Introduction to Java Programming with Games - Ladd, B C Pro Java 6 3D Game Development - Andrew Davison Developing Games in Java - David Brackeen Black Art of Java Game Programming - Joel Fan Practical Java Game Programming - Dustin Clingman Advanced Java Game Programming - David Wallace Croft Beginning Java Game Programming Second Edition - Jonathan S. I didn't expect my local libary beeing able to help me, but they were, and they got me two books, Developing Games in Java and Introduction to Java Programming with Games. I tried on the Introduction to Java Programming-book first, because it was the newest one. But, after some looking in the book, I gave it up, it used a already coded libary, FANG. But instead of going on to the book, i followed thenewboston's Java tutorials, Java intermediate tutorials and gaming tutorials on youtube (Recommended!) That's about 150 videos (4-10 min long), it took a while as I was experimenting with the codes to learn what I've just seen. What I didn't expect was that he hadn't finished the game tutorials, and stopped right in the middle, without any plan to continue. So now I'm stuck. I started reading Developing games in Java, but after reading the first chapter twice, I think I would prefer a book that insted of giving a code with comments, would explain why this and that. So, I'm asking here again:Do anyone here have any experince of the books listed above, and what pros and cons would you like to mention?  I'm looking especially into the two books by Andrew Davidson, as both have got good reviews. Any comments on those books?  Thanks and thanks for reading my story (if you did, no offence if you didn't, not sure that I would  ) //M
|
|
|
|
|
10
|
Game Development / Newbie & Debugging Questions / Re: Ok guys, Needing to start somewhere - books?
|
on: 2010-09-07 11:59:42
|
Dam' I'll get myself banned here  I've still not chosen book I've contacted my libaries here, to check if they can get any of the books It's down to three now: Killer Game Programming in Java - Andrew Davison | ISBN: 0596007302 Introductory Programming with Simple Games: Using Java and the Freely Available Networked Gaming Engine - Ladd, B C | ISBN: 0470212845 Developing Games in Java - David Brackeen | ISBN: 1592730051 I have no idea, I can afford, at best, 2 of them. Sorry for spamming your forum like this, but I'd like to get started, and don't know where  Ehm', can anyone recommend anything? Last chance kind of, and then you'll get rid of me for a while Killer game programming in Java - PreviewIntroductory Programming with Simple Games: Using Java and the Freely Available Networked Gaming Engine - PreviewDeveloping Games in Java - Preview
|
|
|
|
|
11
|
Game Development / Newbie & Debugging Questions / Re: Ok guys, Needing to start somewhere - books?
|
on: 2010-09-05 14:36:24
|
I'm a hobbyist game programmer. I found this book probably most helpful: Java-How-Program -Harvey-Deitel
Killer Game Programming in Java is ok. I really like the concepts and him explaining them. I didn't like the code examples and stuff like that. Also lots of the book seemed like cheap filler. He has a chapter on "Networking for games", but it's really weak. He creates a very basic text client/server and some how that is considered "Killer Game Programming" to him? It would of been a lot better if he just explained concepts and "common problems" with networking in games. Like how to deal with lag in a real time games or never trust to client, verify on server, etc, etc. Tons of things he could of talked about, but instead he went with a very basic example of sending text over the wire. I also forgot what, but remember that something in the audio chapters also bugged me too.
I wasn't to found of the graphics stuff either. The book seemed dated when I read it a year or two ago. Again, if he would of just stuck with concepts it would of been good; but he went with these awkward examples of using outdated and really slow graphics libraries to load sprites, etc.
Hmm, the release date of that book keeps me from beein 100% sure that it's the best one..  The question stands then, if I was to choose one book, just one Would it be some of them listed above, or, the 2010 one (which I think most positive about now, because, after all, it's new) A preview of "Introductory Programming with Simple Games" (The book that I call the "2010 book") is available at google books, can anyone with knowledge or experience give it a look? http://books.google.se/books?id=EMuxvH65pW8C&printsec=frontcover&dq=Introduction+to+Java+Programming+with+Games+review&source=bl&ots=i4GY8zU3vB&sig=UuAOH6wOm6iMYwixOI-bDQoq1qQ&hl=sv&ei=P42DTK6aC4yQOM-i9f8N&sa=X&oi=book_result&ct=result&resnum=5&ved=0CDMQ6AEwBA#v=onepage&q&f=false
|
|
|
|
|
12
|
Game Development / Newbie & Debugging Questions / Re: Ok guys, Needing to start somewhere - books?
|
on: 2010-09-03 09:17:45
|
Short-term : the one in which an example complete game is similar to the one you want to do.
That's not that easy for me, right now I do not have any idea what game type to make, mostly because I've got no idea where I will be in a half year (counting in knowledge) Long-term : the one with the most diverse range of subjects, and least platform specific OR totally problem specific.
I find Ive bought quite a few code books but they were more useful in the days before the internetz. Now they are all semi-obsolete, for example DirectX7 specific books. They make great doorstops. But yeah, they did their part in helping out to advance. The more theoretical ones are often the ones I end up returning to, ones which dont care what language youre using, and which have often been too hard to even understand half of. In the end it's you making the things tick the way you want is where you learn the most.
I've also thought like that, but a book is easier to follow. I mean, I've subscibed to numerous guides on (for example) youtube, that I'll use. But I'd also like (or prefer) a book, it's simply easier to learn from according to me  Thanks for a answer I think I'll choose book on Monday/Tuesday next week (Monday morning do we meet with the teachers and discuss how our work is going) I hope for at least one more answer still  It seems like there aren't any good comparisons "up-to-date" with the books mentioned.. So I rely a little on people responses here  EDIT: As I said, I found another book today, from 2010, "Introduction to Java Programming with Games - Ladd, B C", does anyone know anything? 
|
|
|
|
|
14
|
Game Development / Newbie & Debugging Questions / Re: Ok guys, Needing to start somewhere - books?
|
on: 2010-08-30 00:15:26
|
Sorry for double-posting But I felt like I needed a "bump", and I'll also add some facts.. (I could say tomorrow, but, so everyone will know) In about 12 hours the teachers should have told me if my project gets "green light" If it goes that way, I'll start doing some research about the different books.. Because I can only afford one .. Maybe two if the second one is badly needed  Anyway, here is a list of the books I've got right now listed as "Java gaming books", and I haven't checked the availability of these in Sweden, nor listed them in any specific order other than: "Books I've read a little about: Killer Game Programming in Java - Andrew Davison Pro Java 6 3D Game Development - Andrew Davison Developing Games in Java - David Brackeen" And "Books that I haven't read about yet: Black Art of Java Game Programming - Joel Fan Practical Java Game Programming - Dustin Clingman Advanced Java Game Programming - David Wallace Croft Beginning Java Game Programming Second Edition - Jonathan S. " Are there more? Are these any good? All help until now and during the next week is very appreciated  //M
|
|
|
|
|
15
|
Game Development / Newbie & Debugging Questions / Re: Ok guys, Needing to start somewhere - books?
|
on: 2010-08-27 21:14:04
|
I'm afraid not. It would be cheaper for me to buy the books new than to go there and get them.
Hm, too bad  Anyway, thanks for trying.. What book(s) did you offer? Because we are going to "east skåne" (Vi ska till Ivö) tommorrow .. but, probably to little time to plan something .. or is it?  We usually pay lots for shipping to Sweden.
So true 
|
|
|
|
|
16
|
Games Center / Featured Games / Re: Hyper Blazer
|
on: 2010-08-27 12:39:07
|
Great game "Warning: this topic has not been posted in for at least 120 days. Unless you're sure you want to reply, please consider starting a new topic. " Then this will be a bump, kind of I downloaded the jnpl file to my school laptop, it's really a great game that entartains for a good while, without much thinking  Just a question, I dont know the rules of things like this, I'm new here after all, but can you release a runnable version that doesn't need a internet connection? The jnpl file downloads the game every time, and we haven't got wireless access all over school soo 
|
|
|
|
|
17
|
Game Development / Newbie & Debugging Questions / Re: Ok guys, Needing to start somewhere - books?
|
on: 2010-08-27 09:39:37
|
how about 50 sek each? But before you go, let me check that they are still there.
I asked around and it seems like I cannot get to Malmö, sorry  Do you have any way to send the book(s) (Which one was the second book?) I can send the "payment" in some way  @Mattedatten@Books: Thinking in java you can get in a downloadable form. Also iirc the killer game java book is also available online in some form.
You mean killer game programming in java? Lets say it like this ... the book is available "illegaly", I've thought about downloading it to check it out .. But, reading a .pdf on a screen is worthless, really.. 
|
|
|
|
|
18
|
Game Development / Newbie & Debugging Questions / Re: Ok guys, Needing to start somewhere - books?
|
on: 2010-08-25 20:11:04
|
Seconded. Those would be my recommendations.
Noted, thanks  Darn, a bit to far I think. I have both of my java game books at my old work in Malmö. Since I will never go there again, anyone willing to pick them up there can have them. Malmö, southen sweden, pretty close to Copenhagen.  I like the idea  Maybe, just maybe, I could get there.. Do you have any prices in mind?  And, if I went there, how would I find them if you aren't there?  (To many smileys, sorry  )
|
|
|
|
|
19
|
Game Development / Newbie & Debugging Questions / Re: Ok guys, Needing to start somewhere - books?
|
on: 2010-08-25 09:36:44
|
'Brackeens book' == "Developing Games in Java by David Brackeen"
But to be honest, if your Java skills are only basic and 'newbie', maybe you should first brush up on those. Or else using the books will only reduce you down to copy & pasting everything.
Because even without those books, you should be able to get something up and running.
A good java book I could recommend is Thinking in Java. btw: are you German speaking? (I am assuming from the name). You could also check out "Java in 21 Tagen", it is available as an open book and a nice resource. (publisher is gallileo computing iirc)
Ok, the "basic/newbie" is what I'm assuming my knowledge to be, I mean, there are so much more to learn. But I've went through "Programming A/B" (Half year each) here at this school, but still I do not believe it's a high level of knowledge. Sorry if this sounds "arrogant" or something, but it'll be a java gaming book, mostly because books are expensive and our libaries around here aren't interested in books like these  Also, not german, Sweden here  If I am going to pick any one book, it is "Killer game programming in java". It is both 2D and 3D and it is toolbox style, pick what you want, skip the rest (almost).
If you say you come from Sweden: Du är händelsevis inte från Malmö eller däromkring?
Blekinge, hur visste du det?  (How are the rules here about not writing in English?) Sounds good, again, maybe that book will be the one..  Still noone with experience of "Pro Java 6 3D Game Development"? I mean, it's a newer book from the same author as "Killer Game Programming in Java" This thread got better response than I expected, thanks  But keep writing here, I probably won't order any book before next week.
|
|
|
|
|
20
|
Game Development / Newbie & Debugging Questions / Re: Ok guys, Needing to start somewhere - books?
|
on: 2010-08-25 07:03:30
|
Thanks! And it seems to be available here in Sweden also  I'll look into it and hope for more recommendations I own "Killer game programming in java" and I recommend it.
Great, thanks  I own both Brackeen's book and killer game programming. Both are good. Brackeen talks about developing a specific game framework, threadpool, sprites animation a bit of networking and finally 3D. It gives you piece by piece until you have made a complete game designed by Brackeen, first 2D and then 3D. If you want to know about how to implement a software 3D engine, this is the book for you (I didn't  ). Killer game programming is much more general. It talks about a multitude of techniques. You are given more pieces and more diverse pieces. They do not always fit togheter. More toolbox style. The 3D part deals with java 3d, not very up to date today. But the knowledge are mostly good as general 3D knowledge. What book is "Brackeens book", by googling I think you mean the one also recommended by psychopat316? Overall, thank you very much for this explanation! But, would you recommend one for my project? What type of game is the "end-product" in the Brackeens game - I mean - 2D/3D, game type etc? Would you recommend Killer Game Programming for my use? Because it seems better for me - but also seems to take more time to work through? But, thanks again for the explanations! Overall, haven't anyone tried Pro Java 6 3D Game Development? Thakns for answers until now at least! 
|
|
|
|
|
21
|
Game Development / Newbie & Debugging Questions / Ok guys, Needing to start somewhere - books?
|
on: 2010-08-24 16:41:51
|
EDIT: (Kind of bump edit) Will get a book next week, which one is the one to go with according to you?Hey all ([size=7pt] Lazy? - start reading under the bold words[/size]) My knowledge in Java is kind of basic and "newbie", but, as a project for school, I've decided to expand my knowledge, and create some kind of game. To this project, we should spend about 160 hours (layed out during a half year) and do what we've decided. Then we'll document it, write reports, what went good/bad etc. Anyway, I've just begun, and need something to follow, so my question is: I've looked all over the internet for online guides, there are some, but mostly about graphics in general. I've found two books, "Killer game programming in java" and "Pro Java 6 3D Game Development" (Here http://fivedots.coe.psu.ac.th/~ad/jg2/ and here http://fivedots.coe.psu.ac.th/~ad/jg/) Does anyone have any experience of these books, and can recommend them? Or do you have other books with guides where to begin java game programming? THANK YOU very much in advance for answers EDIT 30(29?)/8 (Also added a post lower down) "Books I've read a little about: Killer Game Programming in Java - Andrew Davison Pro Java 6 3D Game Development - Andrew Davison Developing Games in Java - David Brackeen" "Books that I haven't read about yet: Black Art of Java Game Programming - Joel Fan Practical Java Game Programming - Dustin Clingman Advanced Java Game Programming - David Wallace Croft Beginning Java Game Programming Second Edition - Jonathan S. " Are there more? Are these any good? EDIT 3/9 I found a "new" book that is released in 2010, does anyone know anything about it?  "Introduction to Java Programming with Games - Ladd, B C"
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|