[SH 2015] Teacher
Elias

{"name":"11101-1","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/4\/c45f0d642b6746a122601d27b1a4ab9b.png","w":1282,"h":748,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/4\/c45f0d642b6746a122601d27b1a4ab9b"}11101-1

{"name":"11124-1","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/c\/ac81e99efcd4b77fb6d4b49ce3721fd4.png","w":1282,"h":748,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/c\/ac81e99efcd4b77fb6d4b49ce3721fd4"}11124-1

Sources

OSX Binaries

Windows Binaries

GullRaDriel

That entry is cool.

I loved it.

I only tried in easy, and it was long enough to bring back these fuckers ;-)

devo_au

My wife is a teacher, and she has students, just like these little turds. Spent a good 10 minutes trying to round them up (like herding cats). Annoying music, text based commands and gravity reversing, ticks all the boxes. Awesome effort.

Bruce Perry

Dammit! Sticky keys!

This is NOT a good advert for looking after kids. I'm traumatised. Well done ;)

I feel Backspace support wouldn't have gone amiss though! Or is that part of the realism - kids can sense when the teacher isn't confident? ;)

Mark Oates

Dammit! Sticky keys!

You can hold shift and that works, too.

This game is really cool, but I want to play it more before I say more. :)

Bruce Perry

You can hold shift and that works, too.

Yeah, I figured that out later :)

We had a fight between Ctrl and Shift for shooting a weapon in one of our work demos in Unity. I changed it from Ctrl to Shift because Ctrl was impeding WASD and Unity was telling us we couldn't save (Ctrl+S) during play. Someone else then changed it back to Ctrl because Shift caused sticky keys to kick in. I'm glad we have decent commit message discipline :)

Elias, I looked at your code. Was it written in Python and transformed to C? Isn't it slightly against the spirit of SpeedHack not to include the real source code? ;)

Elias

The real source is my custom language nobody can even start to make sense of so I found it better to just include the C code. But I see now I forgot to remove the #line directives so it's hard to read :/

The real source code is here: https://github.com/elias-pschernig/teacher

Bruce Perry

Is that not just Python?

Main thing I was missing was comments - but I see there aren't many anyway :)

Elias

It's designed to work with Python syntax highlighting, so I get at least some IDE support :)

Bruce Perry

Cool 8-)

Edgar Reynaldo

Binaries don't work for me. But luckily you included debugging symbols, so here's a backtrace for you :

c:\ctwoplus\progcode\allegro5\SpeedHack2015entries\teacher_by_allefant>gdb teacher.exe
GNU gdb (GDB) 7.6.1

...

Program received signal SIGTRAP, Trace/breakpoint trap.
0x77987b0f in ntdll!DbgBreakPoint () from C:\Windows\system32\ntdll.dll
(gdb) bt
#0  0x77987b0f in ntdll!DbgBreakPoint () from C:\Windows\system32\ntdll.dll
#1  0x779f28f3 in ntdll!RtlpNtMakeTemporaryKey () from C:\Windows\system32\ntdll.dll
#2  0x779bc596 in ntdll!RtlTimeToElapsedTimeFields () from C:\Windows\system32\ntdll.dll
#3  0x779a8592 in ntdll!RtlTryEnterCriticalSection () from C:\Windows\system32\ntdll.dll
#4  0x779f318a in ntdll!RtlpNtMakeTemporaryKey () from C:\Windows\system32\ntdll.dll
#5  0x779bc3c4 in ntdll!RtlTimeToElapsedTimeFields () from C:\Windows\system32\ntdll.dll
#6  0x779a8592 in ntdll!RtlTryEnterCriticalSection () from C:\Windows\system32\ntdll.dll
#7  0x77aaa6e2 in msvcrt!_lock () from C:\Windows\system32\msvcrt.dll
#8  0x77aac6b4 in msvcrt!calloc () from C:\Windows\system32\msvcrt.dll
#9  0x0040eb8f in land_calloc ()
#10 0x00401898 in bumpmap_create ()
#11 0x00405a68 in ladder_create ()
#12 0x00402de8 in init ()
#13 0x00419454 in land_runner_switch_active ()
#14 0x0040eefa in land_mainloop ()
#15 0x00405bcc in realmain ()
#16 0x00405bf1 in main ()
(gdb)

Bruce Pascoe

A calloc failed. That seems odd.

Elias

Thanks, I had a small memory overrun. I updated the github source and the Windows binary. Re-downloading should fix it. :)

Edgar Reynaldo

It now segfaults with no proper backtrace. I tried building it but it fails on game.py with

Quote:

In file included from c:\mingw\include\wtypes.h:30:0,
from c:\mingw\include\unknwn.h:38,
from c:\mingw\include\commdlg.h:532,
from c:\mingw\include\windows.h:87,
from c:\mingw\LIBS\A5111distro\include/allegro5/allegro_opengl.h:26,
from c/land/land.h:1122,
from src/common.py:1,
from src/main.py:1,
from src/game.py:1,
from src/game.py:1:
src/game.py:35:16: error: expected identifier or '(' before 'char'

This is the command line I tried to compile it with :

Quote:

mingw32-gcc -g -o teacher.exe --std=gnu99 c/*.c c/land/land.c -Ic:\mingw\LIBS\A5111distro\include -Lc:\mingw\LIBS\A5111distro\lib -lallegro_monolith-debug.dll

Elias

That's not the new Windows .zip, try compiling that with:

make teacher.exe

I had to flip the position of two headers there to compile under Windows, didn't investigate why.

Onewing

I couldn't finish Easy, haha. I saw the monster and the reversed gravity, but getting the children back to the classroom was just too daunting for me.

I suddenly feel the need to open a charity for teachers. Even if all I can offer is hugs. And now I feel kind of creepy...

Thread #615494. Printed from Allegro.cc