Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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]
1  Game Development / Game Mechanics / Re: Shooting Mechanic in a Cellphone Shooter Style Game on: 2013-01-06 02:47:01
Yep eventually figured that out, didn't think the whole thread thing would work tbh. Managed to get it working with a friend, just needed to soundboard. Sorry for wasted space lol.
2  Game Development / Game Mechanics / Shooting Mechanic in a Cellphone Shooter Style Game on: 2013-01-06 01:51:54
Hey There,

I'm making a Cellphone shooter style game, you know like you are the spaceship and you need to kill the enemy ships while dodging their bullets and such, its 2D.... anyways... I'm trying to make a shooting mechanism, such that I could draw the bullet as it moves towards its target. Here is the thing, that wouldn't be hard, but if another bullet is fired and such. I'm not sure how to handle that, I tried creating a new thread, for every bullet, to just iterate through a for loop, that would draw the bullet, sleep for 20ms, adjust the y coordinate and then reiterate. The issue is actually drawing though. Thus i get to my question, How do i draw outside of the paintComponent method? like can I pass the Graphics through the constructor into another class. Because if i make a thread in the paintComponent method and thus a public void run method inside of it it wants the Graphics to be final, but I couldn't draw outside of the method, posing a slight problem as I couldn't call another class or method to do the drawing by passing it the Graphics.

Is there something i'm missing or doing wrong?
3  Discussions / General Discussions / Re: Trying To Make A Shared JTextArea on: 2012-12-31 23:16:05
Seems to have some sense to it, I'd have to think more about it. But what happens if you want to delete a word?
4  Discussions / General Discussions / Re: Trying To Make A Shared JTextArea on: 2012-12-30 23:58:03
Interesting problem.
The main problem would be to mix multiple user input at once.
I guess you need to have some sort of index for each word in the document.
Then, when it receives user input like: "xxx typed the characters 'en' after word 56", this way the result wont get garbage when it needs to update.
However this method is maybe a little to easy, you may need to think about an much safer system.

Lol, someone that understands that this is somewhat interesting Smiley
I was thinking of comparing the text in the textareas when keys are typed or something, but you raise a good idea, Wouldn't need any kind of index, would simply have to take cursor location and treat all text in the textarea as one long string (I've already verified this to be the case), and then substring where up until where the cursor is and then concatenate the input and then concatenate the substring whose index is the cursor location + 1, assuming this updates after every keypressed. My concern is that okay I update, and then what happens is someone elses update comes after this update but before they have received the update, as such, the cursor location is inaccurate. Gonna have to ponder this.


Gonna call it quits on this for today, been working on it 2-3 hours, giving the Client GUIs more functions and stuff, now my brain hurts.
Will read thread progressively through the day though.
5  Discussions / General Discussions / Re: Trying To Make A Shared JTextArea on: 2012-12-30 23:32:07
do you really want to edit the same word or the same sentence  at the same time?

The idea is to be able to write at different places in the page, at the same time. And how much do I want to do it? not really sure...
I just think it would be interesting to make.
6  Discussions / General Discussions / Re: Trying To Make A Shared JTextArea on: 2012-12-30 23:22:18
I don't know if it is possible with the standard swing controlls, but the best way to do it would be to do it like a realtime game, send the command for each keypress over the wire.

Like cursor position at char 57, add 'a'. Then one could do some locking, like lock a line for other users to not have to deal with sync problems

Um what method would get me cursor position? I wanted to look that up before, and I suppose I could look it up, but I have more to say so I may as well just ask the question. Also, locking kind of defeats the purpose I think. Because then well, the concept of simultaneous goes out the window. I want the simultaneous, just a pain to program the simultaneous lol... (That probably sounded really dumb) that's what I'm currently struggling with, although right now I'm adding features to the GUI and other small things before running some tests.
7  Discussions / General Discussions / Re: Trying To Make A Shared JTextArea on: 2012-12-30 22:49:00
I think you're looking at this backwards. You aren't synchronizing the JTextField, you are synchronizing the String for the contents of the field, and as a consequence the JTextField.

Does that make sense?

Yep it does, that was what I was trying to do. I thought that was what you meant though, synchronizing the TextArea. Meh, was worth a try anyways, I think at the end of this, after I've tried just about everything else, I'm gonna have to do what I was hoping I wouldn't. Make a really really complicated comparison method of all the strings I would get from a getText() method, but it'll probably get simpler the shorter the interval is between comparisons.
8  Discussions / General Discussions / Re: Trying To Make A Shared JTextArea on: 2012-12-30 22:14:13
You could synchronize your two users using a database. Not sure how scalable that would be. Another alternative would be to have a server program that communicates with the clients and has a central copy of the edited document and uses it to keep the clients synchronized.

