Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish Soccer Mode #1031

Closed
supertuxkart-sourceforge-migration opened this issue Feb 24, 2014 · 20 comments
Closed

Finish Soccer Mode #1031

supertuxkart-sourceforge-migration opened this issue Feb 24, 2014 · 20 comments

Comments

@supertuxkart-sourceforge-migration

Author: hikerstk

Soccer mode is mostly finish, except (based on Funto's posting):

  • counting and displaying scores
  • finding and implementing a way to see which team your kart belongs to (I wanted to use shaders to change the karts' colors)
  • maybe change the ball size
  • some UI tweaking

I am not sure if changing the kart colors would be necessary, at this stage we have at best 4 people playing, and each of them can certainly remember with whom he is playing.

Re change ball size: that might also perhaps be change ball shape. It will still look like a ball, but perhaps a 'puck' like shape would work better (i.e. avoid the ball bouncing too much). Or perhaps increase gravity for the ball, ... playtesting needed.

@supertuxkart-sourceforge-migration

Author: auria
I did some playtesting and here are the points I noted should be completed (this is only to help us get an idea of what is done and what remains to be done)

  • The "start" button in the team selection screen cannot be pressed using keyboard/gamepad, only mouse works. Must investigate why
  • At the top, where points are displayed, it would be nice to have a way to show which points belong to red team and which points belong to blue team. Maybe just show a colored circle around the head of the team-leader's face?
  • Goals should be a little more dramatic. Some text should be written on-screen, a sound should be played, some particles where the ball disappeared, etc.
  • The ball is too big, when trying to move it, often the kart goes under the ball instead of pushing it

@supertuxkart-sourceforge-migration

Author: auria
Sorry, forgot one :

  • When the game is over, the scores displayed at the end are incorrect (the same kart appeared twice)

@supertuxkart-sourceforge-migration

Author: auria
Found a new one :

  • Points are given to the wrong team, at this time, the one with most points is the one that should lose

@supertuxkart-sourceforge-migration

Author: auria
I merged the soccer branch to trunk, so further development should happen on trunk I think

@supertuxkart-sourceforge-migration

Author: auria
Yet another problem, this one quite minor and in the exporter :

  • Soccer balls marked in blender are not correctly marked by the exporter

@supertuxkart-sourceforge-migration

Author: deveee
I solved some little issues. Now I see three problems:

  • "The "start" button in the team selection screen cannot be pressed using keyboard/gamepad, only mouse works", as Auria said
  • when you click restart, game starts without thunderbird
  • some karts (Nolok, perhaps others) don't have blue/red arrow above

@supertuxkart-sourceforge-migration

Author: totoplus062
We should change the ball physics + sound
http://forum.freegamedev.net/viewtopic.php?f=18&t=3962&p=50569#p50569

@supertuxkart-sourceforge-migration

Author: deveee
Most of issues are fixed now (I hope ;p). There is still problem with:

  • highscore list
  • remember number of goals to win
  • I'm not sure if reset karts position after goal is needed

And of course:

  • better physics
  • better sounds
  • better graphics

@supertuxkart-sourceforge-migration

Author: deveee
For me, gui is now good enough. If there won't be problems, I'd like to leave it as it is.

Still should be improved physics, sounds, perhaps graphics.

@supertuxkart-sourceforge-migration

Author: yasin-ghannam
Modified the result screen at the end of the game. Looks more like real soccer ones. It now displays who won, the scores, and the scorers, each with his icon and the time he scored the goal in.
The scorers are identified (naively) as the last person to hit the ball before a goal occured. This has two drawbacks:

  • The ball could hit or touch a different player before it goes in.
  • A kart could score a goal by firing a bowling ball at the soccer ball, but the scorer will be the last kart to hit the ball before that.
    The second issue is easier to fix I think.

Something else to do, are victory laps. It would be a nice visual effect while the results are shown.

@supertuxkart-sourceforge-migration

Author: yasin-ghannam
Fixed the second drawback.(Identifying the projectile owner as a ball hit)

@supertuxkart-sourceforge-migration

Author: deveee
Now race result looks much better :) But...

  • there is a lot of compiler warnings in gcc and visual c++
  • game crashes on race result when is compiled using visual c++ 2010
  • on 800x600 resolution kart icon is drawn on time text. higher resolution not tested, but I suppose that distance has absolute value. it could be relative, for example 1.5*icon_width

@supertuxkart-sourceforge-migration

Author: deveee
Actually it doesn't matter vc++ or gcc. It crashes there:

race_result_gui.cpp:
std::string path = "../karts/" + kartName + "/" + kartName + "icon.png";
scorerIcon = irr_driver->getTexture(file_manager->getTextureFile(path));
sourceRect = core::recti(core::vector2di(0,0), scorerIcon->getSize());

Some karts (eg. konqi) have icons named konqi_icon.png, not konqiicon.png. Or other names for example ablablabladupajasia.png ;)

@supertuxkart-sourceforge-migration

Author: deveee

on 800x600 resolution kart icon is drawn on time text (...)

Actually not depends on resolution, but on lenght of the kart name. Easy to notice with elephant kart. But similar problem is also with vertical position.

Also to do:

  • karts names are not translated
  • "blue/red team wins" text is black

@supertuxkart-sourceforge-migration

Author: yasin-ghannam
Fixed:

  • Crashing because of icon names.
  • Icon placement fixed. In 800*600 you can see the icon is a tiny bit under the name. In other resultions it's good.

The "Red Team Wins" message appears red as usual. Only the "Blue Team Message" appears black.

@supertuxkart-sourceforge-migration

