I have only seen 1 scenario which was out of my mind i.e. 'Private messenger' made by danpost (actually i can't think that this type of scenario can also be made in this site) and now u made it
To be honest, i never saw such quality work. Everybody should try it at once.
U made me speechless by making such type of scenario. I wonder u may be my friend who is always ready to guide. Great work!!!!
Thanks a lot!
You mean "Private Messaging" by Danpost? I've seen that too, I think it works a little different based on the description, but onfortunatly there is no source.
Also it's actually not so complicated. I've got a more detailed explaination in the source code, you may check it out
For the cut text: I know it's quite annoying. I usually just add an additional space at the end to ensure it's fine. That's because I have measured all the characters from the font one by one and some sizes are a bit off apparently
A new version of this scenario was uploaded on 2021-02-13 10:49:46 UTC
A new version of this scenario was uploaded on 2021-02-13 11:05:15 UTC
A new version of this scenario was uploaded on 2021-02-13 11:06:18 UTC
I have that somewhat implemented. If you write a message to yourself you will see that it is bold until you reload the next time. I will try to add that it gets 'unbold' of you click on it.
I would like it to have it so that the message stays bold until you click on it, but that is (as far as I can see) not possible with the storage space limitation of UserInfo. Currently every message consists of three parts: The text of the message, the target user (his id, so an int) and the timestamp of the message, again as an int. I could replace the time with an id if the message, a random number, that would be possible. But the reader had to save a list of ids of the messages he already read, and there is no more space for that.
Hey I'm not angry at all! I'm happy if I can explain this kinda stuff to other people!
So first of all this is how the messaging generally works:
- Someone creates a message with a text and the username of the adressed user
- The text, the target user and the time at which it was created get stored in the userinfo of the person that sends the message (not the recieving one, you can only write the userinfo of the currently logged in person)
- If someone refreshes his inbox the program goes through every message of every userinfo ever stored and checks if the target user is him, the current user. If it is, it knows that the user that stores the message did send the message to him
Now for the way that stiff is stored in each userinfo:
Username ----> Source of any messages from this UserInfo
Score -------> Last refresh time
int[0] \
int[1] |
int[2] |----> Target user of message 1-5, as the hash code of the username
int[3] |
int[4] /
int[5] \
int[6] |
int[7] |----> Timestamp of message 1-5
int[8] |
int[9] /
String[0] \
String[1] |
String[2] |-> Message 1-5
String[3] |
String[4] /
You see, there is no more space left to store which messages have been opened
Will the user be able to see what i wrote
I mean by downloading and clicking on csv file
I realised it after some time and then i changed my greenfoot password immediately
Plz don't laugh. Be honest
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
2021/2/13
2021/2/13
2021/2/13
2021/2/13
2021/2/13
2021/2/13
2021/2/13
2021/2/13
2021/2/13
2021/2/13
2021/2/13
2021/2/14
2021/2/14
2021/2/14
2021/2/15
2021/2/19
2021/2/21
2021/3/2
2021/3/2
2021/5/8
2021/5/8
2021/5/8
2021/6/15
2021/6/17
2021/6/19
2021/6/19
2021/6/21
2021/7/18
2022/4/19
2022/4/19
2022/4/19
2022/4/19
2022/4/19
2022/4/19
2022/4/19
2022/4/19
2022/4/19
2022/4/19
2022/4/19
2022/5/3