Hope I could help,

I thought about that a while ago, couldn't get it to work; however, when you mentioned this I had an idea. But i ran into the same problem that I am currently having and that I had previously. The issue is that while the server would have that central JTextArea, it isn't the JTextArea being edited by the clients, so the problem then becomes synchronizing what the clients input, which is the issue I've been having for the last couple days or so, since I started to tackle this problem again
9  Discussions / General Discussions / Trying To Make A Shared JTextArea on: 2012-12-30 20:45:58
Hey There Everyone,

Sorry if this is in the wrong place, really isn't necessarily for game development sooooo just didn't think another spot was really relevant.

I'm trying to make a JTextArea that can be accessed by two or more people on different computers, two for now, and edited simultaneously. It's actually an interesting problem, although perhaps just for me since I've only been coding for 3-4 months, all of which in Java. The issue is preserving both people's inputted text. The analogy I use is that if two people simultaneously edited a wikipedia page, ultimately the last person to click confirm would be the one whose information would be shown at the end of the day, which cannot happen in this case. Text needs to be sent constantly between all clients, but what is inputted needs to be preserved. This is probably a far bigger project that I am imagining, and right now I think it's pretty big, but it seems like fun so, any thoughts on how I could be addressing this issue? If you need a more in depth explanation or some code, feel free to ask.

10  Discussions / General Discussions / Re: Hey There, I'm New Need A Couple Answers on: 2012-12-11 20:25:10
I had a look at those 4K games before I went to bed last night Grunnt, they look rather interesting. Just don't know if that is what I'm looking to make at this moment. Certainly a challenge for the future though, I'll keep that in mind.
11  Discussions / General Discussions / Re: Hey There, I'm New Need A Couple Answers on: 2012-12-11 11:14:12
If you want to make a tower defence game, you shoud use slick2d. It is easy to learn, and has some very powerfull features.

I'll look into it tomorrow, bout to turn in, that being said... got a couple of exams soon so may not be able to...
I'll find time and have a look, thanks for the tip.
12  Discussions / General Discussions / Re: Hey There, I'm New Need A Couple Answers on: 2012-12-11 07:44:19

lol literally just posted code to have you guys help me out, then noticed mistake.... oh fails... Love how that always happens. and Thank You.
13  Discussions / General Discussions / Re: Hey There, I'm New Need A Couple Answers on: 2012-12-11 07:35:13
Well, you are building a tower defense game correct. You don't necessarily need really good graphics to create a tower defense game. I don't really know the library you are using, but sometimes it is just better to get a good framework started using simple circles and rectangles.

The most important thing about the game is the game play. If something simple is written down first, it makes it easier for people to draw graphics for the game. Or, just follow Riven's suggestion and try making Pong. Making a game is a process, and graphics can wait until you find the right artist.

Thx, I agree with a lot of what you said, I did make a couple images such as a Triangle and stuff for the monsters, was just getting frustrated trying to process all the graphical code mentally beforehand and planning it out, so I was trying to seek help, currently I'm making the pong, ran into a little speedbump that I'm trying to figure out. It's weird.
14  Discussions / General Discussions / Re: Hey There, I'm New Need A Couple Answers on: 2012-12-11 06:51:34
@all: Don't get too worked up about statements of strangers.

@Ignasis: I don't think it's feasible to think you can join a team, that will teach you everything. Teams generally look for people that can contribute, not people they have to invest a lot of time in, to make them do what they can already do themselves.

What you want to do, is start small. Try to write a Pong game. Maybe this suggestion insults you, but it's serious. You'll learn about game logic, rendering logic, and the project is small enough to start from scratch many times over, in case you screwed up. Once you get Pong to work, try Snake, then try Asteroids, etc etc.