Author: deveee
Unfortunately still crashes :( You can see logs.

main: Exception caught : basic_string::substr.
main: Aborting SuperTuxKart.

...

Program received signal SIGABRT, Aborted.
0x00007ffff5f9f037 in GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: Nie ma takiego pliku ani katalogu.
(gdb) bt full
#0 0x00007ffff5f9f037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 6117
selftid = 6117
#1 0x00007ffff5fa2698 in __GI_abort () at abort.c:90
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0, 19527992, 140737351945365, 5, 0, 1, 140737319988456,
216734184, 19527992, 173214736, 140737351972645, 140737353787224, 18446744073709551615, 1, 140737353789584, 216736688}}, sa_flags = 10,
sa_restorer = 0x7ffff7faa780}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007ffff68abe8d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#3 0x00007ffff68a9f76 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#4 0x00007ffff68a9fa3 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#5 0x00007ffff68aa1de in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#6 0x00007ffff68fc9ad in std::__throw_out_of_range(char const
) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#7 0x00007ffff6908a23 in std::string::substr(unsigned long, unsigned long) const () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#8 0x000000000095bcf9 in RaceResultGUI::displaySoccerResults (this=0xceb6980)
at /home/Dokumenty/linux/supertuxkart-git/src/states_screens/race_result_gui.cpp:920
kartName = {static npos = ,
_M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0xceb4d38 "beagle"}}
iconFile = {static npos = ,
_M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, },
_M_p = 0x4b87338 "data/karts/beagle/beagle_icon.png"}}
offsetX = 20415680
i = 0
soccerWorld = 0xbbe59a0
teamScore = {2, 0}
blueTeamIcon = 0xceba3f0
scoreTimes = {<std::_Vector_base<float, std::allocator >> = {
_M_impl = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_start = 0xceb68b0,
_M_finish = 0xceb68b8, _M_end_of_storage = 0xceb68b8}}, }
centerX = 512
scorerIcon = 0x300
resultText = {array = 0xceb18e0 L"beagle 00:05:35", allocated = 16, used = 16, allocator = {
_vptr.irrAllocator = 0xdb77b0 <vtable for irr::core::irrAllocator<wchar_t>+16>}}
color = {color = 4294967295}
currX = 288
currY = 213
redTeamIcon = 0xceac7c0
destRect = {UpperLeftCorner = {X = 704, Y = 84}, LowerRightCorner = {X = 768, Y = 148}}
scorers = {<std::_Vector_base<int, std::allocator >> = {
_M_impl = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_start = 0xceb49e0,
_M_finish = 0xceb49e8, _M_end_of_storage = 0xceb49e8}}, }
font = 0x1ea3c40
ri = 0xceb4a00
pos = {UpperLeftCorner = {X = 288, Y = 213}, LowerRightCorner = {X = 288, Y = 213}}
sourceRect = {UpperLeftCorner = {X = 0, Y = 0}, LowerRightCorner = {X = 128, Y = 128}}
#9 0x000000000095a0fa in RaceResultGUI::renderGlobal (this=0xceb6980, dt=0.0170000009)
at /home/Dokumenty/linux/supertuxkart-git/src/states_screens/race_result_gui.cpp:665
ri = 0xceb4a00
x = 945.664001
y = 64
i = 0
isSoccerWorld = true
__PRETTY_FUNCTION
* = "virtual void RaceResultGUI::renderGlobal(float)"
num_karts = 2
---Type to continue, or q to quit---
v = 4608
#10 0x00000000009596a0 in RaceResultGUI::onUpdate (this=0xceb6980, dt=0.0170000009)
at /home/Dokumenty/linux/supertuxkart-git/src/states_screens/race_result_gui.cpp:489
No locals.
#11 0x00000000007b41d5 in GUIEngine::render (elapsed_time=0.0170000009) at /home/Dokumenty/linux/supertuxkart-git/src/guiengine/engine.cpp:1159
gamestate = GUIEngine::INGAME_MENU
#12 0x0000000000776c78 in IrrDriver::update (this=0x12f45c0, dt=0.0170000009) at /home/Dokumenty/linux/supertuxkart-git/src/graphics/irr_driver.cpp:1690
world = 0xbbe59a0
inRace = true
#13 0x0000000000892b21 in MainLoop::run (this=0x1b60430) at /home/Dokumenty/linux/supertuxkart-git/src/main_loop.cpp:163
dt = 0.0170000009
device = 0x12f4640
#14 0x0000000000890bc8 in main (argc=6, argv=0x7fffffffe768) at /home/Dokumenty/linux/supertuxkart-git/src/main.cpp:1531
materials_file = {static npos = ,
_M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, },
_M_p = 0xa5a7818 "data/models/materials.xml"}}
important_message = {array = 0xb2296d0 L"", allocated = 1, used = 1, allocator = {
_vptr.irrAllocator = 0xdb77b0 <vtable for irr::core::irrAllocator<wchar_t>+16>}}

@supertuxkart-sourceforge-migration

Author: deveee
Okey, I fixed it in svn.

About blue text... IMO standard color - SColor(255, 255, 255, 255) - looks better. We could use it for both red and blue team and there won't be problem with blue color.

@supertuxkart-sourceforge-migration

Author: deveee
Main problem in physics is that if ball is very close to the edge of field (bands?) it is hard to move it from there to the center of field. The ball should bounce from the bands a little more.

Generally it should bounce more from everything, also karts.

@supertuxkart-sourceforge-migration

Author: hikerstk
In r14423-r14425 a push back from the side of the stadium was added to avoid that the ball is getting stuck there.

The rest (if anything ... I am a bit confused) is postponed till after 0.8.1.

@supertuxkart-sourceforge-migration

Author: hikerstk
OK, after a discussion with auria I'll close this ticket now. Please open a new one for additional improvements if necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant