This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

RcCookie presents ...



This is my version of a simple messager system using the UserInfo class. You can send other people messages that only they can see (and the author, me).

You can have up to 5 messages sent to others concurrently, after that the oldest one will be deleted. This is a limitation of the UserInfo class.

The system works by storing the messages in the String slots of the sender's UserInfo object. In the integer slots, it stores the hashed target user that should recieve the message, and the time stamp at which the message was sent.
Because the username of the target user has to be hashed (converted to an integer) because of storage limitations, the target user cannot simply be read out. Because of that you may see 'User could not be loaded' in a sent message. Once the other person opened this scenario for at least once the name will show up though.

1248 views / 7 in the last 7 days

7 votes | 0 in the last 7 days

Tags: mouse demo with-source communication text online message chat communicate

This scenario is a member of: UNiTy iN NeEd

open in greenfoot
Your browser does not support the canvas tag.


Same on my phone. It’s because the refresh symbol is actually a character from the font, and the font does not seem to be supported on the phone. And the alternative font does not have a character symbol for the refresh char so it shows the classic „no char for that“ char.


Why some of the letters look half? It not showing full letter. Something like - Cance. I think it is Cancel. By the way it is a very god scenareo. God job


That’s because I am using a custom font. Normally you just say what text you want and Greenfoot figures out the required image size for you, but because you can only draw onto existing images if you want to set the font I have to calculate the size on my own. To do so, I had to measure the size of each character manually, which leads to two problems: - Some special characters may not have been measured and will just get a default size - My measurements are crappy


I may just make each image a bit bigger, but that is not yet fixed. Also, I’m happy you like it!


I really like this


Thanks a lot!
Nice work!


Thanks! (Didn’t recieve a message from you ;-) )
Hope now u got my message



See all comments

Want to leave a comment? You must first log in.

Who likes this?

Greenfoot_Admin Gabe1098 rocket770 Game/maniac BogdanMicu mik. Roshan123