Start small, get it to work, finish it, make something bigger. Rinse and repeat ('til you rake in the millions).

Sound advice, sorry wasn't in the best mood earlier, just needed a couple of people to show me I was being a jerk... didn't really notice at first, sadly. That might be the best course of action, i'll take that advice seriously and work on a simpler project tonight and see what I can come up with. Time to program til 3 AM. /me loves Java.
15  Discussions / General Discussions / Re: Hey There, I'm New Need A Couple Answers on: 2012-12-11 06:49:28
Yeah thats a good way of looking at it I'd say, but there are some things about Graphics I'm concerned about such as rotating the sprites and stuff, but the biggest issue for now would be integrating those graphics, the more complicated stuff I could get to as it comes together... Definitely needed this, it's making me think in the right ways.
16  Discussions / General Discussions / Re: Hey There, I'm New Need A Couple Answers on: 2012-12-11 06:44:47
Lol, evidently not. I've been teaching myself GUis for the last 4-5 weeks, got to the point where its like... Gotta start with graphical games, idk I'm just unsure of how to program the graphical side of it, oh well gotta start learning somewhere, just trying to figure out where that should be
17  Discussions / General Discussions / Re: Hey There, I'm New Need A Couple Answers on: 2012-12-11 06:33:13
Nothing at all, but when you are wanting to learn how to program graphically, what does programming a console game accomplish? I have made 10-20 console games. I didn't ask for help programming a game, it was graphics... So it's just not really relevant in my opinion. But heck what do I know, I'm asking for help, I'm not claiming to know this stuff.
18  Discussions / General Discussions / Re: Hey There, I'm New Need A Couple Answers on: 2012-12-11 06:26:59

Yeah, I was a little vague I suppose, although I did say I have almost no experience programming Graphics, not in programming... whatever, I'm not looking to start fights, just in an abnormally frustrated mood I suppose... But yeah telling someone to go program console-based text games I suppose that just rubbed me the wrong way considering that was a completely useless suggestion. Just sounded like you were belittling me, oh well whatever sorry for being a jerk, not always like that, just when I think i'm being insulted.


Seem to have rubbed you the wrong way as well, well I'm sorry, when I used the Child's Play I meant in regards to filling in values for a draw method, um any idiot can look that up in API, I don't consider that Graphics programming and would have thought that would have been insulting to people that can actually do it if I said, look I can draw a string or something I can program graphics... because that isn't true at all. When I mentioned building maps, I was talking more about perhaps a 10x10 grid of JPanels and different terrain types and how best to set these types, and after that I suppose I could use a conditional statement based on what type I set, sorry I should have been more specific in that regard. When I said handling graphics I meant just that, how best to call your proposed move class which sounds like a good idea, how to handle multiple monsters whether that would be in the loop, you know there are some things there where a little guidance makes that a lot less convoluted.

Sorry If I rubbed you the wrong way, I guess I jumped the gun a little on you Jimmt, but I tend to read messages with a certain lens, such is the effect of spending too much of one's life on the internet I suppose.
19  Discussions / General Discussions / Re: Hey There, I'm New Need A Couple Answers on: 2012-12-11 06:01:00
I get all that to be honest, add a JPanel to a JFrame and then override Graphics extending the JPanel on a new class. with paintComponent(Graphics g). The issue I get to is really not being well versed in anything after that, I can drawString and drawImage and such like that, that's child's play just need to know how what values to place in. Its the handling of Graphics that I'm completely inexperienced in. How I should go about making monsters move on a Tower Defence map, the best way to build the map stuff like that. Sorry if you get a little bit of anger coming through this, Jimmt could have given the stupidest and most useless comment I've ever read. I'm inexperienced in programming graphics Jimmt, not incompetent.

Any suggestions on how I should be handling my graphics. My biggest concern is that I am neither artistic or capable in photoshop, so I just don't see me being able to create my own images and stuff. I should be able to learn how to program the graphics with a little bit of guidance.
20  Discussions / General Discussions / Hey There, I'm New Need A Couple Answers on: 2012-12-11 05:44:36
Hey Everybody

I'm looking to make a Tower Defense game in Java, but I have almost no experience in programming with Graphics.
Needless to say this provides a large issue, I'm hoping I can find somebody or maybe a couple of people who are interested in pursuing this project with me, and can teach me how to program Graphics. I really don't know where I should be looking online to join a group for collaborative projects and such, so if people want to point me to a more appropriate location that is fine too. I've got some pretty cool ideas, well at least I think I do, just would love some help with the implemtation,

Thanks for reading.
Pages: [1]

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

The first screenshot will be displayed as a thumbnail.

pw (26 views)
2014-07-24 01:59:36

Riven (25 views)
2014-07-23 21:16:32

Riven (20 views)
2014-07-23 21:07:15

Riven (22 views)
2014-07-23 20:56:16

ctomni231 (51 views)
2014-07-18 06:55:21

Zero Volt (46 views)
2014-07-17 23:47:54

danieldean (37 views)
2014-07-17 23:41:23

MustardPeter (40 views)
2014-07-16 23:30:00

Cero (57 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
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!