1190: "Time"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

User avatar
ZoomanSP
Posts: 1788
Joined: Sun May 26, 2013 11:23 am UTC
Location: Twelve days north of the Othercomic threads, and a few degrees south of complete insanity. (©yappo)

Re: 1190: "Time"

Postby ZoomanSP » Mon Apr 30, 2018 3:51 pm UTC

Wait on.

Image
Spoiler:
Kieryn wrote:They have a culture involving hat wearing. What kind of a collective would come up with such a thing!?
BlitzGirl wrote:I'll get the razor and finish off Occam while we're at it.
ucim / Megan wrote:"It can do whatever it wants. It's the OTT."

User avatar
svenman
Posts: 545
Joined: Fri Jun 14, 2013 2:09 pm UTC
Location: 680 km NNE of the Château d'If

Re: 1190: "Time"

Postby svenman » Tue May 01, 2018 12:09 am UTC

Thank you all for the congrats and the cake!

I've actually found the inspiration to come up with a present present for a belated celebration, but it's not quite finished yet and anyway it kinda ties in with a particular OTC frame which originally ONGed in about three wips, five yips ago, so I'll aim to post it then.

New BSTA:

Why?
Image

You didn't get a choice.
You are being this guy.

On a day like this, what will you do?



Current ONG, this time five yips ago:

Image
Spoiler:
Wait for it.

(Colorization by ggh.)

[Edit: Grammar.]
[Edit 2: Oldpix replaced by its colorization.]
Last edited by svenman on Tue May 08, 2018 9:13 pm UTC, edited 2 times in total.
Mostly active on the One True Thread.
If you need help understanding what's going on there, the xkcd Time Wiki may be useful.

Addams didn't die! But will Addams have a place to live? You can help!

Randallspeed to all blitzers on the One True Thread!

User avatar
lmjb1964
Posts: 2344
Joined: Mon Apr 04, 2011 7:09 pm UTC
Location: In the Present! Need to ketchup NP 2236-2280, plus NP 2026-2058 and something like 2060-2090+?.

Re: 1190: "Time"

Postby lmjb1964 » Tue May 01, 2018 8:21 pm UTC

Is it just me, or does it look like there's a big bite taken out of the leopard on the Time Accessor in bsta?

Eagerly waiting for svenman's future present.

Last night I was admiring the beautiful moon, and I thought of you, Addams! :)
Image

Help addams stay in her home! https://www.crowdrise.com/in-a-comically-tragic-turn-of-events-addams-didnt-die
Imagesmiley by yappo
That's a robot but it totally counts. Image

bot by balthasar_s

User avatar
balthasar_s
Posts: 2216
Joined: Mon Nov 28, 2011 3:20 pm UTC
Location: secret base on the Moon
Contact:

Re: 1190: "Time"

Postby balthasar_s » Tue May 01, 2018 9:44 pm UTC

lmjb1964 wrote:Is it just me, or does it look like there's a big bite taken out of the leopard on the Time Accessor in bsta?
There is a window curtain. Part of it overlaps with the keyboard. The space under it gets a lot more sunlight so it's brighter.
BFTF replay
Good luck, my blitzing friends!
BTTBAA:1023 # Mustard? Use the mirror! Blitzing? Also use the mirror! And here's why. # OTT facebug copy
that's a robot so it doesn't countImage
This text was autogenerated:
swimming unit detector active

User avatar
lmjb1964
Posts: 2344
Joined: Mon Apr 04, 2011 7:09 pm UTC
Location: In the Present! Need to ketchup NP 2236-2280, plus NP 2026-2058 and something like 2060-2090+?.

Re: 1190: "Time"

Postby lmjb1964 » Tue May 01, 2018 11:25 pm UTC

Oh, I see it now. That's funny. I like my interpretation better. Maybe a keyboard took a bite out of your leopard!
Image

Help addams stay in her home! https://www.crowdrise.com/in-a-comically-tragic-turn-of-events-addams-didnt-die
Imagesmiley by yappo
That's a robot but it totally counts. Image

bot by balthasar_s

User avatar
mscha
Posts: 6861
Joined: Tue Mar 26, 2013 10:21 pm UTC
Location: NL
Contact:

1190: "Time" - Time Revisited - np1043

Postby mscha » Wed May 02, 2018 2:10 pm UTC

STAGGERUNGLY...
Image
Spoiler:
Wait for it.
(Colorization by ChronosDragon.)

Replay Time live here!

OTT Time Travel

AUTOMOME wrote:YOU CAN TAKE THE S&M OUT OF THE BLUECAVE, BUT YOU CAN'T TAKE THE BLUECAVE OUT OF THE S&M

-- posted by oldpixbot

User avatar
lmjb1964
Posts: 2344
Joined: Mon Apr 04, 2011 7:09 pm UTC
Location: In the Present! Need to ketchup NP 2236-2280, plus NP 2026-2058 and something like 2060-2090+?.

Re: 1190: "Time"

Postby lmjb1964 » Wed May 02, 2018 9:42 pm UTC

New OtherComic.

I don't know if I've ever posted a new OtherComic before.

In related news, it's sure been quiet in the OTT.
Image

Help addams stay in her home! https://www.crowdrise.com/in-a-comically-tragic-turn-of-events-addams-didnt-die
Imagesmiley by yappo
That's a robot but it totally counts. Image

bot by balthasar_s

User avatar
mrob27
Posts: 1318
Joined: Tue Jun 28, 2011 2:19 am UTC
Location: ]〖  
Contact:

1190: Time: THE MOLPIEST PART OF WAITING FOR IS MANIPS IN YOUR SUSTAINABILITY

Postby mrob27 » Thu May 03, 2018 2:41 am UTC

lmjb1964 wrote:I don't know if I've ever posted a new OtherComic before.

No, you hadn't up until now.

But curiously and quite RELATED, you were the first person to ask for a list of all OtherComics that have been mentioned in this thread. You asked at OTT:432:2 and @Sciscitor replied in OTT:432:4; and that was indeed the first such list.
Robert Munafohttp://mrob.com@mrob_27
Image
I ᴍᴀᴅᴇ sᴏɍᴛᴡᴀʀᴇ ᴛʜᴀᴛ Rᴀɴᴅᴀʟʟ ɍᴏᴜɴᴅ ᴜsᴇɍᴜʟ ɪɴ ᴛʜɪs хᴋᴄᴅ

User avatar
lmjb1964
Posts: 2344
Joined: Mon Apr 04, 2011 7:09 pm UTC
Location: In the Present! Need to ketchup NP 2236-2280, plus NP 2026-2058 and something like 2060-2090+?.

Re: 1190: "Time"

Postby lmjb1964 » Thu May 03, 2018 2:54 am UTC

Thank you, mrob! I am always in awe of your OTT search-fu. It is much appreciated.
Image

Help addams stay in her home! https://www.crowdrise.com/in-a-comically-tragic-turn-of-events-addams-didnt-die
Imagesmiley by yappo
That's a robot but it totally counts. Image

bot by balthasar_s

User avatar
mrob27
Posts: 1318
Joined: Tue Jun 28, 2011 2:19 am UTC
Location: ]〖  
Contact:

1190: Time: I MADE YOU A WIP, BUT I SHIPPED IT

Postby mrob27 » Thu May 03, 2018 4:08 am UTC

lmjb1964 wrote:Thank you, mrob! I am always in awe of your OTT search-fu. It is much appreciated.

It's easy, I just

ott-postsearch lmjb1964 'xkcd.com/[1-9][0-9][0-9][0-9]' | less -r


:D

mrob27 Image

ETA: Ah, the notorious "What's that you're digging there, Cueball?" frames.
Robert Munafohttp://mrob.com@mrob_27
Image
I ᴍᴀᴅᴇ sᴏɍᴛᴡᴀʀᴇ ᴛʜᴀᴛ Rᴀɴᴅᴀʟʟ ɍᴏᴜɴᴅ ᴜsᴇɍᴜʟ ɪɴ ᴛʜɪs хᴋᴄᴅ

User avatar
ZoomanSP
Posts: 1788
Joined: Sun May 26, 2013 11:23 am UTC
Location: Twelve days north of the Othercomic threads, and a few degrees south of complete insanity. (©yappo)

Re: 1190: "Time"

Postby ZoomanSP » Thu May 03, 2018 1:20 pm UTC

RISUNG...
Image
Spoiler:
Wait for it.
Wait on.

Image
Spoiler:
Kieryn wrote:They have a culture involving hat wearing. What kind of a collective would come up with such a thing!?
BlitzGirl wrote:I'll get the razor and finish off Occam while we're at it.
ucim / Megan wrote:"It can do whatever it wants. It's the OTT."

User avatar
mscha
Posts: 6861
Joined: Tue Mar 26, 2013 10:21 pm UTC
Location: NL
Contact:

1190: "Time" - Time Revisited - np1073

Postby mscha » Thu May 03, 2018 8:10 pm UTC

BEFUNGERED...
Image
Spoiler:
Wait for it.
(Colorization by Hillperson.)

Replay Time live here!

OTT Time Travel

AUTOMOME wrote:QUOTH THE CUEGANITE, "CH*RP."

-- posted by oldpixbot

User avatar
ucim
Posts: 6170
Joined: Fri Sep 28, 2012 3:23 pm UTC
Location: The One True Thread

Re: 1190: "Time"

Postby ucim » Fri May 04, 2018 4:23 pm UTC

