Code Monkey home page Code Monkey logo

ultimatetapankaikki's People

Contributors

akheron avatar akx avatar emlai avatar hkroger avatar juj avatar veikkos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ultimatetapankaikki's Issues

Build macOS .app

Let's figure out how to build a self-contained macOS .app!

The end goal is a single UltimateTapanKaikki.app deliverable that doesn't need e.g. sdl, etc. from brew.

Some keyboards don't have right ctrl

The default keybinding for player 1 shoot is right ctrl, which doesn't exist in all keyboards, most notably small Apple keyboards including the built-in keyboard for all Macbooks.

I'm not sure if we should try to fix this somehow, or just document in the README that you have to change keybindings before playing if your keyboard doesn't have a right ctrl.

Implement audio resampling

#15 implements basic audio support, but resampling sounds (which is heavily used by TK) is not supported.

All sounds play at equal pitch right now, and thus don't sound original.

Game is rendered 320x200 instead of 320x240

Original game changes can change resolution from 320x200 to 320x240 during actual game play if supported. Currently this port is rendering everything at 320x200.

kuva
DOSBox rendering 320x240 on top.

Game controller support

Support game controllers in subtle way. Only place that probably needs to stand out from original game is the key changing view where Joy 1 Up etc. should be recognized.

Some buttons probably need to be hard-coded to certain buttons, like keyboard keys ESC, N and Y, ENTER, UP and DOWN so that menus, shop etc. work without keyboard interference. (Will be implemented separately.)

Could support two controllers for coop.

Network deathmatch game allows enemies

Enemies over network is not a supported feature of TK321. Original game doesn't allow enabling enemies on network game. That UI block has been implemented after 1.2 beta which we are working on.

enemies-on-network

FPS is 38-39 instead of target 40

SDL timers are not millisecond accurate. Based on quick analysis with SDL's own SDL_GetTicks, the expected 25 ms callback is actually usually 26 ms leading to ~5% error which seems to match the expexted error.

Network clients don't monitor server connection

Issue is in original TK code, not in the port.

Clients should probably check socket status (similarly like server polls accept_connections for new connections) to check if server connection is still open. If not, client should e.g. quit to main menu.

Issue does not affect servers shutting down on purpose, since server sends SERVERSHUTDOWN which clients handle correctly.

Display surface missing locking

Display surface missing locking. surface should be locked while game logic is updating the content and unlocked for rendering. It would guarantee that the pixel data pointer is valid. It happens to work without locking for now but it might break on any SDL update or on some new platform.

See SDL_LockSurface.

Cannot repeat non-symbol keys by holding down

Useful e.g. in the shop to buy many bullets if your fire key is bound to e.g. ctrl or alt.

I think we need to convert the keyboard handling to use SDL_GetKeyboardState to achieve this, because SDL doesn't generate key repeat events for these keys.

Window close button only works in main menu

Pressing window close button (top right corner on most of the systems) only works in main menu. If pressed in other context, the application only closes when returning to main menu.

heap-buffer-overflow in check_place

==90928==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61c00000e860 at pc 0x000100059f00 bp 0x7ffeefbfe9c0 sp 0x7ffeefbfe9b8
READ of size 4 at 0x61c00000e860 thread T0
atos(90936,0x1000c95c0) malloc: enabling scribbling to detect mods to free blocks
    #0 0x100059eff in check_place(int, int, int) GAME.CPP:267
    #1 0x10005b24d in place_normal_game_crates() GAME.CPP:329
    #2 0x100069f67 in game() GAME.CPP:2316
    #3 0x10006c536 in menu() GAME.CPP:2481
    #4 0x10006d218 in main GAME.CPP:2598
    #5 0x7fff5d755084 in start (libdyld.dylib:x86_64+0x17084)

