Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"

Jibby Lala

Ranch Hand
+ Follow
since Aug 29, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jibby Lala

Hi Experts,

I have problem implementing the easy scenario, my intent is to use swing default component's model, so i choose the swing `ButtonModel` for try, i create an instance of model on Server and to update the other models on Clients(local ButtonModel) implement RMI Callbacks.*

The idea is to update the other local `ButtonModel` on clients, when some change happen on the Server shared model but i have problem in implementing this, as i m not finding any realization of such scenario.

This is Client code which should set the button enabled in case of Server button enable by any other Client:

This is server site code implementing shared model:

i would appreciate the concrete implementation of your idea or correction of mine rather then meta discussion.

many thanks,


7 years ago
No i don't have idea about this approach and how it will be realized.
7 years ago
i saw this post:

they are sending the whole object but i just wanted to send
Ball[i].X ,Ball[i].Y and receive the same at client site
7 years ago
I really cordially appreciate your interest, but this work is part of my thesis, as i told i already made that simulation with RMI and closed that chapter by saying that RMI was good so we used that in our first iteration and RMI has these these problems so we are telling the alternative, and then i choose the javanio

but i have problem with it now as realization is concerned if you could help in that i will be really thankful, nevertheless i can share my RMI project with you but my task these days to implement realtime simulation with javanio infact as i said my design with string base is already running (one ball which is running from server who is sending coordinate as string now i want more balls so i have problem to send the coordinate for each ball and receiving the same on client to draw while there are no reference attach to those which ball correspond to which ball on client) but i need little bit generic solution which can be valid for other simulations too, RMI was it's self generic so it didn't take to much effort,but i really need the second alternative for second iteration and to show the other possibility in my thesis.

The scenario i told is really generic ,i wondered how other people realized their network game, i know but still surprised is it really that much work to implement that functionality with javanio.
7 years ago
Thanks for your reply, i already use the RMI with the same logic, i was sending the whole ball object on wire serialized, i wanted to make scalable network and that's why started using javaNio because you know what could be the liabilities with RMI for big application where large size and large number of object needs to be serialized.

It's not about balls its about any object any number ofcourse not 100 but 20 30 or 50 in simulation, this ball simulation i want to made this balls simulation as example for the other simulation so there should be some generic mechanism.
7 years ago
Hello All,

i have designed a real time Physics simulation with javanio , which is about moving balls simultaneously (real time) on multiple clients

Currently, i m sending the coordinates of one ball with string parsing, but now i want to move multiple balls and want to have some generic mechanism other than sending string, so i create 4 balls on server.

how i can realized, so that coordinates of each ball correspond to same ball on client (which i created on client too), and each ball can be move according to its received coordinates from the sever.

This should be realized by sending the reference of each ball but i don't have idea how to realized that with java byte buffer and with javanio overall.

i have the problem with implementation, if somebody help me with code example , it would be great, anyway which can be generic for sending simulation data like object coordinates other than strings can be acceptable but it should implement the usecase as i described.


cross post:
7 years ago
Hi Experts,
i have problem with canvas Jpanel and need optimized solution
i got this design from web

i have three classes :
one is for animation which is canvas(BallPanel), one is frame(Main) and one is panel for swing controls(ControlPanel)

Main is rending both Controlpanel and BallPanel, but in the end, i can't see the drawworld() rendering from BallPanel but i can only ControlPanel
i can't see animation and black background
,seems like controlpanel is all on frame and canvas (black background) is behind that or somewhere but invisible


the Main class above start() is calling from here :

this is controlpanel whichis working as controller:

many thanks for any help and how we could handle such GUI with RMI animation and swing control for interacting/controlling that
can somebody tell optimized way.
jibby lala

P.S: i thought there is some thread problem while i m calling the remote method and rendering the drawworld, either of thread is going on suspension or blocked
7 years ago
No i have no knowledge, the knowledge what i had i m applying since one week but failing while i m bad in "java3d". i thought this could be achieve by applying certain functions from java3d
7 years ago

i have a TransformGroup

which i set somehow:

later i want to set only Y value on this which you see above i didn't

so now i want to get something like

how to set this 5.50, keeping other two values same/like before.

which functions i use, which transformations i apply ? while when i m trying to

i am getting :


load of thanks.


P.S: Might be my graphics terminologies are wrong technically in this content.
7 years ago
Dear Experts,

My intent is to create a library/API for small scale distributed multi-user game /simulation.

i have created couple of applications using java RMI, i tried to keep them simple and to achieve decoupling and now i want to transform those or want to derive/extract from them a generic template.

Can somebody please shed light that How can i come up with library/API.

(What could be the possible ways or design patterns, which can help me or kind of most likely procedure/methodology), so it could be easily usable by other people to create multi-user game.

P.S: I can expect answers to this question but still i want to research for any feedback from technical guru who do all these stuff on every day basis.

load of thanks for any feedback.

Please add this :

7 years ago
why you can't compile or run it?
7 years ago
i ordered a DEBUG HAT BUT i thought it will take time to reach as i m newbie
ok, then can you please shift this thread to "game development" section or most likely place to get answer.
7 years ago
i have created a distributed animation in which my model is remote object and it updates the clients via callback mechanism from server, my server is another remote object
my problem is increasing the no of clients causing the ball increase speed fast because of increasing no of calls to move method from increasing clients, i try to tackle by different programming tricks(calling update method only from one object if that is already running from one object then other client cannot run that but that stops the animation) but failed as i m newbie.
can some body tell me how i could overcome this problem or i m totally on wrong track .

how could i implement such application with RMI callbacks like animation loop is running and when some client change some object position the update propagate to other clients.
i need experts suggestions(my general perception is that i m implementing pushing mechanism with RMI an in that scenario i need to implement polling)
if that is the case how can i implement the polling with RMI,

here is my code :

the client:

the model remote object, which is iterating client list and calling update method of them,

thanks a lot for your time,
7 years ago
Dear experts,

I wanted to implement ball physics and as i m newbie, i adapt the code in tutorial

i try to follow that as i much as i can,
but i m not able to apply all physical phenomenon in code, can somebody please tell me, where i m mistaken or i m still doing some silly programming mistake , the balls are moving when i m not calling bounce method and i m unable to avail the bounce method and ball are moving towards left side instead of falling/ending on floor,

Can some body can recommend me some better way or similar way to accomplish this task of applying physics on two ball or more balls ,

here is code ;

using Adobeball

load of thanks
7 years ago