Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

I reached the next level with blocks, but "or" seems to not work. I now get "Unsupported binary operator OR at line 27".

Looking at Windows in your game made me think if I should make UI sections in my game re-arrangeable, but looks like something not worth the effort. What's the purpose for that "Other script Window"? It seems to not do anything, but occupy screen space.

def func():
    gx = -100
    gy = -100
    found = False
    d = 20
    for xx in range(5, d):
        say(xx)
        for yy in range(-d, d):
            if is_goal(get_pos_x()+xx, get_pos_y()+yy):
                gx = get_pos_x() + xx
                gy = get_pos_y() + yy
                found = True
                break
        if found:
            break
    print(gx, gy)
    dx = 1
    if gx < get_pos_x():
        dx = -1
    dy = 1
    if gy < get_pos_y():
        dy = -1
    while get_pos_x() != gx or get_pos_y() != gy:
        if is_block(get_pos_x() + dx, get_pos_y()):
            while get_pos_x() != gx:
                print(get_pos_x(), gx)
                move(dx, 0)
        else:
            while get_pos_y() != gy:
                move(0, dy)
    submit()
func()
(3 edits) (+1)

thanks for pointing out the or functionality.

the other script is for a test run, since there is no undo/redo yet: i figured would be convinient to have a seperate window by side. also wanted to learn resize/minimizable window system.

[edit]: now boolean operations not, and, or as well as bitwise operations >> << | & ~ are supported (updated to v2.0.zip for windows)

(+1)

I have beaten the game with the following code:

def func():
    gx = -100
    gy = -100
    found = False
    d = 20
    for xx in range(4, d):
        say(xx)
        for yy in range(-d, d):
            if is_goal(get_pos_x()+xx, get_pos_y()+yy):
                gx = get_pos_x() + xx
                gy = get_pos_y() + yy
                found = True
                break
        if found:
            break
    print(gx, gy)
    dx = 1
    if gx < get_pos_x():
        dx = -1
    dy = 1
    if gy < get_pos_y():
        dy = -1
    while get_pos_x() != gx or get_pos_y() != gy:
        if get_pos_x() != gx and not is_block(get_pos_x() + dx, get_pos_y()):
            print(get_pos_x(), gx)
            move(dx, 0)
        else:
            move(0, dy)
    submit()
func()

Speaking of minor issues, I noticed that sometimes when resizing a window (specifically, enlarging), line numbers move separately from code.

(-1)

well done :D you beat the game.

Fixed:

  • boolean and, or, not fixed
  • there is now support for bitwise << >> | & ~

yep, the line number part is kinda tricky to achive with TMP_InputField since (it does’nt come with a scroll view) should use alternate approach, will try again XD.