0x61c00000e860 is located 32 bytes to the left of 1904-byte region [0x61c00000e880,0x61c00000eff0)
allocated by thread T0 here:
    #0 0x1009b4f53 in wrap_malloc (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x56f53)
    #1 0x7fff306ace65 in -[__NSArrayM insertObject:atIndex:] (CoreFoundation:x86_64h+0x2ce65)
    #2 0x7fff306e52d1 in ___CFBundleReadDirectory_block_invoke (CoreFoundation:x86_64h+0x652d1)
    #3 0x7fff306a528e in _CFIterateDirectory (CoreFoundation:x86_64h+0x2528e)
    #4 0x7fff306e50b1 in _CFBundleReadDirectory (CoreFoundation:x86_64h+0x650b1)
    #5 0x7fff306e4b86 in _createQueryTableAtPath (CoreFoundation:x86_64h+0x64b86)
    #6 0x7fff306e4102 in _copyQueryTable (CoreFoundation:x86_64h+0x64102)
    #7 0x7fff306e397e in _copyResourceURLsFromBundle (CoreFoundation:x86_64h+0x6397e)
    #8 0x7fff306e32d8 in _CFBundleCopyFindResources (CoreFoundation:x86_64h+0x632d8)
    #9 0x7fff306e8382 in CFBundleCopyResourceURL (CoreFoundation:x86_64h+0x68382)
    #10 0x7fff306f56f9 in _copyStringFromTable (CoreFoundation:x86_64h+0x756f9)
    #11 0x7fff306f5376 in CFBundleCopyLocalizedStringForLocalization (CoreFoundation:x86_64h+0x75376)
    #12 0x7fff2e558464 in _NSLocalizedServiceBundleString (AppKit:x86_64+0x961464)
    #13 0x7fff2df64d88 in -[_NSServiceEntry localizedTitle] (AppKit:x86_64+0x36dd88)
    #14 0x7fff2df64bba in -[_NSServiceEntry menuItemTitle] (AppKit:x86_64+0x36dbba)
    #15 0x7fff2df644df in __copySortedEntries_block_invoke (AppKit:x86_64+0x36d4df)
    #16 0x7fff5d800ed6 in _qsort (libsystem_c.dylib:x86_64+0x5fed6)
    #17 0x7fff2df642a2 in -[_NSServicesMenuUpdater insertServicesIntoMenu:withKeyEvent:isForDisplay:] (AppKit:x86_64+0x36d2a2)
    #18 0x7fff2df6415f in -[_NSServicesMenuUpdater updateMenu:withEvent:withFlags:] (AppKit:x86_64+0x36d15f)
    #19 0x7fff2df37f1c in -[_NSServicesPrincipalMenuUpdater updateMenu:withEvent:withFlags:] (AppKit:x86_64+0x340f1c)
    #20 0x7fff2de19c57 in -[NSMenu _populateWithEventRef:] (AppKit:x86_64+0x222c57)
    #21 0x7fff2df364e1 in -[NSCarbonMenuImpl _carbonPopulateEvent:handlerCallRef:] (AppKit:x86_64+0x33f4e1)
    #22 0x7fff2df36254 in NSSLMMenuEventHandler (AppKit:x86_64+0x33f254)
    #23 0x7fff2f9528d8 in DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) (HIToolbox:x86_64+0x88d8)
    #24 0x7fff2f951c15 in SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) (HIToolbox:x86_64+0x7c15)
    #25 0x7fff2f951a9b in SendEventToEventTargetWithOptions (HIToolbox:x86_64+0x7a9b)
    #26 0x7fff2f9ac82a in SendMenuPopulate(MenuData*, OpaqueEventTargetRef*, unsigned int, double, unsigned int, OpaqueEventRef*, unsigned char, unsigned char*) (HIToolbox:x86_64+0x6282a)
    #27 0x7fff2f9ac5c8 in PopulateMenu(MenuData*, OpaqueEventTargetRef*, CheckMenuData*, unsigned int, double) (HIToolbox:x86_64+0x625c8)
    #28 0x7fff2f9abce7 in Check1MenuForKeyEvent(MenuData*, CheckMenuData*) (HIToolbox:x86_64+0x61ce7)
    #29 0x7fff2f9ac49c in Check1MenuForKeyEvent(MenuData*, CheckMenuData*) (HIToolbox:x86_64+0x6249c)

