Dec 3 | 7:20 PM |
Mark M. | has entered the room |
Dec 3 | 7:25 PM |
Mark M. | turned on guest access |
Dec 3 | 7:30 PM |
Liam G. | has entered the room |
Mark M. |
hello, Liam!
|
Mark M. |
how can I help you today?
|
Liam G. |
Hey Mark.
|
Liam G. |
I hope all is well
|
Liam G. |
I am trying to work on a new bubble game and am trying to figure out the best way to structure it
|
Mark M. |
I recommend a round structure
|
Mark M. |
:-)
|
Liam G. |
Haha.
|
Liam G. |
To keep it simple the game will be like a candycrush
|
Liam G. |
and I am using surface view
|
Liam G. |
my problem is organizing the bubbles and their interaction
|
Mark M. |
note that I am the one remaining person on the planet who has not played, or even seen, Candy Crush
|
Dec 3 | 7:35 PM |
Liam G. |
Ha. Well actually it could be thought of as tetris with bubbles.
|
Mark M. |
OK
|
Liam G. |
i was trying to arrange with a double array
|
Liam G. |
but my problem is the bubbles are different sizes
|
Liam G. |
so i am running into issues figuring out when they are touching and etc.
|
Liam G. |
i guess my main question is
|
Liam G. |
is there a class that handles geometric interaction?
|
Liam G. |
i.e. i create two circles.
|
Liam G. |
are they touching
|
Mark M. |
not in the standard Android SDK
|
Mark M. |
at least, not that I can think of
|
Liam G. |
Well that is unfortunate!
|
Mark M. |
are you using any sort of 2D game library?
|
Liam G. |
I am just drawing everything on a seperate thread using canvas
|
Liam G. |
Is that a decent way of doing it?
|
Mark M. |
well, there's probably nothing wrong with it
|
Mark M. |
AFAIK, many games on Android are built on top of an existing game library, whether for 2D or 3D
|
Liam G. |
okay, any library you would recommend checking out?
|
Mark M. |
I am not a game developer, and so I have never used them
|
Dec 3 | 7:40 PM |
Liam G. |
okay, no problem!
|
Liam G. |
I will do some trusty google searches. I appreciate the input
|
Mark M. |
I would expect that those sorts of calculations would be handled by a game library as part of their physics package
|
Liam G. |
Yeah, that sounds like an easier way of doing it versus all myself...
|
Mark M. |
after all, it's a common problem (e.g., bullets hitting targets)
|
Liam G. |
yeah good point
|
Mark M. |
the library may help with some of the Android idiosyncracies as well
|
Liam G. |
perfect.
|
Mark M. |
some game libraries are designed to be cross-platform, others (e.g., AndEngine) are Android-specifi
|
Mark M. |
er, -specific
|
Liam G. |
okay. Got ya. That is all for me today. I really appreciate the help.
|
Mark M. |
happy to be useful!
|
noridge | has entered the room |
Mark M. |
hello, noridge!
|
Liam G. |
Happy holidays.
|
noridge |
Hi
|
Mark M. |
Liam: and to you as well!
|
Mark M. |
noridge: your turn! do you have a question?
|
noridge |
I have an imageview
|
noridge |
View paste
|
noridge |
This displays a vertical bar that is kinda green in color
|
noridge |
I want the user to be able to touch and drag this green line
|
noridge |
this line since it is 5dp is too difficult to touch
|
Dec 3 | 7:45 PM |
noridge |
adding a padding of 5dp all around doesnt seem to make this view big enough to be easily touched
|
noridge |
I would like this imageview to look like it is 5dp but big enough so that it can be easily touched
|
noridge |
how do I do this?
|
Bob R. | has entered the room |
Bob R. |
Hi Mark
|
Mark M. |
(BTW, hello, Bob -- I will be with you shortly!)
|
Mark M. |
noridge: first, I'd recommend that you consider using an existing library that handles this: https://github.com/MobiDevelop/android-split-pa...
|
Mark M. |
rather than rolling it yourself
|
Mark M. |
that being said, I know that the solution involves using TouchDelegate: http://developer.android.com/reference/android/...
|
Mark M. |
however, I have not had a chance to use that yet personally
|
Mark M. |
basically, a TouchDelegate expands the "footprint" of a View in terms of which touch events it receives
|
Bob R. |
sure. I just finished publishing my 2 new apps on Google Play Store and on Amazon android app store, Now I'm looking for ways to market what I did.
|
Mark M. |
(BTW, hello, Bob -- I will be with you shortly!)
|
noridge |
ohok touch delegate - looks promising
|
noridge |
lemme try
|
Mark M. |
noridge: I would poke around and look for samples of the use of TouchDelegate to see if that helps, plus look at the library that I mentioned
|
Mark M. |
your original approach should work, though 15dp itself is not that big
|
Mark M. |
that's like 0.1"
|
Mark M. |
the problem with increasing the padding is that this has a visual effect, in addition to the touch effect
|
Dec 3 | 7:50 PM |
Mark M. |
TouchDelegate lets you handle the touch separate from the visuals
|
Dec 3 | 7:50 PM |
Mark M. |
BTW, you could use View instead of ImageView, if you are not putting an actual image in the ImageView
|
noridge |
ohok thanks Mark lemme try it out
|
Mark M. |
let me take questions from the others, and I'll swing back to you in a bit
|
Mark M. |
Bob: marketing is not really in-scope for this chat
|
Mark M. |
do you have an Android development question?
|
Bob R. |
OOps sorry
|
Bob R. |
OK
|
Bob R. |
I have a question that I saw similar answers on stackoverflow but the code there doesnt seem to work. I used a workaround so that I could publish my apps.
|
Bob R. |
I have a question that I saw similar answers on stackoverflow but the code there doesnt seem to work. I used a workaround so that I could publish my apps.
|
Bob R. |
I have a question that I saw similar answers on stackoverflow but the code there doesnt seem to work. I used a workaround so that I could publish my apps.
|
Bob R. |
Is there an area on stackoverflow where you can answer my question?
|
Bob R. |
Is there an area on stackoverflow where you can answer my question?
|
Dec 3 | 7:55 PM |
Bob R. |
I only know where my homepage is
|
Bob R. |
I only know where my homepage is
|
Mark M. |
this chat is for programming questions
|
Bob R. |
OK
|
Mark M. |
so, you're welcome to ask your question here
|
Mark M. |
you are also welcome to ask it on StackOverflow
|
Mark M. |
however, there are lots of questions on StackOverflow, and I do not see them all, let alone read them all, let alone answer them all
|
Mark M. |
if you do not have your question ready now, that's fine, you can ask it in a future chat
|
Mark M. |
if you do not have your question ready now, that's fine, you can ask it in a future chat
|
Bob R. |
OK for text edit fields, I discovered that if the user doesnt enter text in there the program puts null characters in those fields, then the file wont open. as a workaround I added default values to those fields
|
Bob R. |
OK for text edit fields, I discovered that if the user doesnt enter text in there the program puts null characters in those fields, then the file wont open. as a workaround I added default values to those fields
|
Bob R. |
Do you have a specific example
|
Bob R. |
Do you have a specific example
|
Bob R. |
OK for text edit fields, I discovered that if the user doesnt enter text in there the program puts null characters in those fields, then the file wont open. as a workaround I added default values to those fields
|
Mark M. |
I think that you may be talking about some other platform
|
Mark M. |
I think that you may be talking about some other platform
|
Bob R. |
Im sure theres a better way to handle this.
|
Bob R. |
Im sure theres a better way to handle this.
|
Mark M. |
an EditText widget should return the empty string for getText().toString()
|
Mark M. |
an EditText widget should return the empty string for getText().toString()
|
Mark M. |
an EditText widget has nothing to do with files
|
Bob R. |
no android java on eclypse
|
Bob R. |
the fields are saved to the file
|
Bob R. |
with the rest of the records
|
Mark M. |
and it is your job to make sure that the file is correct
|
Mark M. |
if you do not like what the EditText has, it is your job to correct it when you write the data to the file
|
Dec 3 | 8:00 PM |
Mark M. |
if you do not like what the EditText has, it is your job to correct it when you write the data to the file
|
Dec 3 | 8:00 PM |
Mark M. |
if you do not like what the EditText has, it is your job to correct it when you write the data to the file
|
Mark M. |
if you do not like what the EditText has, it is your job to correct it when you write the data to the file
|
Mark M. |
if you do not like what the EditText has, it is your job to correct it when you write the data to the file
|
Mark M. |
testing...testing...
|
Bob R. |
correct, so if there is nothing entered, I enter a default text for them
|
Mark M. |
OK
|
Mark M. |
(sorry for the "testing" bit, was having a hiccup with the chat room)
|
Mark M. |
I guess then that I do not understand your question
|
Bob R. |
No problem
|
Bob R. |
Can I display one of the pictures I posted on the stores?
|
Bob R. |
Screenshots
|
Mark M. |
there's an "Upload a file" link on the right
|
Bob R. |
ok
|
Mark M. |
while you are doing that, let me take questions from the others, and I will be back with you shortly
|
Mark M. |
Liam: do you have another question
|
Mark M. |
?
|
Mark M. |
Liam: do you have another question
|
Bob R. | |
Mark M. |
noridge: do you have another question?
|
Mark M. |
noridge: do you have another question?
|
Mark M. |
noridge: do you have another question?
|
Mark M. |
noridge: do you have another question?
|
Mark M. |
noridge: do you have another question?
|
Bob R. |
OK Now I have 2 text fields here. If its blank, I put a default value there.
|
Dec 3 | 8:05 PM |
Bob R. |
Otherwise the program wont open the internal file the next time the program is ioened,
|
Bob R. |
Im not advertising this I'm just reying to get answers. Thanks,
|
Mark M. |
Bob: but you have not asked a question
|
Mark M. |
what is your question?
|
Bob R. |
Is there a way to save the record when nothing is in the fields?
|
Mark M. |
presumably
|
Mark M. |
that is up to you, in your code when you "save the record", whatever that means
|
Bob R. |
I check for null char and add the default text when nothing is entered
|
Mark M. |
that is up to you, in your code when you "save the record", whatever that means
|
Bob R. |
nukk
|
Bob R. |
null
|
Mark M. |
there is no such thing as "null char" in Java
|
Bob R. |
null
|
Bob R. |
sorry
|
Mark M. |
the string may be empty (length of 0)
|
Bob R. |
the error msgs say null
|
Mark M. |
that is still not a "null char"
|
Mark M. |
that is still not a "null char"
|
Mark M. |
that is still not a "null char"
|
Dec 3 | 8:10 PM |
Bob R. |
when the string, the file wont open and it points to null char
|
Bob R. |
when the string, the file wont open and it points to null char
|
Bob R. |
I actually check for null char
|
Mark M. |
there is no such thing as a "null char" in Java
|
Mark M. |
there is no such thing as a "null char" in Java
|
Bob R. |
my workaround is working
|
Bob R. |
OK. I must be missing something.
|
Bob R. |
OK. I must be missing something.
|
Bob R. |
Thanks
|
Bob R. |
Thanks
|
Bob R. |
have a nice evening
|
Bob R. |
have a nice evening
|
Mark M. |
if anyone has a question, go ahead
|
Mark M. |
if anyone has a question, go ahead
|
Bob R. | has left the room |
Dec 3 | 8:30 PM |
Mark M. |
that's a wrap for today's chat
|
Mark M. |
the next one is 10am on Thursday
|
Mark M. |
the chat transcript will be archived on http://commonsware.com/office-hours shortly
|
Mark M. |
have a pleasant day!
|
Mark M. |
have a pleasant day!
|
Liam G. | has left the room |
noridge | has left the room |
Mark M. | turned off guest access |