Just dropping in for a visit. Nothing of import to say (except "ooh, wingish!" to Hillperson's coloration). ChronosDragon (whatever happened to him?) too. And mscha (one of the originals, IIRC).

And yes, it does look like a keyboard had a snack. Do they run Apple Linux on the moon? (shhh - it's a secret!)

So, what would I do if I were this guy? Maybe I'd invent transparent aluminum. Then we could rebuild the dam. Unless this guy is on the moon, in which case I wouldn't worry too much about the sea. It may be big, and be doing what it wants, but it's not doing much nowadays.

Jose
Order of the Sillies, Honoris Causam - bestowed by charlie_grumbles on NP 859 * OTTscar winner: Wordsmith - bestowed by yappobiscuts and the OTT on NP 1832 * Ecclesiastical Calendar of the Order of the Holy Contradiction * Please help addams if you can. She needs all of us.

User avatar
ZoomanSP
Posts: 1788
Joined: Sun May 26, 2013 11:23 am UTC
Location: Twelve days north of the Othercomic threads, and a few degrees south of complete insanity. (©yappo)

Re: 1190: "Time"

Postby ZoomanSP » Sat May 05, 2018 6:07 am UTC

Wait on.

Image
Spoiler:
Kieryn wrote:They have a culture involving hat wearing. What kind of a collective would come up with such a thing!?
BlitzGirl wrote:I'll get the razor and finish off Occam while we're at it.
ucim / Megan wrote:"It can do whatever it wants. It's the OTT."

User avatar
GnomeAnne
Posts: 541
Joined: Sat Sep 03, 2016 12:35 am UTC
Location: [center][img]http://forums.xkcd.com/download/file.php?id=54350&t=1[/img]

Re: 1190: "Time"

Postby GnomeAnne » Sun May 06, 2018 3:35 am UTC

lmjb1964 wrote:New OtherComic.

I don't know if I've ever posted a new OtherComic before.

In related news, it's sure been quiet in the OTT.

I've been reading in the past mostly.
Wait For It.

User avatar
svenman
Posts: 545
Joined: Fri Jun 14, 2013 2:09 pm UTC
Location: 680 km NNE of the Château d'If

Re: 1190: "Time"

Postby svenman » Sun May 06, 2018 3:46 am UTC

New BSTA:
Examine desk
Image

Your desk is full of things.
The most important are a computer and some drawings.


I'm getting a sense of deja vu here. Not sure if that sense refers to something seen within BSTA.

Those drawings, can they be recognized as drawings of panels we've seen in BSTA, BFTF or somewhere else?
Mostly active on the One True Thread.
If you need help understanding what's going on there, the xkcd Time Wiki may be useful.

Addams didn't die! But will Addams have a place to live? You can help!

Randallspeed to all blitzers on the One True Thread!

User avatar
mscha
Posts: 6861
Joined: Tue Mar 26, 2013 10:21 pm UTC
Location: NL
Contact:

1190: "Time" - Time Revisited - np1129

Postby mscha » Sun May 06, 2018 4:10 am UTC

GAUGUNGS...
Image
Spoiler:
Wait for it.
(Colorization by ggh.)

Replay Time live here!

OTT Time Travel

AUTOMOME wrote:TREEISHNESS? WE DON'T NEED NO STINKIN' TREEISHNESS.

-- posted by oldpixbot

User avatar
ZoomanSP
Posts: 1788
Joined: Sun May 26, 2013 11:23 am UTC
Location: Twelve days north of the Othercomic threads, and a few degrees south of complete insanity. (©yappo)

Re: 1190: "Time"

Postby ZoomanSP » Mon May 07, 2018 11:56 am UTC

NOTICUNG...
Image
Spoiler:
Wait for it.
Wait on.

Image
Spoiler:
Kieryn wrote:They have a culture involving hat wearing. What kind of a collective would come up with such a thing!?
BlitzGirl wrote:I'll get the razor and finish off Occam while we're at it.
ucim / Megan wrote:"It can do whatever it wants. It's the OTT."

User avatar
taixzo
Posts: 1592
Joined: Fri Mar 16, 2012 4:54 am UTC
Location: The Present

Re: 1190: "Time"

Postby taixzo » Mon May 07, 2018 6:08 pm UTC

New Othercomic.

This one has some mustard - there's a near-invisible, slightly larger Cueball overlapping and a bit to his left.

Spoilered for posterity:

Spoiler:
Image
driving_cars.png
driving_cars.png (21.64 KiB) Viewed 22305 times
BlitzGirl the Next
BlitzGirl the Fast
Knight Temporal
Bringer of the Light

Useless utilities: Newpix clock for Mac OS X, Newpix clock for Ubuntu

Sandgarden - a relaxing experience for Time Waiters

Best wishes to GnomeAnne, ColletArrow and january1may! One day you will all join me in the Present!

User avatar
addams
Posts: 9757
Joined: Sun Sep 12, 2010 4:44 am UTC
Location: Gold Beach, OR; 97444

Re: 1190: "Time"

Postby addams » Tue May 08, 2018 4:57 am UTC

Time goes by so slowly these day.
Snap it Up! Posters!

You Must have a great deal to say.
Life is, just, an exchange of electrons; It is up to us to give it meaning.

We are all in The Gutter.
Some of us see The Gutter.
Some of us see The Stars.
by mr. Oscar Wilde.

Those that want to Know; Know.
Those that do not Know; Don't tell them.
They do terrible things to people that Tell Them.

User avatar
ZoomanSP
Posts: 1788
Joined: Sun May 26, 2013 11:23 am UTC
Location: Twelve days north of the Othercomic threads, and a few degrees south of complete insanity. (©yappo)

Re: 1190: "Time"

Postby ZoomanSP » Tue May 08, 2018 7:01 am UTC

LOOKUNGATUS...
Image
Spoiler:
Wait for it.
Wait on.

Image
Spoiler:
Kieryn wrote:They have a culture involving hat wearing. What kind of a collective would come up with such a thing!?
BlitzGirl wrote:I'll get the razor and finish off Occam while we're at it.
ucim / Megan wrote:"It can do whatever it wants. It's the OTT."

User avatar
mscha
Posts: 6861
Joined: Tue Mar 26, 2013 10:21 pm UTC
Location: NL
Contact:

1190: "Time" - Time Revisited - np1181

Postby mscha » Tue May 08, 2018 8:10 am UTC

SOCIOLUNGUISTS...
Image
Spoiler:
Wait for it.
(Colorization by Moose Anus.)

Replay Time live here!

OTT Time Travel

AUTOMOME wrote:I'M IN UR CUSTARD, BLITZING UR CAVEISHNESS

-- posted by oldpixbot

User avatar
svenman
Posts: 545
Joined: Fri Jun 14, 2013 2:09 pm UTC
Location: 680 km NNE of the Château d'If

Re: 1190: "Time"

Postby svenman » Tue May 08, 2018 8:57 pm UTC

WalkUNG:
Image
Spoiler:
Wait for it.

Weather report: We've had some warm and sunny dips, as if it were summer already. Nevertheless I had to spend the last wipend at home with a micromolp invasion feeling steambottlish, unfortunately. Getting better now, though. Didn't call in sick as I just started a new FFS, which so far I find a lot more molpish than my previous one turned out to be after a while. It gives me a lot more opportunity to find out new things and put them to use, too.
Mostly active on the One True Thread.
If you need help understanding what's going on there, the xkcd Time Wiki may be useful.

Addams didn't die! But will Addams have a place to live? You can help!

Randallspeed to all blitzers on the One True Thread!

User avatar
lmjb1964
Posts: 2344
Joined: Mon Apr 04, 2011 7:09 pm UTC
Location: In the Present! Need to ketchup NP 2236-2280, plus NP 2026-2058 and something like 2060-2090+?.

Re: 1190: "Time": ♫ THE CASTRAFTLE IS ALIVE WITH THE SOUND OF WOWTERFALLS ♫

Postby lmjb1964 » Tue May 08, 2018 9:11 pm UTC

Sorry about the micromolps, svenman, but that's great about the new FFS!

Good m*stard-spooting there, taixzo. It's still there in the original. Maybe it's supposed to be there; it's his guardian angel, or something. Nah, probably just m*stard.

Some great OTColored frames. I remember making an online jigsaw puzzle of that one by ggh. Then I couldn't complete the puzzle! WOnder where ggh is. It's been a long Time since she stopped by.

Looking at the drawings on the desk in bsta, it looks like some of the pictures could be some of the "screen shots' used in the story, and that one picture looks like it could be the room from the beginning of the story. And ENHANCERs our there.

Hi, addams!

It's a lovely day here, warm and sunny. I'm working from home since there's a strike going on at work, and I don't want to cross the picket line.
Image

Help addams stay in her home! https://www.crowdrise.com/in-a-comically-tragic-turn-of-events-addams-didnt-die
Imagesmiley by yappo
That's a robot but it totally counts. Image

bot by balthasar_s

User avatar
balthasar_s
Posts: 2216
Joined: Mon Nov 28, 2011 3:20 pm UTC
Location: secret base on the Moon
Contact:

Re: 1190: "Time"; MolpyUpdate!

Postby balthasar_s » Tue May 08, 2018 10:44 pm UTC

Sustainabilizer wrote:MolpyUpdate: Image

I made a very simple AI for the game.
If you press ctrl + i it will play the game for you.
It is very simple so it can make mistakes sometimes.

Code: Select all

# Molpy Up!
#
# Based on Max00355's version of DoodleJump, <https://github.com/Max00355/DoodleJump>
# Copyright (C) 2015 by Frankie Primerano,
# written in 120 minutes, see <https://www.reddit.com/r/gamedev/comments/3umhuq/doodle_jump_created_in_120_minutes_with_python/>.
#
# Copyright (C) 2018 by Peter Gerwinski <http://www.peter.gerwinski.de>,
# OTTified in about 120 minutes.
#
# edited to add arrow - balthasar_s
# edited to add AI - balthasar_s
#
# This program is Free Software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GNU GPL), version 3,
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program, see the file LICENSE.  If not, see
# <http://www.gnu.org/licenses/>.
#
# The player figure "Molpy" is
# Copyright (C) 2013 by BlitzGirl, see user "BlitzGirl" at <http://forums.xkcd.com>,
# released under conditions compatible with both the GNU GPL v3 and the
# CC BY-NC 2.5 license (see below).
#
# All other artwork used by this program is based on xkcd 1190 "Time",
# Copyright (C) 2013 by Randall Munroe, see <http://xkcd.com/1190>,
# released under the Creative Commonns Attribution-NonCommercial Generic License,
# version 2.5 (CC BY-NC 2.5), see <https://creativecommons.org/licenses/by-nc/2.5/>.
#
# In particular, the contents of the directory "assets"
# is NOT subject to the GNU GPL.

import pygame
from pygame.locals import *
import sys
import datetime
import random

class MolpyUp:

    platformTypeSand = 0
    platformTypeGrass = 1
    platformTypeNormal = platformTypeGrass
    platformTypeGrapevine = 2
    platformTypeAfterLucky = 3
    platformTypeCastle = 4
    platformTypeWater = 5
    platformTypeRaftcastle = 6
    platformTypeFloating = platformTypeRaftcastle
    platformTypeLucky = 7
    platformTypeBreaking = 8
    platformTypeTheEnd = 9
    platformTypeWonTheGame = 10

    itemTypeAccelerator = 0
    itemTypeBeanie = 1
    itemTypeSnake = 2
    itemTypePrickly = 3
    itemTypeSandcastle = 4
    itemTypeFlag = 5
    itemTypePlantSand = 6
    itemTypePlantGrass = 7

    scoreSnake = 1738
    scorePrickly = 2015
    scoreGrass = 2193
    scoreAfterLucky = 2315
    scoreCastle = 2825
    scoreLucky = 2976
    scoreRaftcastle = 3031
    scoreWater = 3043
    scoreTheEnd = 3089
    scoreEpilogue = 3094

    def __init__(self):
        self.sx = 553
        self.sy = 395
        self.extrax = self.sx // 16
        self.screen = pygame.display.set_mode((self.sx, self.sy))
        pygame.font.init()
        self.font = pygame.font.SysFont("xkcd,sans", 25)
        self.clock = pygame.time.Clock()
        self.xmovementmax = 10
        self.eternal = False
        self.ai = False
        self.imgPlatformSand = [ pygame.image.load("assets/platformSand1.png").convert_alpha(),
                                 pygame.image.load("assets/platformSand2.png").convert_alpha(),
                                 pygame.image.load("assets/platformSand3.png").convert_alpha(),
                                 pygame.image.load("assets/platformSand4.png").convert_alpha() ]
        self.imgPlatformGrass = [ pygame.image.load("assets/platformGrass1.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass2.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass3.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass1f.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass2f.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass3f.png").convert_alpha() ]
        self.imgPlatformWater = [ pygame.image.load("assets/platformWater1.png").convert_alpha(),
                                  pygame.image.load("assets/platformWater2.png").convert_alpha(),
                                  pygame.image.load("assets/platformWater1f.png").convert_alpha(),
                                  pygame.image.load("assets/platformWater2f.png").convert_alpha() ]
        self.imgPlatformAfterLucky = pygame.image.load("assets/platformAfterLucky.png").convert_alpha()
        self.imgPlatformCastle = pygame.image.load("assets/platformCastle.png").convert_alpha()
        self.imgPlatformLuckySleeping = pygame.image.load("assets/platformLuckySleeping.png").convert_alpha()
        self.imgPlatformLuckyAttacking = pygame.image.load("assets/platformLuckyAttacking.png").convert_alpha()
        self.imgPlatformRaftcastle = pygame.image.load("assets/platformRaftcastle.png").convert_alpha()
        self.imgPlatformGrapevine = pygame.image.load("assets/platformGrapevine.png").convert_alpha()
        self.imgPlatformBreaking = pygame.image.load("assets/platformBreaking.png").convert_alpha()
        self.imgPlatformBroken = pygame.image.load("assets/platformBroken.png").convert_alpha()
        self.imgPlatformTheEnd = pygame.image.load("assets/platformTheEnd.png").convert_alpha()
        self.imgPlatformWonTheGame = pygame.image.load("assets/platformWonTheGame.png").convert_alpha()
        self.imgPlayerRightUp = pygame.image.load("assets/playerRightUp.png").convert_alpha()
        self.imgPlayerRightDown = pygame.image.load("assets/playerRightDown.png").convert_alpha()
        self.imgPlayerLeftUp = pygame.image.load("assets/playerLeftUp.png").convert_alpha()
        self.imgPlayerLeftDown = pygame.image.load("assets/playerLeftDown.png").convert_alpha()
        self.imgPlayerRightUpBeanie = pygame.image.load("assets/playerRightUpBeanie.png").convert_alpha()
        self.imgPlayerRightDownBeanie = pygame.image.load("assets/playerRightDownBeanie.png").convert_alpha()
        self.imgPlayerLeftUpBeanie = pygame.image.load("assets/playerLeftUpBeanie.png").convert_alpha()
        self.imgPlayerLeftDownBeanie = pygame.image.load("assets/playerLeftDownBeanie.png").convert_alpha()
        self.imgAccelerator = pygame.image.load("assets/accelerator.png").convert_alpha()
        self.imgAcceleratorUsed = pygame.image.load("assets/acceleratorUsed.png").convert_alpha()
        self.imgBeanie = pygame.image.load("assets/beanie.png").convert_alpha()
        self.imgSnake = pygame.image.load("assets/snake.png").convert_alpha()
        self.imgSnakeLeft = pygame.image.load("assets/snakeLeft.png").convert_alpha()
        self.imgSnakeRight = pygame.image.load("assets/snakeRight.png").convert_alpha()
        self.imgPrickly = pygame.image.load("assets/prickly.png").convert_alpha()
        self.imgPricklyCurled = pygame.image.load("assets/pricklyCurled.png").convert_alpha()
        self.imgSandcastle = pygame.image.load("assets/sandcastle.png").convert_alpha()
        self.imgFlagLeft = pygame.image.load("assets/flagLeft.png").convert_alpha()
        self.imgFlagLeftDown = pygame.image.load("assets/flagLeftDown.png").convert_alpha()
        self.imgFlagRight = pygame.image.load("assets/flagRight.png").convert_alpha()
        self.imgFlagRightDown = pygame.image.load("assets/flagRightDown.png").convert_alpha()
        self.imgPlantSand = [ pygame.image.load("assets/plantSand1.png").convert_alpha(),
                              pygame.image.load("assets/plantSand2.png").convert_alpha(),
                              pygame.image.load("assets/plantSand3.png").convert_alpha(),
                              pygame.image.load("assets/plantSand4.png").convert_alpha(),
                              pygame.image.load("assets/plantSand5.png").convert_alpha() ]
        self.imgPlantGrass = [ pygame.image.load("assets/plantGrass1.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass2.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass3.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass4.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass5.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass6.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass7.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass8.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass9.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass10.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass11.png").convert_alpha() ]
        self.imgMolpArrow = pygame.image.load("assets/molpArrow.png").convert_alpha()

    def reset(self):
        self.cameray = 0
        self.score = 0
        self.sandcastles = 0
        self.speed = 30
        self.showArrow = True
        self.playerx = self.sx // 2
        self.playery = self.sy * 3 // 4
        self.direction = 0
        self.jump = 0
        self.gravity = 0
        self.xmovement = 0
        self.playerWearsBeanie = False
        self.playerCarriesFlag = False
        self.hadSnake = False
        self.hadPrickly = False
        self.hadAfterLucky = False
        self.hadCastle = False
        self.hadLucky = False
        self.hadTheEnd = False
        self.raftcastleHasFlag = False
        self.platforms = [[self.playerx, self.playery + self.sy // 6, self.platformTypeSand, 0, 0]]
        self.generateInitialPlatforms()
        self.items = []
        self.aiNextPlatformOk = False
        self.aiNextPlatform=[self.playerx,self.playery]
        if self.filename:
            self.restoreGame (self.filename)

    def saveGame(self):
        self.filename = datetime.datetime.now().strftime("%Y%m%d-%H%M%S.molpyup")
        with open(self.filename, "w") as file:
            file.write("MolpyUp!\n")
            file.write("cameray: " + str(self.cameray) + "\n")
            file.write("score: " + str(self.score) + "\n")
            file.write("sandcastles: " + str(self.sandcastles) + "\n")
            file.write("speed: " + str(self.speed) + "\n")
            file.write("showArrow: " + str(self.showArrow) + "\n")
            file.write("playerx: " + str(self.playerx) + "\n")
            file.write("playery: " + str(self.playery) + "\n")
            file.write("direction: " + str(self.direction) + "\n")
            file.write("jump: " + str(self.jump) + "\n")
            file.write("gravity: " + str(self.gravity) + "\n")
            file.write("xmovement: " + str(self.xmovement) + "\n")
            file.write("playerWearsBeanie: " + str(self.playerWearsBeanie) + "\n")
            file.write("playerCarriesFlag: " + str(self.playerCarriesFlag) + "\n")
            file.write("hadSnake: " + str(self.hadSnake) + "\n")
            file.write("hadPrickly: " + str(self.hadPrickly) + "\n")
            file.write("hadAfterLucky: " + str(self.hadAfterLucky) + "\n")
            file.write("hadCastle: " + str(self.hadCastle) + "\n")
            file.write("hadLucky: " + str(self.hadLucky) + "\n")
            file.write("hadTheEnd: " + str(self.hadTheEnd) + "\n")
            file.write("raftcastleHasFlag: " + str(self.raftcastleHasFlag) + "\n")
            file.write("eternal: " + str(self.eternal) + "\n")
            file.write("platforms: " + str(self.platforms) + "\n")
            file.write("items: " + str(self.items) + "\n")

    def readVariable(self, line, name, var):
        if line.startswith(name + ": "):
            return eval (line[len(name) + 2:])
        else:
            return var

    def restoreGame(self, filename):
        try:
            with open(filename, "r") as file:
                lines = file.readlines()
            for line in lines:
                self.cameray = self.readVariable(line, "cameray", self.cameray)
                self.score = self.readVariable(line, "score", self.score)
                self.sandcastles = self.readVariable(line, "sandcastles", self.sandcastles)
                self.speed = self.readVariable(line, "speed", self.speed)
                self.showArrow = self.readVariable(line, "showArrow", self.showArrow)
                self.playerx = self.readVariable(line, "playerx", self.playerx)
                self.playery = self.readVariable(line, "playery", self.playery)
                self.direction = self.readVariable(line, "direction", self.direction)
                self.jump = self.readVariable(line, "jump", self.jump)
                self.gravity = self.readVariable(line, "gravity", self.gravity)
                self.xmovement = self.readVariable(line, "xmovement", self.xmovement)
                self.playerWearsBeanie = self.readVariable(line, "playerWearsBeanie", self.playerWearsBeanie)
                self.playerCarriesFlag = self.readVariable(line, "playerCarriesFlag", self.playerCarriesFlag)
                self.hadSnake = self.readVariable(line, "hadSnake", self.hadSnake)
                self.hadPrickly = self.readVariable(line, "hadPrickly", self.hadPrickly)
                self.hadAfterLucky = self.readVariable(line, "hadAfterLucky", self.hadAfterLucky)
                self.hadCastle = self.readVariable(line, "hadCastle", self.hadCastle)
                self.hadLucky = self.readVariable(line, "hadLucky", self.hadLucky)
                self.hadTheEnd = self.readVariable(line, "hadTheEnd", self.hadTheEnd)
                self.raftcastleHasFlag = self.readVariable(line, "raftcastleHasFlag", self.raftcastleHasFlag)
                self.platforms = self.readVariable(line, "platforms", self.platforms)
                self.items = self.readVariable(line, "items", self.items)
            return True
        except FileNotFoundError:
            return False
   
    def findNextPlatform(self):
        bestDistance=float("Inf")
        for p in self.platforms:
            if not self.jump:
                distance = abs(p[0]-self.playerx) * 0.5 - p[1]
            else:
                distance = abs(p[0]-self.playerx) * 0.5 + abs(p[1]-self.playery)
                if p[1]>self.playery:
                    distance += 900
            if p[2] > self.platformTypeNormal and p[2] <= self.platformTypeFloating:
                distance += 290
            if p[2] == self.platformTypeBreaking:
                distance = float("Inf")
            if distance<bestDistance:
                bestDistance = distance
                self.aiNextPlatform=p
                self.aiNextPlatformOk = True
               
    def updatePlayer(self):
        if ((not self.jump) and (self.playery > self.aiNextPlatform[1])) or (self.aiNextPlatform[1] - self.cameray > self.sy * 7//6):
            self.aiNextPlatformOk = False
       
        if not self.aiNextPlatformOk:
            self.findNextPlatform()
   
        if not self.jump:
            self.playery += self.gravity
            self.gravity += 1
        else:
            self.playery -= self.jump
            self.jump -= 1
        key = pygame.key.get_pressed()
       
        if key[K_RIGHT]:
            if self.xmovement < self.xmovementmax:
                self.xmovement += 1
            self.direction = 0
        elif key[K_LEFT]:
            if self.xmovement > -self.xmovementmax:
                self.xmovement -= 1
            self.direction = 1
        elif key[K_PLUS] or key[K_KP_PLUS]:
            if pygame.key.get_mods() & KMOD_CTRL:
                self.score += 10
            else:
                self.speed += 1
                self.screen.blit(self.font.render("Speed: " + str(self.speed), -1, (0, 0, 0)), (self.sx // 32, self.sy - self.sy // 12))
        elif key[K_MINUS] or key[K_KP_MINUS]:
            if pygame.key.get_mods() & KMOD_CTRL:
                self.score -= 10
            else:
                self.speed -= 1
                self.screen.blit(self.font.render("Speed: " + str(self.speed), -1, (0, 0, 0)), (self.sx // 32, self.sy - self.sy // 12))
        else:
            if self.ai:
                if self.playerx<self.aiNextPlatform[0] -2.5*self.xmovement:
                    if self.xmovement < self.xmovementmax:
                        self.xmovement += 1
                    self.direction = 0
                elif self.playerx>self.aiNextPlatform[0] -2.5*self.xmovement:
                    if self.xmovement > -self.xmovementmax:
                        self.xmovement -= 1
                    self.direction = 1
                else:
                    if self.xmovement > 0:
                        self.xmovement -= 1
                    elif self.xmovement < 0:
                        self.xmovement += 1
            else:
                if self.xmovement > 0:
                    self.xmovement -= 1
                elif self.xmovement < 0:
                    self.xmovement += 1
       
        if self.playerx > self.sx + self.extrax:
            self.playerx = -self.extrax
        elif self.playerx < -self.extrax:
            self.playerx = self.sx + self.extrax
        self.playerx += self.xmovement
        if self.playery - self.cameray <= self.sy // 3:
            self.cameray -= self.sy // 60

        if (self.playery - self.cameray + self.imgPlayerRightUp.get_height()) < 0:
            if self.showArrow:
                self.screen.blit(self.imgMolpArrow, (self.playerx, 2))
        else:
            if not self.direction:
                if self.jump:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerRightDownBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerRightDown, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagLeft, (self.playerx + 24, self.playery - 10 - self.cameray))
                else:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerRightUpBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerRightUp, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagLeftDown, (self.playerx + 22, self.playery - 10 - self.cameray))
            else:
                if self.jump:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerLeftDownBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerLeftDown, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagRight, (self.playerx + 13, self.playery - 10 - self.cameray))
                else:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerLeftUpBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerLeftUp, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagRightDown, (self.playerx + 11, self.playery - 10 - self.cameray))
       
        # self.screen.blit(self.imgMolpArrow, (self.aiNextPlatform[0], self.aiNextPlatform[1] - self.cameray))

    def choosePlatformType(self):
        if self.score >= self.scoreTheEnd:
            return self.platformTypeTheEnd
        platformType = random.randint(0, 999)
        if self.score > self.scoreWater:
            if platformType < 900:
                return self.platformTypeWater
            else:
                return self.platformTypeRaftcastle
        elif platformType < 800:
            if platformType < 1000 * self.score // self.scoreGrass:
                if self.score > self.scoreAfterLucky and not self.hadAfterLucky:
                    self.hadAfterLucky = True
                    return self.platformTypeAfterLucky
                elif self.score > self.scoreCastle and not self.hadCastle:
                    self.hadCastle = True
                    return self.platformTypeCastle
                elif self.score > self.scoreLucky and not self.hadLucky:
                    self.hadLucky = True
                    return self.platformTypeLucky
                else:
                    return self.platformTypeGrass
            else:
                return self.platformTypeSand
        elif platformType < 900:
            return self.platformTypeGrapevine
        else:
            return self.platformTypeBreaking

    def generateNewPlatform(self):
        platformType = self.choosePlatformType()
        if platformType == self.platformTypeTheEnd:
            if not self.hadTheEnd:
                self.platforms.append([self.sx // 2 - self.imgPlatformTheEnd.get_width() // 2, self.platforms[-1][1] - self.sy // 4, self.platformTypeTheEnd, False, False])
                self.platforms.append([self.sx // 2 - self.imgPlatformWonTheGame.get_width() // 2, self.platforms[-1][1] - self.sy * 2 // 3, self.platformTypeWonTheGame, False, False])
                self.hadTheEnd = True
        elif platformType == self.platformTypeWater or platformType == self.platformTypeRaftcastle:
            self.platforms.append([random.randint(0, self.sx * 7 // 8), self.platforms[-1][1] - self.sy // 8, platformType, False, False])
        elif platformType == self.platformTypeLucky:
            self.platforms.append([0, self.platforms[-1][1] - self.sy // 12, platformType, False, False])
        else:
            self.platforms.append([random.randint(0, self.sx * 7 // 8), self.platforms[-1][1] - self.sy // 12, platformType, False, False])
        if platformType <= self.platformTypeNormal:
            if platformType == self.platformTypeSand:
                self.platforms[-1][-1] = random.randint(0, len(self.imgPlatformSand) - 1)
            elif platformType == self.platformTypeGrass:
                self.platforms[-1][-1] = random.randint(0, len(self.imgPlatformGrass) - 1)
            else:
                self.platforms[-1][-1] = random.randint(0, len(self.imgPlatformWater) - 1)
            x = self.platforms[-1][0]
            y = self.platforms[-1][1]
            if platformType == self.platformTypeGrass and self.score > self.scoreSnake and not self.hadSnake:
                self.items.append([x - 10, y + 9, self.itemTypeSnake, False])
                self.hadSnake = True
            elif platformType == self.platformTypeGrass and self.score > self.scorePrickly and not self.hadPrickly:
                self.items.append([x + self.imgPlatformSand[0].get_width() // 3, y + 8, self.itemTypePrickly, False])
                self.hadPrickly = True
            elif self.score > 0:
                check = random.randint(0, 999)
                if check > 800:
                    xx = x + random.randint(0, self.imgPlatformSand[0].get_width() - 40)
                    itemType = random.randint(0,999)
                    if itemType < 50:
                        self.items.append([xx, y + 7, self.itemTypeBeanie, False])
                    elif itemType < 150 and platformType == self.platformTypeSand:
                        self.items.append([xx, y + 7, self.itemTypeSandcastle, False])
                    elif itemType < 350 and platformType == self.platformTypeSand:
                        self.items.append([xx, y + 7, self.itemTypeFlag, False])
                    elif itemType < 950 and platformType == self.platformTypeSand:
                        self.items.append([xx, y + 8, self.itemTypePlantSand, itemType % len(self.imgPlantSand)])
                    elif itemType < 100 and platformType == self.platformTypeGrass:
                        self.items.append([xx, y + 6, self.itemTypeFlag, False])
                    elif itemType < 700 and platformType == self.platformTypeGrass:
                        self.items.append([xx, y + 10, self.itemTypePlantGrass, itemType % len(self.imgPlantGrass)])
                    elif itemType < 850 and platformType == self.platformTypeGrass and self.score > self.scorePrickly:
                        self.items.append([xx, y + 8, self.itemTypePrickly, False])
                    elif itemType < 950 and platformType == self.platformTypeGrass and self.score > self.scoreSnake:
                        self.items.append([x - 10, y + 9, self.itemTypeSnake, False])
                    else:
                        self.items.append([xx - 5, y + 10, self.itemTypeAccelerator, False])

    def updatePlatforms(self):
        while self.platforms[0][1] - self.cameray > self.sy + self.sy // 12:
            self.generateNewPlatform()
            self.platforms.pop(0)
            if self.score < self.scoreEpilogue:
                self.score += 1
        for p in self.platforms:
            if p[2] == self.platformTypeGrapevine:
                img = self.imgPlatformGrapevine
            elif p[2] == self.platformTypeAfterLucky:
                img = self.imgPlatformAfterLucky
            elif p[2] == self.platformTypeCastle:
                img = self.imgPlatformCastle
            elif p[2] == self.platformTypeRaftcastle:
                img = self.imgPlatformRaftcastle
            else:
                # all have same size
                img = self.imgPlatformSand[0]
            rect = pygame.Rect(p[0], p[1], img.get_width(), self.imgPlatformSand[0].get_height())
            player = pygame.Rect(self.playerx + 15, self.playery, self.imgPlayerRightUp.get_width() - 30, self.imgPlayerRightUp.get_height())
            if rect.colliderect(player) and self.gravity and self.playery < (p[1] - self.cameray):
                if p[2] == self.platformTypeBreaking:
                    p[-1] = True
                else:
                    self.jump = self.sy // 20
                    self.aiNextPlatformOk = False
                    self.gravity = 0
                    if p[2] == self.platformTypeLucky and not (self.playerWearsBeanie and self.playerCarriesFlag) and p[-2] <= 0:
                        self.xmovement = self.sx // 20
                        self.direction = 0
                        self.cameray -= self.sy // 12
                        p[-2] = -1
                    elif (p[2] == self.platformTypeAfterLucky or p[2] == self.platformTypeCastle or p[2] == self.platformTypeLucky) and self.playerCarriesFlag and not p[-2]:
                        self.playerCarriesFlag = False
                        p[-2] = True
                        self.sandcastles += 1
                    elif p[2] == self.platformTypeRaftcastle and self.playerCarriesFlag and not self.raftcastleHasFlag:
                        self.playerCarriesFlag = False
                        self.raftcastleHasFlag = True
                        self.sandcastles += 1
            if p[2] > self.platformTypeNormal and p[2] <= self.platformTypeFloating:
                if p[-1]:
                    if p[2] == self.platformTypeAfterLucky:
                        img = self.imgPlatformAfterLucky
                    elif p[2] == self.platformTypeCastle:
                        img = self.imgPlatformCastle
                    else:
                        img = self.imgPlatformGrapevine
                    p[0] += self.extrax // 10
                    if p[0] + img.get_width() > self.sx + self.extrax:
                        p[-1] = False
                else:
                    p[0] -= self.extrax // 10
                    if p[0] <= 0:
                        p[-1] = True

   
           
   
    def drawPlatforms(self):
        for p in self.platforms:
            if p[2] == self.platformTypeSand:
                self.screen.blit(self.imgPlatformSand[p[-1]], (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeGrass:
                self.screen.blit(self.imgPlatformGrass[p[-1]], (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeWater:
                self.screen.blit(self.imgPlatformWater[p[-1]], (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeGrapevine:
                self.screen.blit(self.imgPlatformGrapevine, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeAfterLucky:
                if p[-2]:
                    self.screen.blit(self.imgFlagRight, (p[0] + 47, p[1] - 12 - self.cameray))
                self.screen.blit(self.imgPlatformAfterLucky, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeCastle:
                if p[-2]:
                    self.screen.blit(self.imgFlagRight, (p[0] + self.imgPlatformCastle.get_width() - 16, p[1] - 4 - self.cameray))
                self.screen.blit(self.imgPlatformCastle, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeLucky:
                if p[-2]:
                    self.screen.blit(self.imgPlatformLuckyAttacking, (p[0], p[1] - self.imgPlatformLuckyAttacking.get_height() + self.imgPlatformLuckySleeping.get_height() - self.cameray))
                    if p[-2] > 0:
                        self.screen.blit(self.imgFlagRight, (p[0] + self.imgPlatformLuckyAttacking.get_width() - 8, p[1] - 11 - self.cameray))
                else:
                    self.screen.blit(self.imgPlatformLuckySleeping, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeRaftcastle:
                if self.raftcastleHasFlag:
                    self.screen.blit(self.imgFlagRight, (p[0] + 50, p[1] - 13 - self.cameray))
                self.screen.blit(self.imgPlatformRaftcastle, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeBreaking:
                if not p[-1]:
                    self.screen.blit(self.imgPlatformBreaking, (p[0], p[1] - self.cameray))
                else:
                    self.screen.blit(self.imgPlatformBroken, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeTheEnd:
                self.screen.blit(self.imgPlatformTheEnd, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeWonTheGame:
                self.screen.blit(self.imgPlatformWonTheGame, (p[0], p[1] - self.cameray))
           
           

    def drawAndUpdateItems(self):
        while self.items and self.items[0][1] - self.cameray > self.sy + self.sy // 12:
            self.items.pop(0)
        for item in self.items:
            if item[2] == self.itemTypeAccelerator:
                if item[-1]:
                    imgItem = self.imgAcceleratorUsed
                else:
                    imgItem = self.imgAccelerator
            elif item[2] == self.itemTypeBeanie:
                if not item[-1]:
                    imgItem = self.imgBeanie
                else:
                    imgItem = None
            elif item[2] == self.itemTypeSnake:
                if item[-1] == -1:
                    imgItem = self.imgSnakeLeft
                elif item[-1] == 1:
                    imgItem = self.imgSnakeRight
                else:
                    imgItem = self.imgSnake
            elif item[2] == self.itemTypePrickly:
                if not item[-1]:
                    imgItem = self.imgPrickly
                else:
                    imgItem = self.imgPricklyCurled
            elif item[2] == self.itemTypeSandcastle:
                imgItem = self.imgSandcastle
                if item[-1]:
                    self.screen.blit(self.imgFlagRight, (item[0] + 4, item[1] - imgItem.get_height() + 2 - self.imgFlagRight.get_height() - self.cameray))
            elif item[2] == self.itemTypeFlag:
                if not item[-1]:
                    imgItem = self.imgFlagRight
                else:
                    imgItem = None
            elif item[2] == self.itemTypePlantSand:
                imgItem = self.imgPlantSand[item[-1]]
            elif item[2] == self.itemTypePlantGrass:
                imgItem = self.imgPlantGrass[item[-1]]
            if imgItem:
                self.screen.blit(imgItem, (item[0], item[1] - imgItem.get_height() - self.cameray))
            if not item[-1]:
                if pygame.Rect(item[0], item[1] - imgItem.get_height(), imgItem.get_width(), imgItem.get_height()).colliderect(pygame.Rect(self.playerx, self.playery, self.imgPlayerRightUp.get_width(), self.imgPlayerRightUp.get_height())):
                    if item[2] == self.itemTypeAccelerator:
                        self.jump = self.sy // 12
                        self.cameray -= self.sy // 12
                        item[-1] = True
                    elif item[2] == self.itemTypeBeanie and not self.playerWearsBeanie:
                        self.playerWearsBeanie = True
                        item[-1] = True
                    elif item[2] == self.itemTypeSnake:
                        if self.playerx + self.imgPlayerRightUp.get_width() // 2 < item[0] + self.imgPlatformGrass[0].get_width() // 2:
                            self.xmovement = -self.sx // 30
                            self.direction = 0
                            self.cameray -= self.sy // 12
                            item[-1] = -1
                        else:
                            self.xmovement = self.sx // 30
                            self.direction = 0
                            self.cameray -= self.sy // 12
                            item[-1] = 1
                    elif item[2] == self.itemTypePrickly:
                        item[-1] = True
                    elif item[2] == self.itemTypeSandcastle and self.playerCarriesFlag:
                        self.playerCarriesFlag = False
                        item[-1] = True
                        self.sandcastles += 1
                    elif item[2] == self.itemTypeFlag and not self.playerCarriesFlag:
                        self.playerCarriesFlag = True
                        item[-1] = True

    def generateInitialPlatforms(self):
        while self.platforms[-1][1] > - self.sy // 6:
            self.generateNewPlatform()

    def drawGrid(self):
        for x in range(80):
            pygame.draw.line(self.screen, (222,222,222), (x * 12, 0), (x * 12, self.sy))
            pygame.draw.line(self.screen, (222,222,222), (0, x * 12), (self.sx, x * 12))

    def waitForIt(self, its):
        run = False
        while not run:
            self.clock.tick(self.speed)
            event = pygame.event.poll()
            if event.type == KEYDOWN:
                key = pygame.key.get_pressed()
                if key[K_ESCAPE]:
                    sys.exit()
                for it in its:
                    if key[it]:
                        return it

    def showScore(self):
        line1 = self.font.render("Press ENTER to restart,", -1, (0, 0, 0))
        line2 = self.font.render("ESC to quit.", -1, (0, 0, 0))
        w = max(line1.get_width(), line2.get_width())
        h = line1.get_height() + line2.get_height()
        dx = 10
        dy = 5
        pygame.draw.rect(self.screen, (255,255,255), ((self.sx - w) // 2 - dx, (self.sy - h) // 2 - dy, w + 2 * dx, h + 2 * dy))
        pygame.draw.rect(self.screen, (0,0,0), ((self.sx - w) // 2 - dx, (self.sy - h) // 2 - dy, w + 2 * dx, h + 2 * dy), 3)
        self.screen.blit(line1, ((self.sx - line1.get_width()) // 2, self.sy // 2 - line1.get_height()))
        self.screen.blit(line2, ((self.sx - line2.get_width()) // 2, self.sy // 2))
        pygame.display.flip()
        self.waitForIt([K_RETURN])

    def run(self):
        if len(sys.argv) > 1:
            self.filename = sys.argv[1]
        else:
            self.filename = None
        self.reset()
        while True:
            self.screen.fill((255,255,255))
            self.clock.tick(self.speed)
            for event in pygame.event.get():
                if event.type == QUIT:
                    sys.exit()
                elif event.type == KEYDOWN:
                    key = pygame.key.get_pressed()
                    if key[K_ESCAPE]:
                        sys.exit()
                    elif key[K_i]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.ai = not self.ai
                    elif key[K_e]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.eternal = not self.eternal
                    elif key[K_f]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.playerCarriesFlag = not self.playerCarriesFlag
                    elif key[K_b]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.playerWearsBeanie = not self.playerWearsBeanie
                    elif key[K_SPACE]:
                        while self.waitForIt([K_SPACE, K_s]) == K_s:
                            self.saveGame()
                    elif key[K_s]:
                        self.saveGame()
                    elif key[K_a]:
                        self.showArrow = not self.showArrow
            self.drawGrid()
            self.drawPlatforms()
            self.drawAndUpdateItems()
            self.updatePlayer()
            self.updatePlatforms()
            self.screen.blit(self.font.render(str(self.score), -1, (0, 0, 0)), (self.sx // 32, self.sy // 24))
            for i in range(0, self.sandcastles):
                self.screen.blit(self.imgFlagRight, (self.sx // 32 + 10 * i, self.sy // 8))
            if self.playery - self.cameray > self.sy * 7 // 6:
                if self.eternal:
                    self.jump = self.gravity
                    self.gravity = 0
                else:
                    self.showScore()
                    self.reset()
            pygame.display.flip()

MolpyUp().run()

ETA: The highest score it managed to reach so far after multiple trials is 3059. Then, it was confused by the flood.
Last edited by balthasar_s on Wed May 09, 2018 6:38 am UTC, edited 1 time in total.
BFTF replay
Good luck, my blitzing friends!
BTTBAA:1023 # Mustard? Use the mirror! Blitzing? Also use the mirror! And here's why. # OTT facebug copy
that's a robot so it doesn't countImage
This text was autogenerated:
swimming unit detector active

User avatar
ucim
Posts: 6170
Joined: Fri Sep 28, 2012 3:23 pm UTC
Location: The One True Thread

1190: Ch*rp!

Postby ucim » Wed May 09, 2018 2:11 am UTC

So, I have a tiny model of a riverish sea in my backyard. Like in Time, there are no tides, but unlike Time, sometimes the SeamenCoffee... turns solid. We don't swim when that happens. We also have a neat that knows what it's doing, and it's right by the model sea. One of those times where SolidSeamenCoffee fell from the sky seaishly, our neat collected quite a bit of it. A seaish amount, evidenced by the fact that it preferred the sea to the neat.

There was a fierce battle between the neat and the model sea to claim the SSC, and as always the sea got what it wanted. The victory was Pyrrhic though, as part of the neat was a casualty. Apparently you can know what you're doing, and still not be able to do it. Due to the acceleration of densityfootnote, the SSC was unable to slow the neat piece (two or three cue long!) and it not only became as one with the sea, but also poked a couple of big holes where no hole should ever be poked. But the sea knows what it's doing, and did it, remaining whole, at least for the moment. Some sort of action will be required, which we are engaged in at the present moment.

Pulling the neat out of our frozen sea wasn't easy, but was accomplished in pieces; even so when the sea was once again fluid, I discovered even more neat pieces at the murky bottom, and lots of little proto-neats which clogged up the cest ne pasnot a footnote pretty instantly when I started the Spring Time ritual.

Ch*rp!

I can also act like a pretty big tree on occasion, but though I conquered this particular issue, more Time had elapsed, and the sea was getting better at hiding its secrets. It used methods that would require chemical intervention, and I got a five gallon supply which, at the appointed Time, was unable to open.

Ch*rp!

"Most people use a {something} wrench", a thing which I had not. Nor had I a wench (but even if I did, I didn't have a wabbit that could use it). So, exchanging impotence for poverty I purchased three tools, one of which ought to do the job.

Nope.

Ch*rp!

Well, the sea keeps doing what it wants, which is not what I want, and I was just about to go back to the trading post to exchange this welded-shut container for one that could be opened by mere mortals. I picked up the container (which had been warmed in the sun while sitting under a black garbage bag to keep the chemicals from bleaching clothing, trunk, or anything else) and got halfway to the carcastle with it but then thought to myself: What would The Pope do? (Maybe it was "What would First Cleric do?" I don't know, and even if I did I'm not sure I would admit which it was!)

So, I placed the container on the grass, drew on my Great Faith, placed both hands on the large screwcap, and applied The Force.

Baobabs! It turned a little! Another application and it turned more! So, to make a long story its proper length (you've read this far!) I got the thing opened, so I closed it back up (gently) so that it could be applied at the proper Time, and abandoned the pending carcastle voyage.

And lo, when the sun had disappeared below the disc of the earth, I opened the container once again, easily, opened the vent, and added its contents to the sea.

So, now I follow the First Commandment.

FebrionAccording to Youtube, there's no such thing as gravity. It's density and buoyancy. And I always thought it was that the earth sucked.
not a footnotecest ne pas une pipe

Jose
Order of the Sillies, Honoris Causam - bestowed by charlie_grumbles on NP 859 * OTTscar winner: Wordsmith - bestowed by yappobiscuts and the OTT on NP 1832 * Ecclesiastical Calendar of the Order of the Holy Contradiction * Please help addams if you can. She needs all of us.

User avatar
Eternal Density
Posts: 5544
Joined: Thu Oct 02, 2008 12:37 am UTC
Contact:

Re: 1190: "Time" 800 Pre 1990

Postby Eternal Density » Wed May 09, 2018 7:48 am UTC

Baobabs, there's now 800 othercomics since the OTC began!
This deserves my OTTer Seal of Approval:
Image
Redundant spoiler is redandant:
Spoiler:
otterseal.jpg
approval

Y U NO BELIEVE etc etc


Also I missed some
Interesting pope decrees
so here's a haiku
Play the game of Time! castle.chirpingmustard.com Hotdog Vending Supplier But what is this?
In the Marvel vs. DC film-making war, we're all winners.

User avatar
balthasar_s
Posts: 2216
Joined: Mon Nov 28, 2011 3:20 pm UTC
Location: secret base on the Moon
Contact:

Re: 1190: "Time"; MolpyUpdate!

Postby balthasar_s » Wed May 09, 2018 12:40 pm UTC

balthasar_s wrote:
Sustainabilizer wrote:MolpyUpdate: Image

I made a very simple AI for the game.
I improved the AI.
Now it's much better at deciding on which platform to jump next.

I had to change a bit the code related to platforms and items so that the AI knows what kind of item is placed on a platform.

ctrl + I enables the AI
ctrl + D enables some debug information so that you can see what the AI thinks about the world.

I also added another game mode, something between normal and "eternal" mode.
Like in "eternal" mode you can bounce off the bottom.
But not for free.
It will cost you one of the flags which you get for flagging a sandcastle.
If you don't have any you lose like in normal mode.

activate this mode by ctrl + F
With this setting I'm able to reach the 3094. Otherwise not.

Code: Select all

# Molpy Up!
#
# Based on Max00355's version of DoodleJump, <https://github.com/Max00355/DoodleJump>
# Copyright (C) 2015 by Frankie Primerano,
# written in 120 minutes, see <https://www.reddit.com/r/gamedev/comments/3umhuq/doodle_jump_created_in_120_minutes_with_python/>.
#
# Copyright (C) 2018 by Peter Gerwinski <http://www.peter.gerwinski.de>,
# OTTified in about 120 minutes.
#
# edited to add arrow, AI, and a flag save mode - balthasar_s
#
# This program is Free Software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GNU GPL), version 3,
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program, see the file LICENSE.  If not, see
# <http://www.gnu.org/licenses/>.
#
# The player figure "Molpy" is
# Copyright (C) 2013 by BlitzGirl, see user "BlitzGirl" at <http://forums.xkcd.com>,
# released under conditions compatible with both the GNU GPL v3 and the
# CC BY-NC 2.5 license (see below).
#
# All other artwork used by this program is based on xkcd 1190 "Time",
# Copyright (C) 2013 by Randall Munroe, see <http://xkcd.com/1190>,
# released under the Creative Commonns Attribution-NonCommercial Generic License,
# version 2.5 (CC BY-NC 2.5), see <https://creativecommons.org/licenses/by-nc/2.5/>.
#
# In particular, the contents of the directory "assets"
# is NOT subject to the GNU GPL.

import pygame
from pygame.locals import *
import sys
import datetime
import random
import math

class MolpyUp:

    platformTypeSand = 0
    platformTypeGrass = 1
    platformTypeNormal = platformTypeGrass
    platformTypeGrapevine = 2
    platformTypeAfterLucky = 3
    platformTypeCastle = 4
    platformTypeWater = 5
    platformTypeRaftcastle = 6
    platformTypeFloating = platformTypeRaftcastle
    platformTypeLucky = 7
    platformTypeBreaking = 8
    platformTypeTheEnd = 9
    platformTypeWonTheGame = 10

    itemTypeAccelerator = 0
    itemTypeBeanie = 1
    itemTypeSnake = 2
    itemTypePrickly = 3
    itemTypeSandcastle = 4
    itemTypeFlag = 5
    itemTypePlantSand = 6
    itemTypePlantGrass = 7

    scoreSnake = 1738
    scorePrickly = 2015
    scoreGrass = 2193
    scoreAfterLucky = 2315
    scoreCastle = 2825
    scoreLucky = 2976
    scoreRaftcastle = 3031
    scoreWater = 3043
    scoreTheEnd = 3089
    scoreEpilogue = 3094

    def __init__(self):
        self.sx = 553
        self.sy = 395
        self.extrax = self.sx // 16
        self.screen = pygame.display.set_mode((self.sx, self.sy))
        pygame.font.init()
        self.font = pygame.font.SysFont("xkcd,sans", 25)
        self.clock = pygame.time.Clock()
        self.xmovementmax = 10
        self.eternal = False
        self.eternalFlag = False
        self.ai = False
        self.aiDebag = False
        self.imgPlatformSand = [ pygame.image.load("assets/platformSand1.png").convert_alpha(),
                                 pygame.image.load("assets/platformSand2.png").convert_alpha(),
                                 pygame.image.load("assets/platformSand3.png").convert_alpha(),
                                 pygame.image.load("assets/platformSand4.png").convert_alpha() ]
        self.imgPlatformGrass = [ pygame.image.load("assets/platformGrass1.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass2.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass3.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass1f.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass2f.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass3f.png").convert_alpha() ]
        self.imgPlatformWater = [ pygame.image.load("assets/platformWater1.png").convert_alpha(),
                                  pygame.image.load("assets/platformWater2.png").convert_alpha(),
                                  pygame.image.load("assets/platformWater1f.png").convert_alpha(),
                                  pygame.image.load("assets/platformWater2f.png").convert_alpha() ]
        self.imgPlatformAfterLucky = pygame.image.load("assets/platformAfterLucky.png").convert_alpha()
        self.imgPlatformCastle = pygame.image.load("assets/platformCastle.png").convert_alpha()
        self.imgPlatformLuckySleeping = pygame.image.load("assets/platformLuckySleeping.png").convert_alpha()
        self.imgPlatformLuckyAttacking = pygame.image.load("assets/platformLuckyAttacking.png").convert_alpha()
        self.imgPlatformRaftcastle = pygame.image.load("assets/platformRaftcastle.png").convert_alpha()
        self.imgPlatformGrapevine = pygame.image.load("assets/platformGrapevine.png").convert_alpha()
        self.imgPlatformBreaking = pygame.image.load("assets/platformBreaking.png").convert_alpha()
        self.imgPlatformBroken = pygame.image.load("assets/platformBroken.png").convert_alpha()
        self.imgPlatformTheEnd = pygame.image.load("assets/platformTheEnd.png").convert_alpha()
        self.imgPlatformWonTheGame = pygame.image.load("assets/platformWonTheGame.png").convert_alpha()
        self.imgPlayerRightUp = pygame.image.load("assets/playerRightUp.png").convert_alpha()
        self.imgPlayerRightDown = pygame.image.load("assets/playerRightDown.png").convert_alpha()
        self.imgPlayerLeftUp = pygame.image.load("assets/playerLeftUp.png").convert_alpha()
        self.imgPlayerLeftDown = pygame.image.load("assets/playerLeftDown.png").convert_alpha()
        self.imgPlayerRightUpBeanie = pygame.image.load("assets/playerRightUpBeanie.png").convert_alpha()
        self.imgPlayerRightDownBeanie = pygame.image.load("assets/playerRightDownBeanie.png").convert_alpha()
        self.imgPlayerLeftUpBeanie = pygame.image.load("assets/playerLeftUpBeanie.png").convert_alpha()
        self.imgPlayerLeftDownBeanie = pygame.image.load("assets/playerLeftDownBeanie.png").convert_alpha()
        self.imgAccelerator = pygame.image.load("assets/accelerator.png").convert_alpha()
        self.imgAcceleratorUsed = pygame.image.load("assets/acceleratorUsed.png").convert_alpha()
        self.imgBeanie = pygame.image.load("assets/beanie.png").convert_alpha()
        self.imgSnake = pygame.image.load("assets/snake.png").convert_alpha()
        self.imgSnakeLeft = pygame.image.load("assets/snakeLeft.png").convert_alpha()
        self.imgSnakeRight = pygame.image.load("assets/snakeRight.png").convert_alpha()
        self.imgPrickly = pygame.image.load("assets/prickly.png").convert_alpha()
        self.imgPricklyCurled = pygame.image.load("assets/pricklyCurled.png").convert_alpha()
        self.imgSandcastle = pygame.image.load("assets/sandcastle.png").convert_alpha()
        self.imgFlagLeft = pygame.image.load("assets/flagLeft.png").convert_alpha()
        self.imgFlagLeftDown = pygame.image.load("assets/flagLeftDown.png").convert_alpha()
        self.imgFlagRight = pygame.image.load("assets/flagRight.png").convert_alpha()
        self.imgFlagRightDown = pygame.image.load("assets/flagRightDown.png").convert_alpha()
        self.imgPlantSand = [ pygame.image.load("assets/plantSand1.png").convert_alpha(),
                              pygame.image.load("assets/plantSand2.png").convert_alpha(),
                              pygame.image.load("assets/plantSand3.png").convert_alpha(),
                              pygame.image.load("assets/plantSand4.png").convert_alpha(),
                              pygame.image.load("assets/plantSand5.png").convert_alpha() ]
        self.imgPlantGrass = [ pygame.image.load("assets/plantGrass1.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass2.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass3.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass4.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass5.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass6.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass7.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass8.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass9.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass10.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass11.png").convert_alpha() ]
        self.imgMolpArrow = pygame.image.load("assets/molpArrow.png").convert_alpha()

    def reset(self):
        self.cameray = 0
        self.score = 0
        self.sandcastles = 0
        self.speed = 30
        self.showArrow = True
        self.playerx = self.sx // 2
        self.playery = self.sy * 3 // 4
        self.direction = 0
        self.jump = 0
        self.gravity = 0
        self.xmovement = 0
        self.playerWearsBeanie = False
        self.playerCarriesFlag = False
        self.hadSnake = False
        self.hadPrickly = False
        self.hadAfterLucky = False
        self.hadCastle = False
        self.hadLucky = False
        self.hadTheEnd = False
        self.raftcastleHasFlag = False
        self.platforms = [[self.playerx, self.playery + self.sy // 6, self.platformTypeSand, 0, 0, -1, False, self.imgPlatformSand[0].get_width()]]
        self.generateInitialPlatforms()
        self.items = []
        self.aiNextPlatformOk = False
        self.aiNextPlatform=[self.playerx,self.playery]
        if self.filename:
            self.restoreGame (self.filename)

    def saveGame(self):
        self.filename = datetime.datetime.now().strftime("%Y%m%d-%H%M%S.molpyup")
        with open(self.filename, "w") as file:
            file.write("MolpyUp!\n")
            file.write("cameray: " + str(self.cameray) + "\n")
            file.write("score: " + str(self.score) + "\n")
            file.write("sandcastles: " + str(self.sandcastles) + "\n")
            file.write("speed: " + str(self.speed) + "\n")
            file.write("showArrow: " + str(self.showArrow) + "\n")
            file.write("playerx: " + str(self.playerx) + "\n")
            file.write("playery: " + str(self.playery) + "\n")
            file.write("direction: " + str(self.direction) + "\n")
            file.write("jump: " + str(self.jump) + "\n")
            file.write("gravity: " + str(self.gravity) + "\n")
            file.write("xmovement: " + str(self.xmovement) + "\n")
            file.write("playerWearsBeanie: " + str(self.playerWearsBeanie) + "\n")
            file.write("playerCarriesFlag: " + str(self.playerCarriesFlag) + "\n")
            file.write("hadSnake: " + str(self.hadSnake) + "\n")
            file.write("hadPrickly: " + str(self.hadPrickly) + "\n")
            file.write("hadAfterLucky: " + str(self.hadAfterLucky) + "\n")
            file.write("hadCastle: " + str(self.hadCastle) + "\n")
            file.write("hadLucky: " + str(self.hadLucky) + "\n")
            file.write("hadTheEnd: " + str(self.hadTheEnd) + "\n")
            file.write("raftcastleHasFlag: " + str(self.raftcastleHasFlag) + "\n")
            file.write("eternal: " + str(self.eternal) + "\n")
            file.write("eternalFlag: " + str(self.eternalFlag) + "\n")
            file.write("platforms: " + str(self.platforms) + "\n")
            file.write("items: " + str(self.items) + "\n")

    def readVariable(self, line, name, var):
        if line.startswith(name + ": "):
            return eval (line[len(name) + 2:])
        else:
            return var

    def restoreGame(self, filename):
        try:
            with open(filename, "r") as file:
                lines = file.readlines()
            for line in lines:
                self.cameray = self.readVariable(line, "cameray", self.cameray)
                self.score = self.readVariable(line, "score", self.score)
                self.sandcastles = self.readVariable(line, "sandcastles", self.sandcastles)
                self.speed = self.readVariable(line, "speed", self.speed)
                self.showArrow = self.readVariable(line, "showArrow", self.showArrow)
                self.playerx = self.readVariable(line, "playerx", self.playerx)
                self.playery = self.readVariable(line, "playery", self.playery)
                self.direction = self.readVariable(line, "direction", self.direction)
                self.jump = self.readVariable(line, "jump", self.jump)
                self.gravity = self.readVariable(line, "gravity", self.gravity)
                self.xmovement = self.readVariable(line, "xmovement", self.xmovement)
                self.playerWearsBeanie = self.readVariable(line, "playerWearsBeanie", self.playerWearsBeanie)
                self.playerCarriesFlag = self.readVariable(line, "playerCarriesFlag", self.playerCarriesFlag)
                self.hadSnake = self.readVariable(line, "hadSnake", self.hadSnake)
                self.hadPrickly = self.readVariable(line, "hadPrickly", self.hadPrickly)
                self.hadAfterLucky = self.readVariable(line, "hadAfterLucky", self.hadAfterLucky)
                self.hadCastle = self.readVariable(line, "hadCastle", self.hadCastle)
                self.hadLucky = self.readVariable(line, "hadLucky", self.hadLucky)
                self.hadTheEnd = self.readVariable(line, "hadTheEnd", self.hadTheEnd)
                self.raftcastleHasFlag = self.readVariable(line, "raftcastleHasFlag", self.raftcastleHasFlag)
                self.platforms = self.readVariable(line, "platforms", self.platforms)
                self.items = self.readVariable(line, "items", self.items)
            return True
        except FileNotFoundError:
            return False
   
    def findNextPlatform(self):
        # bestDistance=float("Inf")
        # for p in self.platforms:
            # if not self.jump:
                # distance = abs(p[0]-self.playerx) * 0.5 - p[1]
            # else:
                # distance = abs(p[0]-self.playerx) * 0.5 + abs(p[1]-self.playery)
                # if p[1]>self.playery:
                    # distance += 900
            # if p[2] > self.platformTypeNormal and p[2] <= self.platformTypeFloating:
                # distance += 290
            # if p[2] == self.platformTypeBreaking:
                # distance = float("Inf")
            # p[6]=distance
            # if distance<bestDistance:
                # bestDistance = distance
                # self.aiNextPlatform=p
                # self.aiNextPlatformOk = True
       
        bestPlatformScore = float("-Inf")
        actualY=self.playery+self.imgPlayerRightUp.get_height()
        actualX=self.playerx+self.imgPlayerRightUp.get_width()//2
        self.aiNextPlatform = self.platforms[0]
        if self.jump > 0:
            maxY = actualY - (self.jump * (self.jump+1) // 2)
            framesUp = self.jump
        else:
            maxY = actualY
            framesUp = 0
               
        for p in self.platforms:
            platformX = p[0] + p[7] //2
            platformY = p[1]
            platformScore = 0
           
            if (platformY < maxY) or (p[2] == self.platformTypeBreaking):
                platformScore = float("-Inf")
                p[6]=platformScore
                continue
           
            distY = actualY - platformY
            distDown = platformY - maxY
            distX = abs(platformX-actualX)
           
            framesDown = math.floor(math.sqrt(self.gravity * self.gravity + 2 * distDown) - self.gravity)
            if self.gravity > 0:
                framesDown = int(math.floor(math.sqrt(self.gravity * self.gravity + 2 * distDown) - self.gravity))
            else:
                framesDown = int(math.floor(math.sqrt(2*distDown)))
           
            speedX=9;
           
            if p[2] > self.platformTypeNormal and p[2] <= self.platformTypeFloating:
                if (p[4] and platformX>actualX) or (not p[4] and platformX<actualX):
                    speedX -= self.extrax // 10
                else:
                    speedX += self.extrax // 10
           
            platformScore += framesUp + framesDown - distX//speedX
           
            if platformX-actualX>2*self.xmovementmax and self.xmovement < 0:
                platformScore -= (self.xmovementmax-self.xmovement)*(self.xmovementmax-self.xmovement)//4
            elif actualX-platformX>2*self.xmovementmax and self.xmovement > 0:
                platformScore -= (-self.xmovementmax-self.xmovement)*(-self.xmovementmax-self.xmovement)//4
           
            if platformScore < 0:
                platformScore = float("-Inf")
            platformScore *=4
           
            if distY>16:
                platformScore += distY + distX//2
            else:
                platformScore += 2*distY - 200 + distX
           
            if p[2] > self.platformTypeNormal and p[2] <= self.platformTypeFloating:
                platformScore -= 100
            elif p[2] == self.platformTypeLucky:
                platformScore -= 150
           
            if p[5] == self.itemTypeSnake:
                platformScore -= 150
            elif p[5] == self.itemTypeFlag and not self.playerCarriesFlag:
                platformScore += 70
            elif p[5] == self.itemTypeSandcastle and self.playerCarriesFlag:
                platformScore += 70
            elif p[5] == self.itemTypeBeanie and not self.playerWearsBeanie:
                platformScore += 50
           
            p[6] = platformScore
           
            if platformScore > bestPlatformScore:
                bestPlatformScore = platformScore
                self.aiNextPlatform = p
                self.aiNextPlatformOk = True
               
           
           
       
               
    def updatePlayer(self):
        if ((not self.jump) and (self.playery > self.aiNextPlatform[1])) or (self.aiNextPlatform[1] - self.cameray > self.sy):
            self.aiNextPlatformOk = False
       
        if not self.aiNextPlatformOk and self.ai:
            self.findNextPlatform()
   
        if not self.jump:
            self.playery += self.gravity
            self.gravity += 1
        else:
            self.playery -= self.jump
            self.jump -= 1
        key = pygame.key.get_pressed()
       
        if key[K_RIGHT]:
            if self.xmovement < self.xmovementmax:
                self.xmovement += 1
            self.direction = 0
        elif key[K_LEFT]:
            if self.xmovement > -self.xmovementmax:
                self.xmovement -= 1
            self.direction = 1
        elif key[K_PLUS] or key[K_KP_PLUS]:
            if pygame.key.get_mods() & KMOD_CTRL:
                self.score += 10
            else:
                self.speed += 1
                self.screen.blit(self.font.render("Speed: " + str(self.speed), -1, (0, 0, 0)), (self.sx // 32, self.sy - self.sy // 12))
        elif key[K_MINUS] or key[K_KP_MINUS]:
            if pygame.key.get_mods() & KMOD_CTRL:
                self.score -= 10
            else:
                self.speed -= 1
                self.screen.blit(self.font.render("Speed: " + str(self.speed), -1, (0, 0, 0)), (self.sx // 32, self.sy - self.sy // 12))
        else:
            if self.ai:
                actualX=self.playerx+self.imgPlayerRightUp.get_width()//2
                platformX = self.aiNextPlatform[0] + self.aiNextPlatform[7] //2
                if actualX<platformX -2.5*self.xmovement:
                    if self.xmovement < self.xmovementmax:
                        self.xmovement += 1
                    self.direction = 0
                elif actualX>platformX -2.5*self.xmovement:
                    if self.xmovement > -self.xmovementmax:
                        self.xmovement -= 1
                    self.direction = 1
                else:
                    if self.xmovement > 0:
                        self.xmovement -= 1
                    elif self.xmovement < 0:
                        self.xmovement += 1
            else:
                if self.xmovement > 0:
                    self.xmovement -= 1
                elif self.xmovement < 0:
                    self.xmovement += 1
       
        if self.playerx > self.sx + self.extrax:
            self.playerx = -self.extrax
            self.aiNextPlatformOk = False
        elif self.playerx < -self.extrax:
            self.playerx = self.sx + self.extrax
            self.aiNextPlatformOk = False
        self.playerx += self.xmovement
        if self.playery - self.cameray <= self.sy // 3:
            self.cameray -= self.sy // 60

        if (self.playery - self.cameray + self.imgPlayerRightUp.get_height()) < 0:
            if self.showArrow:
                self.screen.blit(self.imgMolpArrow, (self.playerx, 2))
        else:
            if not self.direction:
                if self.jump:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerRightDownBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerRightDown, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagLeft, (self.playerx + 24, self.playery - 10 - self.cameray))
                else:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerRightUpBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerRightUp, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagLeftDown, (self.playerx + 22, self.playery - 10 - self.cameray))
            else:
                if self.jump:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerLeftDownBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerLeftDown, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagRight, (self.playerx + 13, self.playery - 10 - self.cameray))
                else:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerLeftUpBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerLeftUp, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagRightDown, (self.playerx + 11, self.playery - 10 - self.cameray))
       
     

    def choosePlatformType(self):
        if self.score >= self.scoreTheEnd:
            return self.platformTypeTheEnd
        platformType = random.randint(0, 999)
        if self.score > self.scoreWater:
            if platformType < 900:
                return self.platformTypeWater
            else:
                return self.platformTypeRaftcastle
        elif platformType < 800:
            if platformType < 1000 * self.score // self.scoreGrass:
                if self.score > self.scoreAfterLucky and not self.hadAfterLucky:
                    self.hadAfterLucky = True
                    return self.platformTypeAfterLucky
                elif self.score > self.scoreCastle and not self.hadCastle:
                    self.hadCastle = True
                    return self.platformTypeCastle
                elif self.score > self.scoreLucky and not self.hadLucky:
                    self.hadLucky = True
                    return self.platformTypeLucky
                else:
                    return self.platformTypeGrass
            else:
                return self.platformTypeSand
        elif platformType < 900:
            return self.platformTypeGrapevine
        else:
            return self.platformTypeBreaking

    def generateNewPlatform(self):
        platform = False
        platform2 = False
        platformType = self.choosePlatformType()
        if platformType == self.platformTypeTheEnd:
            if not self.hadTheEnd:
                platform2=[self.sx // 2 - self.imgPlatformTheEnd.get_width() // 2, self.platforms[-1][1] - self.sy // 4, self.platformTypeTheEnd, False, False, -1, False, self.imgPlatformTheEnd.get_width()]
                platform=[self.sx // 2 - self.imgPlatformWonTheGame.get_width() // 2, platform2[1] - self.sy * 2 // 3, self.platformTypeWonTheGame, False, False, -1, False, self.imgPlatformWonTheGame.get_width()]
                self.hadTheEnd = True
        elif platformType == self.platformTypeWater or platformType == self.platformTypeRaftcastle:
            platform=[random.randint(0, self.sx * 7 // 8), self.platforms[-1][1] - self.sy // 8, platformType, False, False, -1, False, self.imgPlatformSand[0].get_width()]
        elif platformType == self.platformTypeLucky:
            platform=[0, self.platforms[-1][1] - self.sy // 12, platformType, False, False, -1, False, self.imgPlatformSand[0].get_width()]
        else:
            platform=[random.randint(0, self.sx * 7 // 8), self.platforms[-1][1] - self.sy // 12, platformType, False, False, -1, False, self.imgPlatformSand[0].get_width()]
        if platformType <= self.platformTypeNormal:
            if platformType == self.platformTypeSand:
                platform[4] = random.randint(0, len(self.imgPlatformSand) - 1)
            elif platformType == self.platformTypeGrass:
                platform[4] = random.randint(0, len(self.imgPlatformGrass) - 1)
            else:
                platform[4] = random.randint(0, len(self.imgPlatformWater) - 1)
            x = platform[0]
            y = platform[1]
            if platformType == self.platformTypeGrass and self.score > self.scoreSnake and not self.hadSnake:
                platform[5]=self.itemTypeSnake
                self.items.append([x - 10, y + 9, self.itemTypeSnake, False])
                self.hadSnake = True
            elif platformType == self.platformTypeGrass and self.score > self.scorePrickly and not self.hadPrickly:
                platform[5]=self.itemTypePrickly
                self.items.append([x + self.imgPlatformSand[0].get_width() // 3, y + 8, self.itemTypePrickly, False])
                self.hadPrickly = True
            elif self.score > 0:
                check = random.randint(0, 999)
                if check > 800:
                    xx = x + random.randint(0, self.imgPlatformSand[0].get_width() - 40)
                    itemType = random.randint(0,999)
                    if itemType < 50:
                        platform[5]=self.itemTypeBeanie
                        self.items.append([xx, y + 7, self.itemTypeBeanie, False])
                    elif itemType < 150 and platformType == self.platformTypeSand:
                        platform[5]=self.itemTypeSandcastle
                        self.items.append([xx, y + 7, self.itemTypeSandcastle, False])
                    elif itemType < 350 and platformType == self.platformTypeSand:
                        platform[5]=self.itemTypeFlag
                        self.items.append([xx, y + 7, self.itemTypeFlag, False])
                    elif itemType < 950 and platformType == self.platformTypeSand:
                        platform[5]=self.itemTypePlantSand
                        self.items.append([xx, y + 8, self.itemTypePlantSand, itemType % len(self.imgPlantSand)])
                    elif itemType < 100 and platformType == self.platformTypeGrass:
                        platform[5]=self.itemTypeFlag
                        self.items.append([xx, y + 6, self.itemTypeFlag, False])
                    elif itemType < 700 and platformType == self.platformTypeGrass:
                        platform[5]=self.itemTypePlantGrass
                        self.items.append([xx, y + 10, self.itemTypePlantGrass, itemType % len(self.imgPlantGrass)])
                    elif itemType < 850 and platformType == self.platformTypeGrass and self.score > self.scorePrickly:
                        platform[5]=self.itemTypePrickly
                        self.items.append([xx, y + 8, self.itemTypePrickly, False])
                    elif itemType < 950 and platformType == self.platformTypeGrass and self.score > self.scoreSnake:
                        platform[5]=self.itemTypeSnake
                        self.items.append([x - 10, y + 9, self.itemTypeSnake, False])
                    else:
                        platform[5]=self.itemTypeAccelerator
                        self.items.append([xx - 5, y + 10, self.itemTypeAccelerator, False])
        if platform2 != False:
            self.platforms.append(platform2)
        if platform != False:
            self.platforms.append(platform)

    def updatePlatforms(self):
        while self.platforms[0][1] - self.cameray > self.sy + self.sy // 12:
            self.generateNewPlatform()
            self.platforms.pop(0)
            if self.score < self.scoreEpilogue:
                self.score += 1
        for p in self.platforms:
            if p[2] == self.platformTypeGrapevine:
                img = self.imgPlatformGrapevine
            elif p[2] == self.platformTypeAfterLucky:
                img = self.imgPlatformAfterLucky
            elif p[2] == self.platformTypeCastle:
                img = self.imgPlatformCastle
            elif p[2] == self.platformTypeRaftcastle:
                img = self.imgPlatformRaftcastle
            else:
                # all have same size
                img = self.imgPlatformSand[0]
            rect = pygame.Rect(p[0], p[1], img.get_width(), self.imgPlatformSand[0].get_height())
            player = pygame.Rect(self.playerx + 15, self.playery, self.imgPlayerRightUp.get_width() - 30, self.imgPlayerRightUp.get_height())
            if rect.colliderect(player) and self.gravity and self.playery < (p[1] - self.cameray):
                if p[2] == self.platformTypeBreaking:
                    p[4] = True
                else:
                    self.jump = self.sy // 20
                    self.aiNextPlatformOk = False
                    self.gravity = 0
                    if p[2] == self.platformTypeLucky and not (self.playerWearsBeanie and self.playerCarriesFlag) and p[3] <= 0:
                        self.aiNextPlatformOk = False
                        self.xmovement = self.sx // 20
                        self.direction = 0
                        self.cameray -= self.sy // 12
                        p[3] = -1
                    elif (p[2] == self.platformTypeAfterLucky or p[2] == self.platformTypeCastle or p[2] == self.platformTypeLucky) and self.playerCarriesFlag and not p[3]:
                        self.playerCarriesFlag = False
                        p[3] = True
                        self.sandcastles += 1
                    elif p[2] == self.platformTypeRaftcastle and self.playerCarriesFlag and not self.raftcastleHasFlag:
                        self.playerCarriesFlag = False
                        self.raftcastleHasFlag = True
                        self.sandcastles += 1
            if p[2] > self.platformTypeNormal and p[2] <= self.platformTypeFloating:
                if p[4]:
                    if p[2] == self.platformTypeAfterLucky:
                        img = self.imgPlatformAfterLucky
                    elif p[2] == self.platformTypeCastle:
                        img = self.imgPlatformCastle
                    else:
                        img = self.imgPlatformGrapevine
                    p[0] += self.extrax // 10
                    if p[0] + img.get_width() > self.sx + self.extrax:
                        p[4] = False
                else:
                    p[0] -= self.extrax // 10
                    if p[0] <= 0:
                        p[4] = True

   
           
   
    def drawPlatforms(self):
        for p in self.platforms:
            if p[2] == self.platformTypeSand:
                self.screen.blit(self.imgPlatformSand[p[4]], (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeGrass:
                self.screen.blit(self.imgPlatformGrass[p[4]], (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeWater:
                self.screen.blit(self.imgPlatformWater[p[4]], (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeGrapevine:
                self.screen.blit(self.imgPlatformGrapevine, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeAfterLucky:
                if p[3]:
                    self.screen.blit(self.imgFlagRight, (p[0] + 47, p[1] - 12 - self.cameray))
                self.screen.blit(self.imgPlatformAfterLucky, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeCastle:
                if p[3]:
                    self.screen.blit(self.imgFlagRight, (p[0] + self.imgPlatformCastle.get_width() - 16, p[1] - 4 - self.cameray))
                self.screen.blit(self.imgPlatformCastle, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeLucky:
                if p[3]:
                    self.screen.blit(self.imgPlatformLuckyAttacking, (p[0], p[1] - self.imgPlatformLuckyAttacking.get_height() + self.imgPlatformLuckySleeping.get_height() - self.cameray))
                    if p[3] > 0:
                        self.screen.blit(self.imgFlagRight, (p[0] + self.imgPlatformLuckyAttacking.get_width() - 8, p[1] - 11 - self.cameray))
                else:
                    self.screen.blit(self.imgPlatformLuckySleeping, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeRaftcastle:
                if self.raftcastleHasFlag:
                    self.screen.blit(self.imgFlagRight, (p[0] + 50, p[1] - 13 - self.cameray))
                self.screen.blit(self.imgPlatformRaftcastle, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeBreaking:
                if not p[4]:
                    self.screen.blit(self.imgPlatformBreaking, (p[0], p[1] - self.cameray))
                else:
                    self.screen.blit(self.imgPlatformBroken, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeTheEnd:
                self.screen.blit(self.imgPlatformTheEnd, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeWonTheGame:
                self.screen.blit(self.imgPlatformWonTheGame, (p[0], p[1] - self.cameray))
            # print (str(p))
            if self.aiDebag:
                self.screen.blit(self.font.render(str(p[2])+" "+str(p[5])+" "+str(p[6]), -1, (0, 0x57, 0xaf)), (p[0], p[1] - self.cameray + 16))
        if self.aiDebag:
            self.screen.blit(self.imgMolpArrow, (self.aiNextPlatform[0] + (self.imgPlatformSand[0].get_width()-self.imgMolpArrow.get_width())//2, self.aiNextPlatform[1] - self.cameray + 16))
           
           

    def drawAndUpdateItems(self):
        while self.items and self.items[0][1] - self.cameray > self.sy + self.sy // 12:
            self.items.pop(0)
        for item in self.items:
            if item[2] == self.itemTypeAccelerator:
                if item[-1]:
                    imgItem = self.imgAcceleratorUsed
                else:
                    imgItem = self.imgAccelerator
            elif item[2] == self.itemTypeBeanie:
                if not item[-1]:
                    imgItem = self.imgBeanie
                else:
                    imgItem = None
            elif item[2] == self.itemTypeSnake:
                if item[-1] == -1:
                    imgItem = self.imgSnakeLeft
                elif item[-1] == 1:
                    imgItem = self.imgSnakeRight
                else:
                    imgItem = self.imgSnake
            elif item[2] == self.itemTypePrickly:
                if not item[-1]:
                    imgItem = self.imgPrickly
                else:
                    imgItem = self.imgPricklyCurled
            elif item[2] == self.itemTypeSandcastle:
                imgItem = self.imgSandcastle
                if item[-1]:
                    self.screen.blit(self.imgFlagRight, (item[0] + 4, item[1] - imgItem.get_height() + 2 - self.imgFlagRight.get_height() - self.cameray))
            elif item[2] == self.itemTypeFlag:
                if not item[-1]:
                    imgItem = self.imgFlagRight
                else:
                    imgItem = None
            elif item[2] == self.itemTypePlantSand:
                imgItem = self.imgPlantSand[item[-1]]
            elif item[2] == self.itemTypePlantGrass:
                imgItem = self.imgPlantGrass[item[-1]]
            if imgItem:
                self.screen.blit(imgItem, (item[0], item[1] - imgItem.get_height() - self.cameray))
            if not item[-1]:
                if pygame.Rect(item[0], item[1] - imgItem.get_height(), imgItem.get_width(), imgItem.get_height()).colliderect(pygame.Rect(self.playerx, self.playery, self.imgPlayerRightUp.get_width(), self.imgPlayerRightUp.get_height())):
                    if item[2] == self.itemTypeAccelerator:
                        self.aiNextPlatformOk = False
                        self.jump = self.sy // 12
                        self.cameray -= self.sy // 12
                        item[-1] = True
                    elif item[2] == self.itemTypeBeanie and not self.playerWearsBeanie:
                        self.playerWearsBeanie = True
                        item[-1] = True
                    elif item[2] == self.itemTypeSnake:
                        self.aiNextPlatformOk = False
                        if self.playerx + self.imgPlayerRightUp.get_width() // 2 < item[0] + self.imgPlatformGrass[0].get_width() // 2:
                            self.xmovement = -self.sx // 30
                            self.direction = 0
                            self.cameray -= self.sy // 12
                            item[-1] = -1
                        else:
                            self.xmovement = self.sx // 30
                            self.direction = 0
                            self.cameray -= self.sy // 12
                            item[-1] = 1
                    elif item[2] == self.itemTypePrickly:
                        item[-1] = True
                    elif item[2] == self.itemTypeSandcastle and self.playerCarriesFlag:
                        self.playerCarriesFlag = False
                        item[-1] = True
                        self.sandcastles += 1
                    elif item[2] == self.itemTypeFlag and not self.playerCarriesFlag:
                        self.playerCarriesFlag = True
                        item[-1] = True

    def generateInitialPlatforms(self):
        while self.platforms[-1][1] > - self.sy // 6:
            self.generateNewPlatform()

    def drawGrid(self):
        for x in range(80):
            pygame.draw.line(self.screen, (222,222,222), (x * 12, 0), (x * 12, self.sy))
            pygame.draw.line(self.screen, (222,222,222), (0, x * 12), (self.sx, x * 12))

    def waitForIt(self, its):
        run = False
        while not run:
            self.clock.tick(self.speed)
            event = pygame.event.poll()
            if event.type == KEYDOWN:
                key = pygame.key.get_pressed()
                if key[K_ESCAPE]:
                    sys.exit()
                for it in its:
                    if key[it]:
                        return it

    def showScore(self):
        line1 = self.font.render("Press ENTER to restart,", -1, (0, 0, 0))
        line2 = self.font.render("ESC to quit.", -1, (0, 0, 0))
        w = max(line1.get_width(), line2.get_width())
        h = line1.get_height() + line2.get_height()
        dx = 10
        dy = 5
        pygame.draw.rect(self.screen, (255,255,255), ((self.sx - w) // 2 - dx, (self.sy - h) // 2 - dy, w + 2 * dx, h + 2 * dy))
        pygame.draw.rect(self.screen, (0,0,0), ((self.sx - w) // 2 - dx, (self.sy - h) // 2 - dy, w + 2 * dx, h + 2 * dy), 3)
        self.screen.blit(line1, ((self.sx - line1.get_width()) // 2, self.sy // 2 - line1.get_height()))
        self.screen.blit(line2, ((self.sx - line2.get_width()) // 2, self.sy // 2))
        pygame.display.flip()
        self.waitForIt([K_RETURN])

    def run(self):
        if len(sys.argv) > 1:
            self.filename = sys.argv[1]
        else:
            self.filename = None
        self.reset()
        while True:
            self.screen.fill((255,255,255))
            self.clock.tick(self.speed)
            for event in pygame.event.get():
                if event.type == QUIT:
                    sys.exit()
                elif event.type == KEYDOWN:
                    key = pygame.key.get_pressed()
                    if key[K_ESCAPE]:
                        sys.exit()
                    elif key[K_i]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.ai = not self.ai
                            self.aiNextPlatformOk = False
                    elif key[K_d]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.aiDebag = not self.aiDebag
                    elif key[K_e]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.eternal = not self.eternal
                            self.eternalFlag = False
                    elif key[K_f]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.eternalFlag = not self.eternalFlag
                            self.eternal = False
                    elif key[K_f]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.playerCarriesFlag = not self.playerCarriesFlag
                    elif key[K_b]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.playerWearsBeanie = not self.playerWearsBeanie
                    elif key[K_SPACE]:
                        while self.waitForIt([K_SPACE, K_s]) == K_s:
                            self.saveGame()
                    elif key[K_s]:
                        self.saveGame()
                    elif key[K_a]:
                        self.showArrow = not self.showArrow
            self.drawGrid()
            self.drawPlatforms()
            self.drawAndUpdateItems()
            self.updatePlayer()
            self.updatePlatforms()
            self.screen.blit(self.font.render(str(self.score), -1, (0, 0, 0)), (self.sx // 32, self.sy // 24))
            for i in range(0, self.sandcastles):
                self.screen.blit(self.imgFlagRight, (self.sx // 32 + 10 * i, self.sy // 8))
            if self.playery - self.cameray > self.sy * 7 // 6:
                if self.eternal:
                    self.jump = self.gravity
                    self.gravity = 0
                elif self.eternalFlag and self.sandcastles > 0:
                    self.sandcastles -= 1
                    self.jump = self.gravity
                    self.gravity = 0
                else:
                    self.showScore()
                    self.reset()
            pygame.display.flip()

MolpyUp().run()
Last edited by balthasar_s on Thu May 10, 2018 7:20 pm UTC, edited 3 times in total.
BFTF replay
Good luck, my blitzing friends!
BTTBAA:1023 # Mustard? Use the mirror! Blitzing? Also use the mirror! And here's why. # OTT facebug copy
that's a robot so it doesn't countImage
This text was autogenerated:
swimming unit detector active

User avatar
ZoomanSP
Posts: 1788
Joined: Sun May 26, 2013 11:23 am UTC
Location: Twelve days north of the Othercomic threads, and a few degrees south of complete insanity. (©yappo)

Re: 1190: "Time"

Postby ZoomanSP » Wed May 09, 2018 3:09 pm UTC

New OtherComic, with some molpymustard:
Spoiler:
Image
RSIR:
Spoiler:
1991_molpymustard.png
Wait on.

Image
Spoiler:
Kieryn wrote:They have a culture involving hat wearing. What kind of a collective would come up with such a thing!?
BlitzGirl wrote:I'll get the razor and finish off Occam while we're at it.
ucim / Megan wrote:"It can do whatever it wants. It's the OTT."

User avatar
mscha
Posts: 6861
Joined: Tue Mar 26, 2013 10:21 pm UTC
Location: NL
Contact:

1190: "Time" - Time Revisited - np1219

Postby mscha » Wed May 09, 2018 10:10 pm UTC

SOOTHUNGS...
Image
Spoiler:
Wait for it.
(Colorization by charlie_grumbles.)

Replay Time live here!

OTT Time Travel

AUTOMOME wrote:ONLY TWO THINGS COME FROM R.A.Z.O.R.: CUSTARD AND MINI-SHORTDO

-- posted by oldpixbot

User avatar
balthasar_s
Posts: 2216
Joined: Mon Nov 28, 2011 3:20 pm UTC
Location: secret base on the Moon
Contact:

Re: 1190: "Time"

Postby balthasar_s » Thu May 10, 2018 7:23 pm UTC

balthasar_s wrote:
Sustainabilizer wrote:MolpyUpdate: Image
balthasar_s wrote:I made a very simple AI for the game.
I improved the AI.
Another, small improvent:

I made it better at not missing the moving platforms.
So I made it less afraid of chosing the moving platforms.
And I removed one line which was completely redundant.
I also changed on thing I didn't like about the moving platforms - that they moved exactly to the edge on the left but a little farther on the right - i made them go to the edge on both sides.

Code: Select all

# Molpy Up!
#
# Based on Max00355's version of DoodleJump, <https://github.com/Max00355/DoodleJump>
# Copyright (C) 2015 by Frankie Primerano,
# written in 120 minutes, see <https://www.reddit.com/r/gamedev/comments/3umhuq/doodle_jump_created_in_120_minutes_with_python/>.
#
# Copyright (C) 2018 by Peter Gerwinski <http://www.peter.gerwinski.de>,
# OTTified in about 120 minutes.
#
# edited to add arrow, AI, and a flag save mode - balthasar_s
#
# This program is Free Software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GNU GPL), version 3,
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program, see the file LICENSE.  If not, see
# <http://www.gnu.org/licenses/>.
#
# The player figure "Molpy" is
# Copyright (C) 2013 by BlitzGirl, see user "BlitzGirl" at <http://forums.xkcd.com>,
# released under conditions compatible with both the GNU GPL v3 and the
# CC BY-NC 2.5 license (see below).
#
# All other artwork used by this program is based on xkcd 1190 "Time",
# Copyright (C) 2013 by Randall Munroe, see <http://xkcd.com/1190>,
# released under the Creative Commonns Attribution-NonCommercial Generic License,
# version 2.5 (CC BY-NC 2.5), see <https://creativecommons.org/licenses/by-nc/2.5/>.
#
# In particular, the contents of the directory "assets"
# is NOT subject to the GNU GPL.

import pygame
from pygame.locals import *
import sys
import datetime
import random
import math

class MolpyUp:

    platformTypeSand = 0
    platformTypeGrass = 1
    platformTypeNormal = platformTypeGrass
    platformTypeGrapevine = 2
    platformTypeAfterLucky = 3
    platformTypeCastle = 4
    platformTypeWater = 5
    platformTypeRaftcastle = 6
    platformTypeFloating = platformTypeRaftcastle
    platformTypeLucky = 7
    platformTypeBreaking = 8
    platformTypeTheEnd = 9
    platformTypeWonTheGame = 10

    itemTypeAccelerator = 0
    itemTypeBeanie = 1
    itemTypeSnake = 2
    itemTypePrickly = 3
    itemTypeSandcastle = 4
    itemTypeFlag = 5
    itemTypePlantSand = 6
    itemTypePlantGrass = 7

    scoreSnake = 1738
    scorePrickly = 2015
    scoreGrass = 2193
    scoreAfterLucky = 2315
    scoreCastle = 2825
    scoreLucky = 2976
    scoreRaftcastle = 3031
    scoreWater = 3043
    scoreTheEnd = 3089
    scoreEpilogue = 3094

    def __init__(self):
        self.relativeX=0
        self.sx = 553
        self.sy = 395
        self.extrax = self.sx // 16
        self.screen = pygame.display.set_mode((self.sx, self.sy))
        pygame.font.init()
        self.font = pygame.font.SysFont("xkcd,sans", 25)
        self.clock = pygame.time.Clock()
        self.xmovementmax = 10
        self.eternal = False
        self.eternalFlag = False
        self.ai = False
        self.aiDebag = False
        self.imgPlatformSand = [ pygame.image.load("assets/platformSand1.png").convert_alpha(),
                                 pygame.image.load("assets/platformSand2.png").convert_alpha(),
                                 pygame.image.load("assets/platformSand3.png").convert_alpha(),
                                 pygame.image.load("assets/platformSand4.png").convert_alpha() ]
        self.imgPlatformGrass = [ pygame.image.load("assets/platformGrass1.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass2.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass3.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass1f.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass2f.png").convert_alpha(),
                                  pygame.image.load("assets/platformGrass3f.png").convert_alpha() ]
        self.imgPlatformWater = [ pygame.image.load("assets/platformWater1.png").convert_alpha(),
                                  pygame.image.load("assets/platformWater2.png").convert_alpha(),
                                  pygame.image.load("assets/platformWater1f.png").convert_alpha(),
                                  pygame.image.load("assets/platformWater2f.png").convert_alpha() ]
        self.imgPlatformAfterLucky = pygame.image.load("assets/platformAfterLucky.png").convert_alpha()
        self.imgPlatformCastle = pygame.image.load("assets/platformCastle.png").convert_alpha()
        self.imgPlatformLuckySleeping = pygame.image.load("assets/platformLuckySleeping.png").convert_alpha()
        self.imgPlatformLuckyAttacking = pygame.image.load("assets/platformLuckyAttacking.png").convert_alpha()
        self.imgPlatformRaftcastle = pygame.image.load("assets/platformRaftcastle.png").convert_alpha()
        self.imgPlatformGrapevine = pygame.image.load("assets/platformGrapevine.png").convert_alpha()
        self.imgPlatformBreaking = pygame.image.load("assets/platformBreaking.png").convert_alpha()
        self.imgPlatformBroken = pygame.image.load("assets/platformBroken.png").convert_alpha()
        self.imgPlatformTheEnd = pygame.image.load("assets/platformTheEnd.png").convert_alpha()
        self.imgPlatformWonTheGame = pygame.image.load("assets/platformWonTheGame.png").convert_alpha()
        self.imgPlayerRightUp = pygame.image.load("assets/playerRightUp.png").convert_alpha()
        self.imgPlayerRightDown = pygame.image.load("assets/playerRightDown.png").convert_alpha()
        self.imgPlayerLeftUp = pygame.image.load("assets/playerLeftUp.png").convert_alpha()
        self.imgPlayerLeftDown = pygame.image.load("assets/playerLeftDown.png").convert_alpha()
        self.imgPlayerRightUpBeanie = pygame.image.load("assets/playerRightUpBeanie.png").convert_alpha()
        self.imgPlayerRightDownBeanie = pygame.image.load("assets/playerRightDownBeanie.png").convert_alpha()
        self.imgPlayerLeftUpBeanie = pygame.image.load("assets/playerLeftUpBeanie.png").convert_alpha()
        self.imgPlayerLeftDownBeanie = pygame.image.load("assets/playerLeftDownBeanie.png").convert_alpha()
        self.imgAccelerator = pygame.image.load("assets/accelerator.png").convert_alpha()
        self.imgAcceleratorUsed = pygame.image.load("assets/acceleratorUsed.png").convert_alpha()
        self.imgBeanie = pygame.image.load("assets/beanie.png").convert_alpha()
        self.imgSnake = pygame.image.load("assets/snake.png").convert_alpha()
        self.imgSnakeLeft = pygame.image.load("assets/snakeLeft.png").convert_alpha()
        self.imgSnakeRight = pygame.image.load("assets/snakeRight.png").convert_alpha()
        self.imgPrickly = pygame.image.load("assets/prickly.png").convert_alpha()
        self.imgPricklyCurled = pygame.image.load("assets/pricklyCurled.png").convert_alpha()
        self.imgSandcastle = pygame.image.load("assets/sandcastle.png").convert_alpha()
        self.imgFlagLeft = pygame.image.load("assets/flagLeft.png").convert_alpha()
        self.imgFlagLeftDown = pygame.image.load("assets/flagLeftDown.png").convert_alpha()
        self.imgFlagRight = pygame.image.load("assets/flagRight.png").convert_alpha()
        self.imgFlagRightDown = pygame.image.load("assets/flagRightDown.png").convert_alpha()
        self.imgPlantSand = [ pygame.image.load("assets/plantSand1.png").convert_alpha(),
                              pygame.image.load("assets/plantSand2.png").convert_alpha(),
                              pygame.image.load("assets/plantSand3.png").convert_alpha(),
                              pygame.image.load("assets/plantSand4.png").convert_alpha(),
                              pygame.image.load("assets/plantSand5.png").convert_alpha() ]
        self.imgPlantGrass = [ pygame.image.load("assets/plantGrass1.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass2.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass3.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass4.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass5.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass6.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass7.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass8.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass9.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass10.png").convert_alpha(),
                               pygame.image.load("assets/plantGrass11.png").convert_alpha() ]
        self.imgMolpArrow = pygame.image.load("assets/molpArrow.png").convert_alpha()

    def reset(self):
        self.cameray = 0
        self.score = 0
        self.sandcastles = 0
        self.speed = 30
        self.showArrow = True
        self.playerx = self.sx // 2
        self.playery = self.sy * 3 // 4
        self.direction = 0
        self.jump = 0
        self.gravity = 0
        self.xmovement = 0
        self.playerWearsBeanie = False
        self.playerCarriesFlag = False
        self.hadSnake = False
        self.hadPrickly = False
        self.hadAfterLucky = False
        self.hadCastle = False
        self.hadLucky = False
        self.hadTheEnd = False
        self.raftcastleHasFlag = False
        self.platforms = [[self.playerx, self.playery + self.sy // 6, self.platformTypeSand, 0, 0, -1, False, self.imgPlatformSand[0].get_width()]]
        self.generateInitialPlatforms()
        self.items = []
        self.aiNextPlatformOk = False
        self.aiNextPlatform=[self.playerx,self.playery]
        if self.filename:
            self.restoreGame (self.filename)

    def saveGame(self):
        self.filename = datetime.datetime.now().strftime("%Y%m%d-%H%M%S.molpyup")
        with open(self.filename, "w") as file:
            file.write("MolpyUp!\n")
            file.write("cameray: " + str(self.cameray) + "\n")
            file.write("score: " + str(self.score) + "\n")
            file.write("sandcastles: " + str(self.sandcastles) + "\n")
            file.write("speed: " + str(self.speed) + "\n")
            file.write("showArrow: " + str(self.showArrow) + "\n")
            file.write("playerx: " + str(self.playerx) + "\n")
            file.write("playery: " + str(self.playery) + "\n")
            file.write("direction: " + str(self.direction) + "\n")
            file.write("jump: " + str(self.jump) + "\n")
            file.write("gravity: " + str(self.gravity) + "\n")
            file.write("xmovement: " + str(self.xmovement) + "\n")
            file.write("playerWearsBeanie: " + str(self.playerWearsBeanie) + "\n")
            file.write("playerCarriesFlag: " + str(self.playerCarriesFlag) + "\n")
            file.write("hadSnake: " + str(self.hadSnake) + "\n")
            file.write("hadPrickly: " + str(self.hadPrickly) + "\n")
            file.write("hadAfterLucky: " + str(self.hadAfterLucky) + "\n")
            file.write("hadCastle: " + str(self.hadCastle) + "\n")
            file.write("hadLucky: " + str(self.hadLucky) + "\n")
            file.write("hadTheEnd: " + str(self.hadTheEnd) + "\n")
            file.write("raftcastleHasFlag: " + str(self.raftcastleHasFlag) + "\n")
            file.write("eternal: " + str(self.eternal) + "\n")
            file.write("eternalFlag: " + str(self.eternalFlag) + "\n")
            file.write("platforms: " + str(self.platforms) + "\n")
            file.write("items: " + str(self.items) + "\n")

    def readVariable(self, line, name, var):
        if line.startswith(name + ": "):
            return eval (line[len(name) + 2:])
        else:
            return var

    def restoreGame(self, filename):
        try:
            with open(filename, "r") as file:
                lines = file.readlines()
            for line in lines:
                self.cameray = self.readVariable(line, "cameray", self.cameray)
                self.score = self.readVariable(line, "score", self.score)
                self.sandcastles = self.readVariable(line, "sandcastles", self.sandcastles)
                self.speed = self.readVariable(line, "speed", self.speed)
                self.showArrow = self.readVariable(line, "showArrow", self.showArrow)
                self.playerx = self.readVariable(line, "playerx", self.playerx)
                self.playery = self.readVariable(line, "playery", self.playery)
                self.direction = self.readVariable(line, "direction", self.direction)
                self.jump = self.readVariable(line, "jump", self.jump)
                self.gravity = self.readVariable(line, "gravity", self.gravity)
                self.xmovement = self.readVariable(line, "xmovement", self.xmovement)
                self.playerWearsBeanie = self.readVariable(line, "playerWearsBeanie", self.playerWearsBeanie)
                self.playerCarriesFlag = self.readVariable(line, "playerCarriesFlag", self.playerCarriesFlag)
                self.hadSnake = self.readVariable(line, "hadSnake", self.hadSnake)
                self.hadPrickly = self.readVariable(line, "hadPrickly", self.hadPrickly)
                self.hadAfterLucky = self.readVariable(line, "hadAfterLucky", self.hadAfterLucky)
                self.hadCastle = self.readVariable(line, "hadCastle", self.hadCastle)
                self.hadLucky = self.readVariable(line, "hadLucky", self.hadLucky)
                self.hadTheEnd = self.readVariable(line, "hadTheEnd", self.hadTheEnd)
                self.raftcastleHasFlag = self.readVariable(line, "raftcastleHasFlag", self.raftcastleHasFlag)
                self.platforms = self.readVariable(line, "platforms", self.platforms)
                self.items = self.readVariable(line, "items", self.items)
            return True
        except FileNotFoundError:
            return False
   
    def findNextPlatform(self):
        # bestDistance=float("Inf")
        # for p in self.platforms:
            # if not self.jump:
                # distance = abs(p[0]-self.playerx) * 0.5 - p[1]
            # else:
                # distance = abs(p[0]-self.playerx) * 0.5 + abs(p[1]-self.playery)
                # if p[1]>self.playery:
                    # distance += 900
            # if p[2] > self.platformTypeNormal and p[2] <= self.platformTypeFloating:
                # distance += 290
            # if p[2] == self.platformTypeBreaking:
                # distance = float("Inf")
            # p[6]=distance
            # if distance<bestDistance:
                # bestDistance = distance
                # self.aiNextPlatform=p
                # self.aiNextPlatformOk = True
       
        bestPlatformScore = float("-Inf")
        actualY=self.playery+self.imgPlayerRightUp.get_height()
        actualX=self.playerx+self.imgPlayerRightUp.get_width()//2
        self.aiNextPlatform = self.platforms[0]
        if self.jump > 0:
            maxY = actualY - (self.jump * (self.jump+1) // 2)
            framesUp = self.jump
        else:
            maxY = actualY
            framesUp = 0
               
        for p in self.platforms:
            platformX = p[0] + p[7] //2
            platformY = p[1]
            platformScore = 0
           
            if (platformY < maxY) or (p[2] == self.platformTypeBreaking):
                platformScore = float("-Inf")
                p[6]=platformScore
                continue
           
            distY = actualY - platformY
            distDown = platformY - maxY
            distX = abs(platformX-actualX)
           
            if self.gravity > 0:
                framesDown = int(math.floor(math.sqrt(self.gravity * self.gravity + 2 * distDown) - self.gravity))
            else:
                framesDown = int(math.floor(math.sqrt(2*distDown)))
           
            speedX=9;
           
            if p[2] > self.platformTypeNormal and p[2] <= self.platformTypeFloating:
                if (p[4] and platformX>actualX) or (not p[4] and platformX<actualX):
                    speedX -= self.extrax // 10
                else:
                    speedX += self.extrax // 10
           
            platformScore += framesUp + framesDown - distX//speedX
           
            if platformX-actualX>2*self.xmovementmax and self.xmovement < 0:
                platformScore -= (self.xmovementmax-self.xmovement)*(self.xmovementmax-self.xmovement)//4
            elif actualX-platformX>2*self.xmovementmax and self.xmovement > 0:
                platformScore -= (-self.xmovementmax-self.xmovement)*(-self.xmovementmax-self.xmovement)//4
           
            if platformScore < 0:
                platformScore = float("-Inf")
            platformScore *=4
           
            if distY>16:
                platformScore += distY + distX//2
            else:
                platformScore += 2*distY - 200 + distX
           
            if p[2] > self.platformTypeNormal and p[2] <= self.platformTypeFloating:
                platformScore -= 50 #100
            elif p[2] == self.platformTypeLucky:
                platformScore -= 150
           
            if p[5] == self.itemTypeSnake:
                platformScore -= 150
            elif p[5] == self.itemTypeFlag and not self.playerCarriesFlag:
                platformScore += 70
            elif p[5] == self.itemTypeSandcastle and self.playerCarriesFlag:
                platformScore += 70
            elif p[5] == self.itemTypeBeanie and not self.playerWearsBeanie:
                platformScore += 50
           
            p[6] = platformScore
           
            if platformScore > bestPlatformScore:
                bestPlatformScore = platformScore
                self.aiNextPlatform = p
                self.aiNextPlatformOk = True
               
           
           
       
               
    def updatePlayer(self):
        if ((not self.jump) and (self.playery > self.aiNextPlatform[1])) or (self.aiNextPlatform[1] - self.cameray > self.sy):
            self.aiNextPlatformOk = False
       
        if not self.aiNextPlatformOk and self.ai:
            self.findNextPlatform()
   
        if not self.jump:
            self.playery += self.gravity
            self.gravity += 1
        else:
            self.playery -= self.jump
            self.jump -= 1
        key = pygame.key.get_pressed()
       
        if key[K_RIGHT]:
            if self.xmovement < self.xmovementmax:
                self.xmovement += 1
            self.direction = 0
        elif key[K_LEFT]:
            if self.xmovement > -self.xmovementmax:
                self.xmovement -= 1
            self.direction = 1
        elif key[K_PLUS] or key[K_KP_PLUS]:
            if pygame.key.get_mods() & KMOD_CTRL:
                self.score += 10
            else:
                self.speed += 1
                self.screen.blit(self.font.render("Speed: " + str(self.speed), -1, (0, 0, 0)), (self.sx // 32, self.sy - self.sy // 12))
        elif key[K_MINUS] or key[K_KP_MINUS]:
            if pygame.key.get_mods() & KMOD_CTRL:
                self.score -= 10
            else:
                self.speed -= 1
                self.screen.blit(self.font.render("Speed: " + str(self.speed), -1, (0, 0, 0)), (self.sx // 32, self.sy - self.sy // 12))
        else:
            if self.ai:
                actualX=self.playerx+self.imgPlayerRightUp.get_width()//2
                platformX = self.aiNextPlatform[0] + self.aiNextPlatform[7] //2
                if self.aiNextPlatform[2] > self.platformTypeNormal and self.aiNextPlatform[2] <= self.platformTypeFloating:
                    if self.aiNextPlatform[4] == True:
                        self.relativeX = self.xmovement - self.extrax // 10
                    else:
                        self.relativeX = self.xmovement + self.extrax // 10
                else:
                    self.relativeX = self.xmovement

                if actualX<platformX -2.5*self.relativeX:
                    if self.xmovement < self.xmovementmax:
                        self.xmovement += 1
                    self.direction = 0
                elif actualX>platformX -2.5*self.relativeX:
                    if self.xmovement > -self.xmovementmax:
                        self.xmovement -= 1
                    self.direction = 1
                else:
                    if self.xmovement > 0:
                        self.xmovement -= 1
                    elif self.xmovement < 0:
                        self.xmovement += 1
            else:
                if self.xmovement > 0:
                    self.xmovement -= 1
                elif self.xmovement < 0:
                    self.xmovement += 1
       
        if self.playerx > self.sx + self.extrax:
            self.playerx = -self.extrax
            self.aiNextPlatformOk = False
        elif self.playerx < -self.extrax:
            self.playerx = self.sx + self.extrax
            self.aiNextPlatformOk = False
        self.playerx += self.xmovement
        if self.playery - self.cameray <= self.sy // 3:
            self.cameray -= self.sy // 60

        if (self.playery - self.cameray + self.imgPlayerRightUp.get_height()) < 0:
            if self.showArrow:
                self.screen.blit(self.imgMolpArrow, (self.playerx, 2))
        else:
            if not self.direction:
                if self.jump:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerRightDownBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerRightDown, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagLeft, (self.playerx + 24, self.playery - 10 - self.cameray))
                else:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerRightUpBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerRightUp, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagLeftDown, (self.playerx + 22, self.playery - 10 - self.cameray))
            else:
                if self.jump:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerLeftDownBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerLeftDown, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagRight, (self.playerx + 13, self.playery - 10 - self.cameray))
                else:
                    if self.playerWearsBeanie:
                        self.screen.blit(self.imgPlayerLeftUpBeanie, (self.playerx, self.playery - self.cameray))
                    else:
                        self.screen.blit(self.imgPlayerLeftUp, (self.playerx, self.playery - self.cameray))
                    if self.playerCarriesFlag:
                        self.screen.blit(self.imgFlagRightDown, (self.playerx + 11, self.playery - 10 - self.cameray))
       
     

    def choosePlatformType(self):
        if self.score >= self.scoreTheEnd:
            return self.platformTypeTheEnd
        platformType = random.randint(0, 999)
        if self.score > self.scoreWater:
            if platformType < 900:
                return self.platformTypeWater
            else:
                return self.platformTypeRaftcastle
        elif platformType < 800:
            if platformType < 1000 * self.score // self.scoreGrass:
                if self.score > self.scoreAfterLucky and not self.hadAfterLucky:
                    self.hadAfterLucky = True
                    return self.platformTypeAfterLucky
                elif self.score > self.scoreCastle and not self.hadCastle:
                    self.hadCastle = True
                    return self.platformTypeCastle
                elif self.score > self.scoreLucky and not self.hadLucky:
                    self.hadLucky = True
                    return self.platformTypeLucky
                else:
                    return self.platformTypeGrass
            else:
                return self.platformTypeSand
        elif platformType < 900:
            return self.platformTypeGrapevine
        else:
            return self.platformTypeBreaking

    def generateNewPlatform(self):
        platform = False
        platform2 = False
        platformType = self.choosePlatformType()
        if platformType == self.platformTypeTheEnd:
            if not self.hadTheEnd:
                platform2=[self.sx // 2 - self.imgPlatformTheEnd.get_width() // 2, self.platforms[-1][1] - self.sy // 4, self.platformTypeTheEnd, False, False, -1, False, self.imgPlatformTheEnd.get_width()]
                platform=[self.sx // 2 - self.imgPlatformWonTheGame.get_width() // 2, platform2[1] - self.sy * 2 // 3, self.platformTypeWonTheGame, False, False, -1, False, self.imgPlatformWonTheGame.get_width()]
                self.hadTheEnd = True
        elif platformType == self.platformTypeWater or platformType == self.platformTypeRaftcastle:
            platform=[random.randint(0, self.sx * 7 // 8), self.platforms[-1][1] - self.sy // 8, platformType, False, False, -1, False, self.imgPlatformSand[0].get_width()]
        elif platformType == self.platformTypeLucky:
            platform=[0, self.platforms[-1][1] - self.sy // 12, platformType, False, False, -1, False, self.imgPlatformSand[0].get_width()]
        else:
            platform=[random.randint(0, self.sx * 7 // 8), self.platforms[-1][1] - self.sy // 12, platformType, False, False, -1, False, self.imgPlatformSand[0].get_width()]
        if platformType <= self.platformTypeNormal:
            if platformType == self.platformTypeSand:
                platform[4] = random.randint(0, len(self.imgPlatformSand) - 1)
            elif platformType == self.platformTypeGrass:
                platform[4] = random.randint(0, len(self.imgPlatformGrass) - 1)
            else:
                platform[4] = random.randint(0, len(self.imgPlatformWater) - 1)
            x = platform[0]
            y = platform[1]
            if platformType == self.platformTypeGrass and self.score > self.scoreSnake and not self.hadSnake:
                platform[5]=self.itemTypeSnake
                self.items.append([x - 10, y + 9, self.itemTypeSnake, False])
                self.hadSnake = True
            elif platformType == self.platformTypeGrass and self.score > self.scorePrickly and not self.hadPrickly:
                platform[5]=self.itemTypePrickly
                self.items.append([x + self.imgPlatformSand[0].get_width() // 3, y + 8, self.itemTypePrickly, False])
                self.hadPrickly = True
            elif self.score > 0:
                check = random.randint(0, 999)
                if check > 800:
                    xx = x + random.randint(0, self.imgPlatformSand[0].get_width() - 40)
                    itemType = random.randint(0,999)
                    if itemType < 50:
                        platform[5]=self.itemTypeBeanie
                        self.items.append([xx, y + 7, self.itemTypeBeanie, False])
                    elif itemType < 150 and platformType == self.platformTypeSand:
                        platform[5]=self.itemTypeSandcastle
                        self.items.append([xx, y + 7, self.itemTypeSandcastle, False])
                    elif itemType < 350 and platformType == self.platformTypeSand:
                        platform[5]=self.itemTypeFlag
                        self.items.append([xx, y + 7, self.itemTypeFlag, False])
                    elif itemType < 950 and platformType == self.platformTypeSand:
                        platform[5]=self.itemTypePlantSand
                        self.items.append([xx, y + 8, self.itemTypePlantSand, itemType % len(self.imgPlantSand)])
                    elif itemType < 100 and platformType == self.platformTypeGrass:
                        platform[5]=self.itemTypeFlag
                        self.items.append([xx, y + 6, self.itemTypeFlag, False])
                    elif itemType < 700 and platformType == self.platformTypeGrass:
                        platform[5]=self.itemTypePlantGrass
                        self.items.append([xx, y + 10, self.itemTypePlantGrass, itemType % len(self.imgPlantGrass)])
                    elif itemType < 850 and platformType == self.platformTypeGrass and self.score > self.scorePrickly:
                        platform[5]=self.itemTypePrickly
                        self.items.append([xx, y + 8, self.itemTypePrickly, False])
                    elif itemType < 950 and platformType == self.platformTypeGrass and self.score > self.scoreSnake:
                        platform[5]=self.itemTypeSnake
                        self.items.append([x - 10, y + 9, self.itemTypeSnake, False])
                    else:
                        platform[5]=self.itemTypeAccelerator
                        self.items.append([xx - 5, y + 10, self.itemTypeAccelerator, False])
        if platform2 != False:
            self.platforms.append(platform2)
        if platform != False:
            self.platforms.append(platform)

    def updatePlatforms(self):
        while self.platforms[0][1] - self.cameray > self.sy + self.sy // 12:
            self.generateNewPlatform()
            self.platforms.pop(0)
            if self.score < self.scoreEpilogue:
                self.score += 1
        for p in self.platforms:
            if p[2] == self.platformTypeGrapevine:
                img = self.imgPlatformGrapevine
            elif p[2] == self.platformTypeAfterLucky:
                img = self.imgPlatformAfterLucky
            elif p[2] == self.platformTypeCastle:
                img = self.imgPlatformCastle
            elif p[2] == self.platformTypeRaftcastle:
                img = self.imgPlatformRaftcastle
            else:
                # all have same size
                img = self.imgPlatformSand[0]
            rect = pygame.Rect(p[0], p[1], img.get_width(), self.imgPlatformSand[0].get_height())
            player = pygame.Rect(self.playerx + 15, self.playery, self.imgPlayerRightUp.get_width() - 30, self.imgPlayerRightUp.get_height())
            if rect.colliderect(player) and self.gravity and self.playery < (p[1] - self.cameray):
                if p[2] == self.platformTypeBreaking:
                    p[4] = True
                else:
                    self.jump = self.sy // 20
                    self.aiNextPlatformOk = False
                    self.gravity = 0
                    if p[2] == self.platformTypeLucky and not (self.playerWearsBeanie and self.playerCarriesFlag) and p[3] <= 0:
                        self.aiNextPlatformOk = False
                        self.xmovement = self.sx // 20
                        self.direction = 0
                        self.cameray -= self.sy // 12
                        p[3] = -1
                    elif (p[2] == self.platformTypeAfterLucky or p[2] == self.platformTypeCastle or p[2] == self.platformTypeLucky) and self.playerCarriesFlag and not p[3]:
                        self.playerCarriesFlag = False
                        p[3] = True
                        self.sandcastles += 1
                    elif p[2] == self.platformTypeRaftcastle and self.playerCarriesFlag and not self.raftcastleHasFlag:
                        self.playerCarriesFlag = False
                        self.raftcastleHasFlag = True
                        self.sandcastles += 1
            if p[2] > self.platformTypeNormal and p[2] <= self.platformTypeFloating:
                if p[4]:
                    if p[2] == self.platformTypeAfterLucky:
                        img = self.imgPlatformAfterLucky
                    elif p[2] == self.platformTypeCastle:
                        img = self.imgPlatformCastle
                    else:
                        img = self.imgPlatformGrapevine
                    p[0] += self.extrax // 10
                    if p[0] + img.get_width() > self.sx:# + self.extrax:
                        p[4] = False
                else:
                    p[0] -= self.extrax // 10
                    if p[0] <= 0:
                        p[4] = True

   
           
   
    def drawPlatforms(self):
        for p in self.platforms:
            if p[2] == self.platformTypeSand:
                self.screen.blit(self.imgPlatformSand[p[4]], (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeGrass:
                self.screen.blit(self.imgPlatformGrass[p[4]], (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeWater:
                self.screen.blit(self.imgPlatformWater[p[4]], (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeGrapevine:
                self.screen.blit(self.imgPlatformGrapevine, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeAfterLucky:
                if p[3]:
                    self.screen.blit(self.imgFlagRight, (p[0] + 47, p[1] - 12 - self.cameray))
                self.screen.blit(self.imgPlatformAfterLucky, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeCastle:
                if p[3]:
                    self.screen.blit(self.imgFlagRight, (p[0] + self.imgPlatformCastle.get_width() - 16, p[1] - 4 - self.cameray))
                self.screen.blit(self.imgPlatformCastle, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeLucky:
                if p[3]:
                    self.screen.blit(self.imgPlatformLuckyAttacking, (p[0], p[1] - self.imgPlatformLuckyAttacking.get_height() + self.imgPlatformLuckySleeping.get_height() - self.cameray))
                    if p[3] > 0:
                        self.screen.blit(self.imgFlagRight, (p[0] + self.imgPlatformLuckyAttacking.get_width() - 8, p[1] - 11 - self.cameray))
                else:
                    self.screen.blit(self.imgPlatformLuckySleeping, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeRaftcastle:
                if self.raftcastleHasFlag:
                    self.screen.blit(self.imgFlagRight, (p[0] + 50, p[1] - 13 - self.cameray))
                self.screen.blit(self.imgPlatformRaftcastle, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeBreaking:
                if not p[4]:
                    self.screen.blit(self.imgPlatformBreaking, (p[0], p[1] - self.cameray))
                else:
                    self.screen.blit(self.imgPlatformBroken, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeTheEnd:
                self.screen.blit(self.imgPlatformTheEnd, (p[0], p[1] - self.cameray))
            elif p[2] == self.platformTypeWonTheGame:
                self.screen.blit(self.imgPlatformWonTheGame, (p[0], p[1] - self.cameray))
            # print (str(p))
            if self.aiDebag:
                self.screen.blit(self.font.render(str(p[2])+" "+str(p[5])+" "+str(p[6]), -1, (0, 0x57, 0xaf)), (p[0], p[1] - self.cameray + 16))
        if self.aiDebag:
            self.screen.blit(self.imgMolpArrow, (self.aiNextPlatform[0] + (self.imgPlatformSand[0].get_width()-self.imgMolpArrow.get_width())//2, self.aiNextPlatform[1] - self.cameray + 16))
           
           

    def drawAndUpdateItems(self):
        while self.items and self.items[0][1] - self.cameray > self.sy + self.sy // 12:
            self.items.pop(0)
        for item in self.items:
            if item[2] == self.itemTypeAccelerator:
                if item[-1]:
                    imgItem = self.imgAcceleratorUsed
                else:
                    imgItem = self.imgAccelerator
            elif item[2] == self.itemTypeBeanie:
                if not item[-1]:
                    imgItem = self.imgBeanie
                else:
                    imgItem = None
            elif item[2] == self.itemTypeSnake:
                if item[-1] == -1:
                    imgItem = self.imgSnakeLeft
                elif item[-1] == 1:
                    imgItem = self.imgSnakeRight
                else:
                    imgItem = self.imgSnake
            elif item[2] == self.itemTypePrickly:
                if not item[-1]:
                    imgItem = self.imgPrickly
                else:
                    imgItem = self.imgPricklyCurled
            elif item[2] == self.itemTypeSandcastle:
                imgItem = self.imgSandcastle
                if item[-1]:
                    self.screen.blit(self.imgFlagRight, (item[0] + 4, item[1] - imgItem.get_height() + 2 - self.imgFlagRight.get_height() - self.cameray))
            elif item[2] == self.itemTypeFlag:
                if not item[-1]:
                    imgItem = self.imgFlagRight
                else:
                    imgItem = None
            elif item[2] == self.itemTypePlantSand:
                imgItem = self.imgPlantSand[item[-1]]
            elif item[2] == self.itemTypePlantGrass:
                imgItem = self.imgPlantGrass[item[-1]]
            if imgItem:
                self.screen.blit(imgItem, (item[0], item[1] - imgItem.get_height() - self.cameray))
            if not item[-1]:
                if pygame.Rect(item[0], item[1] - imgItem.get_height(), imgItem.get_width(), imgItem.get_height()).colliderect(pygame.Rect(self.playerx, self.playery, self.imgPlayerRightUp.get_width(), self.imgPlayerRightUp.get_height())):
                    if item[2] == self.itemTypeAccelerator:
                        self.aiNextPlatformOk = False
                        self.jump = self.sy // 12
                        self.cameray -= self.sy // 12
                        item[-1] = True
                    elif item[2] == self.itemTypeBeanie and not self.playerWearsBeanie:
                        self.playerWearsBeanie = True
                        item[-1] = True
                    elif item[2] == self.itemTypeSnake:
                        self.aiNextPlatformOk = False
                        if self.playerx + self.imgPlayerRightUp.get_width() // 2 < item[0] + self.imgPlatformGrass[0].get_width() // 2:
                            self.xmovement = -self.sx // 30
                            self.direction = 0
                            self.cameray -= self.sy // 12
                            item[-1] = -1
                        else:
                            self.xmovement = self.sx // 30
                            self.direction = 0
                            self.cameray -= self.sy // 12
                            item[-1] = 1
                    elif item[2] == self.itemTypePrickly:
                        item[-1] = True
                    elif item[2] == self.itemTypeSandcastle and self.playerCarriesFlag:
                        self.playerCarriesFlag = False
                        item[-1] = True
                        self.sandcastles += 1
                    elif item[2] == self.itemTypeFlag and not self.playerCarriesFlag:
                        self.playerCarriesFlag = True
                        item[-1] = True

    def generateInitialPlatforms(self):
        while self.platforms[-1][1] > - self.sy // 6:
            self.generateNewPlatform()

    def drawGrid(self):
        for x in range(80):
            pygame.draw.line(self.screen, (222,222,222), (x * 12, 0), (x * 12, self.sy))
            pygame.draw.line(self.screen, (222,222,222), (0, x * 12), (self.sx, x * 12))

    def waitForIt(self, its):
        run = False
        while not run:
            self.clock.tick(self.speed)
            event = pygame.event.poll()
            if event.type == KEYDOWN:
                key = pygame.key.get_pressed()
                if key[K_ESCAPE]:
                    sys.exit()
                for it in its:
                    if key[it]:
                        return it

    def showScore(self):
        line1 = self.font.render("Press ENTER to restart,", -1, (0, 0, 0))
        line2 = self.font.render("ESC to quit.", -1, (0, 0, 0))
        w = max(line1.get_width(), line2.get_width())
        h = line1.get_height() + line2.get_height()
        dx = 10
        dy = 5
        pygame.draw.rect(self.screen, (255,255,255), ((self.sx - w) // 2 - dx, (self.sy - h) // 2 - dy, w + 2 * dx, h + 2 * dy))
        pygame.draw.rect(self.screen, (0,0,0), ((self.sx - w) // 2 - dx, (self.sy - h) // 2 - dy, w + 2 * dx, h + 2 * dy), 3)
        self.screen.blit(line1, ((self.sx - line1.get_width()) // 2, self.sy // 2 - line1.get_height()))
        self.screen.blit(line2, ((self.sx - line2.get_width()) // 2, self.sy // 2))
        pygame.display.flip()
        self.waitForIt([K_RETURN])

    def run(self):
        if len(sys.argv) > 1:
            self.filename = sys.argv[1]
        else:
            self.filename = None
        self.reset()
        while True:
            self.screen.fill((255,255,255))
            self.clock.tick(self.speed)
            for event in pygame.event.get():
                if event.type == QUIT:
                    sys.exit()
                elif event.type == KEYDOWN:
                    key = pygame.key.get_pressed()
                    if key[K_ESCAPE]:
                        sys.exit()
                    elif key[K_i]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.ai = not self.ai
                            self.aiNextPlatformOk = False
                    elif key[K_d]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.aiDebag = not self.aiDebag
                    elif key[K_e]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.eternal = not self.eternal
                            self.eternalFlag = False
                    elif key[K_f]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.eternalFlag = not self.eternalFlag
                            self.eternal = False
                    elif key[K_f]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.playerCarriesFlag = not self.playerCarriesFlag
                    elif key[K_b]:
                        if pygame.key.get_mods() & KMOD_CTRL:
                            self.playerWearsBeanie = not self.playerWearsBeanie
                    elif key[K_SPACE]:
                        while self.waitForIt([K_SPACE, K_s]) == K_s:
                            self.saveGame()
                    elif key[K_s]:
                        self.saveGame()
                    elif key[K_a]:
                        self.showArrow = not self.showArrow
            self.drawGrid()
            self.drawPlatforms()
            self.drawAndUpdateItems()
            self.updatePlayer()
            self.updatePlatforms()
            self.screen.blit(self.font.render(str(self.score), -1, (0, 0, 0)), (self.sx // 32, self.sy // 24))
            for i in range(0, self.sandcastles):
                self.screen.blit(self.imgFlagRight, (self.sx // 32 + 10 * i, self.sy // 8))
           
           
            if self.playery - self.cameray > self.sy * 7 // 6:
                if self.eternal:
                    self.jump = self.gravity
                    self.gravity = 0
                    self.aiNextPlatformOk = False
                elif self.eternalFlag and self.sandcastles > 0:
                    self.sandcastles -= 1
                    self.jump = self.gravity
                    self.gravity = 0
                    self.aiNextPlatformOk = False
                else:
                    self.showScore()
                    self.reset()
            pygame.display.flip()

MolpyUp().run()
BFTF replay
Good luck, my blitzing friends!
BTTBAA:1023 # Mustard? Use the mirror! Blitzing? Also use the mirror! And here's why. # OTT facebug copy
that's a robot so it doesn't countImage
This text was autogenerated:
swimming unit detector active

User avatar
svenman
Posts: 545
Joined: Fri Jun 14, 2013 2:09 pm UTC
Location: 680 km NNE of the Château d'If

Re: 1190: "Time"

Postby svenman » Thu May 10, 2018 9:06 pm UTC

DunejumpUNG:
Image
Spoiler:
Wait for it.

Edit: A quick OTTification of the latest othercomic:

Image

Count on redundancy in this spoiler:
Spoiler:
Image
Image based on xkcd comic 1991 "Research Areas by Size and Countedness" by Randall Munroe, published under CC-BY-NC 2.5. Text modified by myself, modified image also published under CC-BY-NC 2.5.

xkcd1991_ottified.png
xkcd1991_redundant.png
Mostly active on the One True Thread.
If you need help understanding what's going on there, the xkcd Time Wiki may be useful.

Addams didn't die! But will Addams have a place to live? You can help!

Randallspeed to all blitzers on the One True Thread!

User avatar
ucim
Posts: 6170
Joined: Fri Sep 28, 2012 3:23 pm UTC
Location: The One True Thread

Re: 1190: "Time"

Postby ucim » Fri May 11, 2018 2:49 pm UTC

svenman wrote:A quick OTTification of the latest othercomic
Nailed it!

Jose
Order of the Sillies, Honoris Causam - bestowed by charlie_grumbles on NP 859 * OTTscar winner: Wordsmith - bestowed by yappobiscuts and the OTT on NP 1832 * Ecclesiastical Calendar of the Order of the Holy Contradiction * Please help addams if you can. She needs all of us.

User avatar
svenman
Posts: 545
Joined: Fri Jun 14, 2013 2:09 pm UTC
Location: 680 km NNE of the Château d'If

Re: 1190: "Time"

Postby svenman » Fri May 11, 2018 7:15 pm UTC

Thanks, Jose!

New othercomic. The GLR clearly had partaken of the mustard when first uploading the comic, because originally the comic image on the website looked like this for most readers (saved here for future blitzers):

Spoiler:
Image

However, hidden in the HTML source the link to the high-resolution image could be found, which made much more sense. By now, the regular-sized image has been fixed, however; but not before I saved the mustardy version! Which, I guess, hints at the resolution that the GLR's comics are originally created in, presumably including the OTC.

[Edit: To be more specific, the black border is 28 pixels wide in the mustardy image (presumably the top left corner cut from the comic at the GLR's original resolution), 4 pixels wide in the "high-resolution" and 2 pixels wide in the regular image, both of the latter actually including gray pixels along the edge from anti-aliasing, so the GLR's resolution seems to be close to, but perhaps not exactly equal to, 14 times the resolution of the regular comic or seven times the resolution of the "hi-res" image.]

Safely redundant
Spoiler:
Image
Image based on xkcd comic 894 "Progeny" by Randall Munroe, published under CC-BY-NC 2.5. Text and image modified by myself, modified image also published under CC-BY-NC 2.5.

safetysat.png
safetysat.png (753 Bytes) Viewed 17673 times
xkcd0894_redundant.png

Edit: FlyUNG:
Image
Spoiler:
Wait for it.
(Colorization by mscha.)

Edit, 20:51 UTC: Mustardy LandUNG:
Image
Spoiler:
Wait for it.
Mostly active on the One True Thread.
If you need help understanding what's going on there, the xkcd Time Wiki may be useful.

Addams didn't die! But will Addams have a place to live? You can help!

Randallspeed to all blitzers on the One True Thread!

User avatar
addams
Posts: 9757
Joined: Sun Sep 12, 2010 4:44 am UTC
Location: Gold Beach, OR; 97444

Re: 1190: "Time"

Postby addams » Sat May 12, 2018 1:40 am UTC

A random Clip about OTTers for OTTers to watch.
https://www.youtube.com/watch?annotatio ... gFHhfEbcn8
Life is, just, an exchange of electrons; It is up to us to give it meaning.

We are all in The Gutter.
Some of us see The Gutter.
Some of us see The Stars.
by mr. Oscar Wilde.

Those that want to Know; Know.
Those that do not Know; Don't tell them.
They do terrible things to people that Tell Them.

User avatar
GnomeAnne
Posts: 541
Joined: Sat Sep 03, 2016 12:35 am UTC
Location: [center][img]http://forums.xkcd.com/download/file.php?id=54350&t=1[/img]

Re: 1190: "Time"

Postby GnomeAnne » Sat May 12, 2018 1:45 am UTC

What was the other Othercomic that was posted as the high resolution image for a day before GLR replaced it with the regular sized one?

Edit:
Never mind.
Found it.
viewtopic.php?p=4185857#p4185857
Wait For It.

User avatar
mscha
Posts: 6861
Joined: Tue Mar 26, 2013 10:21 pm UTC
Location: NL
Contact:

1190: "Time" - Time Revisited - np1277

Postby mscha » Sat May 12, 2018 8:10 am UTC

OVERWHELMUNGLY...
Image
Spoiler:
Wait for it.
(Colorization by pelrigg.)

Replay Time live here!

OTT Time Travel

AUTOMOME wrote:TAIXZO, I'VE GOT A FEELING WE'RE NOT IN THE TARDIS ANYMORE.

-- posted by oldpixbot

User avatar
svenman
Posts: 545
Joined: Fri Jun 14, 2013 2:09 pm UTC
Location: 680 km NNE of the Château d'If

Re: 1190: "Time"

Postby svenman » Sat May 12, 2018 8:14 am UTC

GnomeAnne wrote:What was the other Othercomic that was posted as the high resolution image for a day before GLR replaced it with the regular sized one?

Edit:
Never mind.
Found it.
viewtopic.php?p=4185857#p4185857

Ah, thanks. There we had an entire comic posted in what is presumably its original resolution (saved in this post), and again we have the 28-pixel-wide black border. From the dimensions of the entire image and its regular-sized and "high-res" counterparts on the website I've now been able to work out that the OTA apparently resizes them to 1/15 or 6.66667% for the regular-sized and 2/15 or 13.3333% for the "high-res" posted images. These are some weird reduction ratios...

By the Way, GnomeAnne, your link to the comic in that post is mustardy.
Mostly active on the One True Thread.
If you need help understanding what's going on there, the xkcd Time Wiki may be useful.

Addams didn't die! But will Addams have a place to live? You can help!

Randallspeed to all blitzers on the One True Thread!

User avatar
lmjb1964
Posts: 2344
Joined: Mon Apr 04, 2011 7:09 pm UTC
Location: In the Present! Need to ketchup NP 2236-2280, plus NP 2026-2058 and something like 2060-2090+?.

Re: 1190: "Time"

Postby lmjb1964 » Sat May 12, 2018 11:30 am UTC

Jose, your story was awesomeful. The event that the story was about was unmolpish, but the story itself was quite molpiah, and shows you to be like a big tree.

I saw the ghost Cue m*stard, but I couldn't see the m*stars in "Research Areas by Size and Countedness." I did enjoy the ottification. One could also add the sea to that chart right next to the OTT, since it's big, and we know there are seven of them.

Thank you for the wowterful otter video, Addams. I know they aren't angelic little creatures, but they are so dang cute!
Image

Help addams stay in her home! https://www.crowdrise.com/in-a-comically-tragic-turn-of-events-addams-didnt-die
Imagesmiley by yappo
That's a robot but it totally counts. Image

bot by balthasar_s

User avatar
SBN
Saved
Posts: 2190
Joined: Tue Mar 26, 2013 7:15 pm UTC
Location: No longer in the home of the raptorcats, now in the home of the raptorcats.

Re: 1190: "Time" - Time Revisited - np1219

Postby SBN » Sat May 12, 2018 12:25 pm UTC

mscha wrote:(Colorization by charlie_grumbles.)



I miss charie_grumbles.

-- posted by oldpixbot
[/quote]

ucim wrote:
svenman wrote:A quick OTTification of the latest othercomic
Nailed it!

Jose


Might also depend on when.

Weather here has been molpish, but I think that's due to change. Not sure yet in which direction, just away from molpishness.
astrotter wrote:It is not particularly clear to me at this time that we are not overanalyzing this...

Randalspeed thunk, iskinner, and other blitzers! Notes from the before-was improve the after-when.
Some Ways to Time
NetWeasel wrote:I want to put that in my sig... BUT I CAN'T!!!!


Return to “Individual XKCD Comic Threads”

Who is online

Users browsing this forum: Sustainabilizer and 89 guests