SUMMARY: AddressSanitizer: heap-buffer-overflow GAME.CPP:267 in check_place(int, int, int)
Shadow bytes around the buggy address:
  0x1c3800001cb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c3800001cc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c3800001cd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c3800001ce0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c3800001cf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x1c3800001d00: fa fa fa fa fa fa fa fa fa fa fa fa[fa]fa fa fa
  0x1c3800001d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c3800001d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c3800001d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c3800001d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c3800001d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
2018-11-20 21:53:38.845530+0200 tk3[90928:2348280] =================================================================
2018-11-20 21:53:38.845575+0200 tk3[90928:2348280] ==90928==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61c00000e860 at pc 0x000100059f00 bp 0x7ffeefbfe9c0 sp 0x7ffeefbfe9b8
2018-11-20 21:53:38.845594+0200 tk3[90928:2348280] READ of size 4 at 0x61c00000e860 thread T0
2018-11-20 21:53:38.845619+0200 tk3[90928:2348280]     #0 0x100059eff in check_place(int, int, int) GAME.CPP:267
2018-11-20 21:53:38.845634+0200 tk3[90928:2348280]     #1 0x10005b24d in place_normal_game_crates() GAME.CPP:329
2018-11-20 21:53:38.845642+0200 tk3[90928:2348280]     #2 0x100069f67 in game() GAME.CPP:2316
2018-11-20 21:53:38.845656+0200 tk3[90928:2348280]     #3 0x10006c536 in menu() GAME.CPP:2481
2018-11-20 21:53:38.845669+0200 tk3[90928:2348280]     #4 0x10006d218 in main GAME.CPP:2598
2018-11-20 21:53:38.845682+0200 tk3[90928:2348280]     #5 0x7fff5d755084 in start (libdyld.dylib:x86_64+0x17084)
2018-11-20 21:53:38.845691+0200 tk3[90928:2348280] 
2018-11-20 21:53:38.845699+0200 tk3[90928:2348280] 0x61c00000e860 is located 32 bytes to the left of 1904-byte region [0x61c00000e880,0x61c00000eff0)
2018-11-20 21:53:38.845708+0200 tk3[90928:2348280] allocated by thread T0 here:
2018-11-20 21:53:38.845723+0200 tk3[90928:2348280]     #0 0x1009b4f53 in wrap_malloc (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x56f53)
2018-11-20 21:53:38.845740+0200 tk3[90928:2348280]     #1 0x7fff306ace65 in -[__NSArrayM insertObject:atIndex:] (CoreFoundation:x86_64h+0x2ce65)
2018-11-20 21:53:38.845750+0200 tk3[90928:2348280]     #2 0x7fff306e52d1 in ___CFBundleReadDirectory_block_invoke (CoreFoundation:x86_64h+0x652d1)
2018-11-20 21:53:38.845759+0200 tk3[90928:2348280]     #3 0x7fff306a528e in _CFIterateDirectory (CoreFoundation:x86_64h+0x2528e)
2018-11-20 21:53:38.845824+0200 tk3[90928:2348280]     #4 0x7fff306e50b1 in _CFBundleReadDirectory (CoreFoundation:x86_64h+0x650b1)
2018-11-20 21:53:38.845835+0200 tk3[90928:2348280]     #5 0x7fff306e4b86 in _createQueryTableAtPath (CoreFoundation:x86_64h+0x64b86)
2018-11-20 21:53:38.845850+0200 tk3[90928:2348280]     #6 0x7fff306e4102 in _copyQueryTable (CoreFoundation:x86_64h+0x64102)
2018-11-20 21:53:38.845862+0200 tk3[90928:2348280]     #7 0x7fff306e397e in _copyResourceURLsFromBundle (CoreFoundation:x86_64h+0x6397e)
2018-11-20 21:53:38.845871+0200 tk3[90928:2348280]     #8 0x7fff306e32d8 in _CFBundleCopyFindResources (CoreFoundation:x86_64h+0x632d8)
2018-11-20 21:53:38.845890+0200 tk3[90928:2348280]     #9 0x7fff306e8382 in CFBundleCopyResourceURL (CoreFoundation:x86_64h+0x68382)
2018-11-20 21:53:38.845902+0200 tk3[90928:2348280]     #10 0x7fff306f56f9 in _copyStringFromTable (CoreFoundation:x86_64h+0x756f9)
2018-11-20 21:53:38.845978+0200 tk3[90928:2348280]     #11 0x7fff306f5376 in CFBundleCopyLocalizedStringForLocalization (CoreFoundation:x86_64h+0x75376)
2018-11-20 21:53:38.846008+0200 tk3[90928:2348280]     #12 0x7fff2e558464 in _NSLocalizedServiceBundleString (AppKit:x86_64+0x961464)
2018-11-20 21:53:38.846025+0200 tk3[90928:2348280]     #13 0x7fff2df64d88 in -[_NSServiceEntry localizedTitle] (AppKit:x86_64+0x36dd88)
2018-11-20 21:53:38.846041+0200 tk3[90928:2348280]     #14 0x7fff2df64bba in -[_NSServiceEntry menuItemTitle] (AppKit:x86_64+0x36dbba)
2018-11-20 21:53:38.846055+0200 tk3[90928:2348280]     #15 0x7fff2df644df in __copySortedEntries_block_invoke (AppKit:x86_64+0x36d4df)
2018-11-20 21:53:38.846064+0200 tk3[90928:2348280]     #16 0x7fff5d800ed6 in _qsort (libsystem_c.dylib:x86_64+0x5fed6)
2018-11-20 21:53:38.846074+0200 tk3[90928:2348280]     #17 0x7fff2df642a2 in -[_NSServicesMenuUpdater insertServicesIntoMenu:withKeyEvent:isForDisplay:] (AppKit:x86_64+0x36d2a2)
2018-11-20 21:53:38.846089+0200 tk3[90928:2348280]     #18 0x7fff2df6415f in -[_NSServicesMenuUpdater updateMenu:withEvent:withFlags:] (AppKit:x86_64+0x36d15f)
2018-11-20 21:53:38.846158+0200 tk3[90928:2348280]     #19 0x7fff2df37f1c in -[_NSServicesPrincipalMenuUpdater updateMenu:withEvent:withFlags:] (AppKit:x86_64+0x340f1c)
2018-11-20 21:53:38.846170+0200 tk3[90928:2348280]     #20 0x7fff2de19c57 in -[NSMenu _populateWithEventRef:] (AppKit:x86_64+0x222c57)
2018-11-20 21:53:38.846179+0200 tk3[90928:2348280]     #21 0x7fff2df364e1 in -[NSCarbonMenuImpl _carbonPopulateEvent:handlerCallRef:] (AppKit:x86_64+0x33f4e1)
2018-11-20 21:53:38.846195+0200 tk3[90928:2348280]     #22 0x7fff2df36254 in NSSLMMenuEventHandler (AppKit:x86_64+0x33f254)
2018-11-20 21:53:38.846204+0200 tk3[90928:2348280]     #23 0x7fff2f9528d8 in DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) (HIToolbox:x86_64+0x88d8)
2018-11-20 21:53:38.846218+0200 tk3[90928:2348280]     #24 0x7fff2f951c15 in SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) (HIToolbox:x86_64+0x7c15)
2018-11-20 21:53:38.846279+0200 tk3[90928:2348280]     #25 0x7fff2f951a9b in SendEventToEventTargetWithOptions (HIToolbox:x86_64+0x7a9b)
2018-11-20 21:53:38.846293+0200 tk3[90928:2348280]     #26 0x7fff2f9ac82a in SendMenuPopulate(MenuData*, OpaqueEventTargetRef*, unsigned int, double, unsigned int, OpaqueEventRef*, unsigned char, unsigned char*) (HIToolbox:x86_64+0x6282a)
2018-11-20 21:53:38.846310+0200 tk3[90928:2348280]     #27 0x7fff2f9ac5c8 in PopulateMenu(MenuData*, OpaqueEventTargetRef*, CheckMenuData*, unsigned int, double) (HIToolbox:x86_64+0x625c8)
2018-11-20 21:53:38.846325+0200 tk3[90928:2348280]     #28 0x7fff2f9abce7 in Check1MenuForKeyEvent(MenuData*, CheckMenuData*) (HIToolbox:x86_64+0x61ce7)
2018-11-20 21:53:38.846334+0200 tk3[90928:2348280]     #29 0x7fff2f9ac49c in Check1MenuForKeyEvent(MenuData*, CheckMenuData*) (HIToolbox:x86_64+0x6249c)
2018-11-20 21:53:38.846347+0200 tk3[90928:2348280] 
2018-11-20 21:53:38.846355+0200 tk3[90928:2348280] SUMMARY: AddressSanitizer: heap-buffer-overflow GAME.CPP:267 in check_place(int, int, int)
2018-11-20 21:53:38.846419+0200 tk3[90928:2348280] Shadow bytes around the buggy address:
2018-11-20 21:53:38.846435+0200 tk3[90928:2348280]   0x1c3800001cb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2018-11-20 21:53:38.846445+0200 tk3[90928:2348280]   0x1c3800001cc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2018-11-20 21:53:38.846454+0200 tk3[90928:2348280]   0x1c3800001cd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2018-11-20 21:53:38.846462+0200 tk3[90928:2348280]   0x1c3800001ce0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2018-11-20 21:53:38.846480+0200 tk3[90928:2348280]   0x1c3800001cf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2018-11-20 21:53:38.846489+0200 tk3[90928:2348280] =>0x1c3800001d00: fa fa fa fa fa fa fa fa fa fa fa fa[fa]fa fa fa
2018-11-20 21:53:38.846498+0200 tk3[90928:2348280]   0x1c3800001d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2018-11-20 21:53:38.846559+0200 tk3[90928:2348280]   0x1c3800001d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2018-11-20 21:53:38.846570+0200 tk3[90928:2348280]   0x1c3800001d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2018-11-20 21:53:38.846584+0200 tk3[90928:2348280]   0x1c3800001d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2018-11-20 21:53:38.846593+0200 tk3[90928:2348280]   0x1c3800001d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2018-11-20 21:53:38.846607+0200 tk3[90928:2348280] Shadow byte legend (one shadow byte represents 8 application bytes):
2018-11-20 21:53:38.846616+0200 tk3[90928:2348280]   Addressable:           00
2018-11-20 21:53:38.846625+0200 tk3[90928:2348280]   Partially addressable: 01 02 03 04 05 06 07
2018-11-20 21:53:38.846638+0200 tk3[90928:2348280]   Heap left redzone:       fa
2018-11-20 21:53:38.846647+0200 tk3[90928:2348280]   Freed heap region:       fd
2018-11-20 21:53:38.846656+0200 tk3[90928:2348280]   Stack left redzone:      f1
2018-11-20 21:53:38.846664+0200 tk3[90928:2348280]   Stack mid redzone:       f2
2018-11-20 21:53:38.846691+0200 tk3[90928:2348280]   Stack right redzone:     f3
2018-11-20 21:53:38.846699+0200 tk3[90928:2348280]   Stack after return:      f5
2018-11-20 21:53:38.846710+0200 tk3[90928:2348280]   Stack use after scope:   f8
2018-11-20 21:53:38.846719+0200 tk3[90928:2348280]   Global redzone:          f9
2018-11-20 21:53:38.846727+0200 tk3[90928:2348280]   Global init order:       f6
2018-11-20 21:53:38.846741+0200 tk3[90928:2348280]   Poisoned by user:        f7
2018-11-20 21:53:38.846749+0200 tk3[90928:2348280]   Container overflow:      fc
2018-11-20 21:53:38.846757+0200 tk3[90928:2348280]   Array cookie:            ac
2018-11-20 21:53:38.846765+0200 tk3[90928:2348280]   Intra object redzone:    bb
2018-11-20 21:53:38.846773+0200 tk3[90928:2348280]   ASan internal:           fe
2018-11-20 21:53:38.846781+0200 tk3[90928:2348280]   Left alloca redzone:     ca
2018-11-20 21:53:38.846789+0200 tk3[90928:2348280]   Right alloca redzone:    cb
2018-11-20 21:53:38.846835+0200 tk3[90928:2348280] 
==90928==ABORTING

