|
This thread is locked; no one can reply to it. |
1
2
|
Speedhack: SpikedFruits |
Bob
Free Market Evangelist
September 2000
|
My speedhack entry. I'm too tired to write about it now. EDIT: Fix for ATI (and hopefully Intel) users now included. EDIT2: Linux Fix #1: Edit gamestate.cpp, function set_map() and change: this->switch_to_map = ~0; To: this->switch_to_map = ~0u;
-- |
Billybob
Member #3,136
January 2003
|
The effects were too much for my laptop's video card, it seems. When I grabbed a fruit it would lockup until the effect stopped. I'll try it on my desktop tomorrow. Looks slick, though, from what I could see.
|
Bob
Free Market Evangelist
September 2000
|
I make liberal use of glCopyTexImage(). I suppose it's not all that fast on non-Nvidia cards. One thing you can try is to force NV_texture_rectangle to be used by replacing render.cpp, lines 538 from: GLenum target = allegro_gl_extensions_GL.NV_texture_rectangle | allegro_gl_extensions_GL.ARB_texture_rectangle ? GL_TEXTURE_RECTANGLE_NV : GL_TEXTURE_2D; to: GLenum target = GL_TEXTURE_RECTANGLE_NV; Same for lines 415 and 481. I think ATI exposes a similar extension (EXT_texture_rectangle) that is undocumented. EDIT: I've done some fixes in the code. Looks like I've been liberally using non-power-of-two textures, which aren't well supported on non-NV cards. The latest executable+source should have some quick fixes that ought to help. -- |
Neil Walker
Member #210
April 2000
|
Looks good. I see you pinched the font from hamsterball Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
miran
Member #2,407
June 2002
|
The opening screen, the music and the menu work, but when I want to play, the game crashes: Shutting down Allegro due to signal #11 Segmentation fault Judging by the screenshots we had some pretty similar ideas, although my implementation was a lot less sophisticated... -- |
Bob
Free Market Evangelist
September 2000
|
Quote: when I want to play, the game crashes: Any chance you can get me a stack trace? -- |
miran
Member #2,407
June 2002
|
How would I get that? -- |
Felipe Maia
Member #6,190
September 2005
|
Really neat for a SH entry, well done. |
LennyLen
Member #5,313
December 2004
|
Quote: How would I get that? Er, the usual way? Running GDB (I assume you compiled with GCC, hopefully with debugging info on) and then typing bt at it's prompt.
|
miran
Member #2,407
June 2002
|
Thank you. (gdb) run Starting program: /home/miran/games/SH06/bob - Spiked Fruits/game [Thread debugging using libthread_db enabled] [New Thread 46912510335968 (LWP 12599)] [New Thread 1084238144 (LWP 12616)] [New Thread 1095223616 (LWP 12617)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46912510335968 (LWP 12599)] 0x000000000040aae5 in gamestate_t::set_map () (gdb) bt #0 0x000000000040aae5 in gamestate_t::set_map () #1 0x000000000040a676 in gamestate_t::update_logic () #2 0x000000000040d7fb in main_menu_t::update_logic () #3 0x000000000040d4f9 in main ()
-- |
Bob
Free Market Evangelist
September 2000
|
Can you compile with -g3 and without -O3? That should also give you line numbers. (set_map() has way too many lines of code). -- |
miran
Member #2,407
June 2002
|
(gdb) run Starting program: /home/miran/games/SH06/bob - Spiked Fruits/game [Thread debugging using libthread_db enabled] [New Thread 46912510335968 (LWP 30651)] [New Thread 1084238144 (LWP 30654)] [New Thread 1095223616 (LWP 30655)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46912510335968 (LWP 30651)] 0x000000000041f00e in gamestate_t::set_map (this=0x87ded0, map_id=18446744073709551615) at src/gamestate.cpp:673 673 this->player[0].pos.x = map->player[0].start.x; (gdb) bt #0 0x000000000041f00e in gamestate_t::set_map (this=0x87ded0, map_id=18446744073709551615) at src/gamestate.cpp:673 #1 0x000000000041f5f5 in gamestate_t::update_logic (this=0x87ded0) at src/gamestate.cpp:599 #2 0x000000000042400c in main_loop (game=0x87ded0) at src/main.cpp:39 #3 0x0000000000425245 in main_menu_t::update_logic (this=0x7596c0) at src/main.cpp:237 #4 0x000000000042400c in main_loop (game=0x7596c0) at src/main.cpp:39 #5 0x0000000000425584 in main () at src/main.cpp:121
-- |
Bob
Free Market Evangelist
September 2000
|
Quote:
0x000000000041f00e in gamestate_t::set_map (this=0x87ded0, Something is definitely here. Edit: Try editing gamestate.cpp, function set_map() and change: this->switch_to_map = ~0; To: this->switch_to_map = ~0u; Does this help? -- |
miran
Member #2,407
June 2002
|
Quote: Does this help? Yes. And the game looks amazing! Real eyecandy! EDIT: But now it exits randomly after 20 or so seconds. EDIT: Or maybe a few seconds after picking up the coconut. (gdb) run Starting program: /home/miran/games/SH06/bob - Spiked Fruits/game [Thread debugging using libthread_db enabled] [New Thread 46912510335968 (LWP 13248)] [New Thread 1084238144 (LWP 13251)] [New Thread 1095223616 (LWP 13256)] [Thread 1095223616 (LWP 13256) exited] w[Thread 1084238144 (LWP 13251) exited] wwAssert failed at line 355 of ./src/color.c Program received signal SIGABRT, Aborted. [Switching to Thread 46912510335968 (LWP 13248)] 0x00002aaaab3fe4f5 in raise () from /lib64/libc.so.6 (gdb) bt #0 0x00002aaaab3fe4f5 in raise () from /lib64/libc.so.6 #1 0x00002aaaab3ffe40 in abort () from /lib64/libc.so.6 #2 0x00002aaaaad3bc23 in al_assert (file=0x2aaaaadf2944 "./src/color.c", line=355) at ./src/allegro.c:569 #3 0x00002aaaaad4b74c in hsv_to_rgb (h=-1.59837306, s=1, v=1, r=0x7fffffe59f94, g=0x7fffffe59f90, b=0x7fffffe59f8c) at ./src/color.c:355 #4 0x0000000000425d37 in renderer_t::apply_blend_effect (this=0x87dfc0, p=3, tick=301.00058555603027) at src/render.cpp:648 #5 0x000000000041d0c3 in coconut_effect_t::draw (this=0x737a80, render=0x87dfc0, in_player_view=0) at src/effect.cpp:309 #6 0x00000000004256b0 in renderer_t::draw_big_effects (this=0x87dfc0, in_player_view=0) at src/render.cpp:326 #7 0x00000000004288f3 in renderer_t::draw (this=0x87dfc0) at src/render.cpp:681 #8 0x000000000041f58e in gamestate_t::update_display (this=0x87ded0) at src/gamestate.cpp:637 #9 0x0000000000424046 in main_loop (game=0x87ded0) at src/main.cpp:42 #10 0x000000000042524d in main_menu_t::update_logic (this=0x7596c0) at src/main.cpp:237 #11 0x0000000000424014 in main_loop (game=0x7596c0) at src/main.cpp:39 #12 0x000000000042558c in main () at src/main.cpp:121
-- |
Bob
Free Market Evangelist
September 2000
|
Odd. Somehow, Allegro thinks v > 1, but here's the call to hsv_to_rgb in render.cpp: hsv_to_rgb(rotate, 1, 1, &r, &g, &b); Why is 1 getting rounded to anything but 1.0? Maybe try replacing it by 0.9999 and see if that helps? -- |
miran
Member #2,407
June 2002
|
Nope, but adding this before that function call does help: while (rotate < 0) { rotate += 360.0; } while (rotate > 360.0) { rotate -= 360.0; }
-- |
Bob
Free Market Evangelist
September 2000
|
Ahh I remember now. You need a more recent version of Allegro There was an assert in hsv_to_rgb() that didn't make any sense (the one you're apparently hitting) and thus was removed. -- |
Jonny Cook
Member #4,055
November 2003
|
Hey cool effects! Kind of makes me dizzy. Oh wait, maybe that's because I'm sleep deprived... The face of a child can say it all, especially the mouth part of the face. |
miran
Member #2,407
June 2002
|
Quote: Kind of makes me dizzy. You shouldn't even attempt to look at my game then. I've been seasick all day. A couple of times I thought I was going to throw up and I'm not even exaggerating! -- |
MiquelFire
Member #3,110
January 2003
|
The insanity effect in my game could cause you to become insane! --- |
Matthew Leverton
Supreme Loser
January 1999
|
Quote: map id of 18446744073709551615 Leave it to Bob to find a way to create that many maps. |
Billybob
Member #3,136
January 2003
|
Stupid game, I was one pixel away from getting that fruit and time ran out
|
Onewing
Member #6,152
August 2005
|
Wow. I go hide now... ------------ |
Neil Walker
Member #210
April 2000
|
I get music, but it crashes immediately after that, #0 0x00000000 in ?? () Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Bob
Free Market Evangelist
September 2000
|
Did you compile with AGL 0.4.0+ and Allegro 4.2+? -- |
|
1
2
|