if ( level[( ( y + size ) / 20 ) *level_x_size + ( x / 20 ) ].type!= FLOOR ) ret = 1;

Player properties are mixed in co-op

Bug exists in TK321.

In single player game, player properties are as follows

  • Player [0]
    • Player 1 keys
    • Player 1 name
    • Red color

In co-op game, players are as follows

  • Player [0]
    • Player 2 keys
    • Player 1 name
    • Red color
  • Player [1]
    • Player 1 keys
    • Player 2 name
    • Green color

Shop and killing list after a level shows names wrong way around compared to what is set in Options.

It makes sense to have the keys inverted because normally primary player is playing with arrows on right and secondary player with WASD on left. It then matches the splitter screen. It's probably best to invert names. Also colors could be swapped so that player on arrow keys has red character when playing single player or co-op.

Name changing input accepts non-visible characters

If pressing buttons like Ctrl, Alt, Shift etc. during player name change (Options - Player Options - Change Pl[1,2] Keys), invisible characters are added. Characters should be filtered to only contain visible characters (+ maybe space).

Windows executable name should be GAME.EXE

Original game executable is "GAME.EXE" as opposed to "tk3.exe".

For non-Windows systems it might be beneficial to keep the name as tk3 so that it works well with packaged game.

CMake flags to speficy custom paths for game data and user options

This would make it possible to package rhe game for different systems. E.g. data to /usr/share, options to $HOME/.

Options should be read and written to options directory, and if they don't exist, then from game data directory.

Also add support for make install.

Network gaming support in web port

Implement network gaming support in web port. SDL Net uses TCP sockets which ain't available in browsers. Use WebRTC or similar approach to allow p2p connections.

Player name left empty

If escaping from name selection (instead of Enter), name is set to empty. Previously set name should be kept.

Simultaneously joining network clients can break the game

Issue is in original TK code, not in port.

If client joins to game but waits in "game info" (see below) it doesn't yet update "enabled" status of a new player on server side. Player only gets enabled when clients starts to send alive-messages which only happens during actual gameplay.

joining_game

If another player joins during one being in screen above, same player index is assigned by the server to new client. This leads to various panics and broken game.

Best fix might be to start sending alive-messages already in joining screen - but that still needs to be validated.

Keybindings in OPTIONS.CFG are not the same as in original

Keys: forward, backward, turn counter clockwise, turn clockwise, shoot, change weapon, strafe, strafe left, strafe right.
Player 1: up, down, left, right, ctrl, shift, alt gr, comma, period
Player 2: w, s, a, d, tab, caps lock, `, 1, 2

Segfault in Enemy::move()

Via @akheron

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055cd35509ca0 in Enemy::move(int, int) ()
[Current thread is 1 (Thread 0x7fbbf1d93740 (LWP 11856))]
(gdb) bt
#0  0x000055cd35509ca0 in Enemy::move(int, int) ()
#1  0x000055cd3551d262 in move_enemies() ()
#2  0x000055cd35520399 in game_shit() ()
#3  0x000055cd35525515 in game() ()
#4  0x000055cd35526080 in menu() ()
#5  0x000055cd35502ef8 in main ()

High CPU load

CPU load is high especially in menus and while game is in background.

utk_cpu_load
(Sorry about language.)

Network game issues

Can be splitted to several issues if needed.

  • Client joining while "Cooperative" (instead of "Deathmatch") mode is selected breaks the game
    • Force "Deathmatch" while client is joining a game
    • Fixed in #148
  • Messages not propagated correctly (kill messages as least)
    • Messages to clients missing
    • Host getting double notification
  • Holding the game (e.g. dragging window) can lead client timeout (expected) but only partial "reconnect"
    • Disconnect entirely on server side or propagate re-joining to other clients (#153)
  • Smoke not visible for clients (bug or feature?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.