Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » MinorHack Attack!

This thread is locked; no one can reply to it. rss feed Print
MinorHack Attack!
CGamesPlay
Member #2,559
July 2002
avatar

Quote:

Why not? :) OK, I guess my entry is going to get beaten by a circle and a stickman, but something like this happened every single time I went for technology during some kind of fast coding compo, so I think I'm used to it. :)

It's okay. This is my competition and I haven't won once yet :)

[append]
Added a "Current Time" display on the time zone selector. This should alleviate a lot of the problems.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Kikaru
Member #7,616
August 2006
avatar

KK, do think you could tell me what library you are using for the 3D?

[EDIT]
Is someone going to do the score count?

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

KK, do think you could tell me what library you are using for the 3D?

None and that's the beauty of my entry. :) It's simple raycaster with generated textures and sliding collisions 100% written during 1 hour. :)

EDIT: Unless you meant my other projects, which are mostly AllegroGL+OpenGL and Direct3D from time to time. :)

Kikaru
Member #7,616
August 2006
avatar

I stand in awe of your Raycasting! Probably would have been best in a 2 or 3 hour comp. Also, could someone give me a link to where I can download OpenGL?

Thomas Fjellstrom
Member #476
June 2000
avatar

Id have liked to try KK's, but sadly, It uses timeGetTime >:E

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

Id have liked to try KK's, but sadly, It uses timeGetTime >:E

Copy the code below, put it to a file named "winalleg.h" and place in the directory where you try to compile my entry. It should solve this problem.

#include <sys/time.h>

unsigned long long timeGetTime()
{
        timeval T;
        gettimeofday(&T,0);
        return ((long long)T.tv_sec)*1000+T.tv_usec/1000;
}

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

4191.cpp:224: warning: control reaches end of non-void function

moose@natasha ~ $ ./4191
Shutting down Allegro due to signal #11
Segmentation fault

(gdb) run
Starting program: /home/moose/4191

Program received signal SIGSEGV, Segmentation fault.
0xb7eaf198 in _stub_bank_switch () from /usr/lib/liballeg.so.4.2
(gdb) bt
#0  0xb7eaf198 in _stub_bank_switch () from /usr/lib/liballeg.so.4.2
#1  0x08048e7e in bmp_write_line (bmp=0x807a100, lyne=0) at al386gcc.h:46
#2  0x08048eba in _putpixel32 (bmp=0x807a100, x=0, y=0, color=29497) at draw.inl:513
#3  0x08049594 in trace (x=0) at 4191.cpp:163
#4  0x080496e3 in raycast () at 4191.cpp:190
#5  0x08049a80 in main () at 4191.cpp:247
(gdb)

edit: append:

Program received signal SIGSEGV, Segmentation fault.
0xb7ed149d in _stub_bank_switch (bmp=0x0, y=134718072) at cmisc.c:29
29         return (uintptr_t)bmp->line[y];
Current language:  auto; currently c
(gdb) bt
#0  0xb7ed149d in _stub_bank_switch (bmp=0x0, y=134718072) at cmisc.c:29
#1  0x08048e7e in bmp_write_line (bmp=0x807a278, lyne=0) at al386gcc.h:46
#2  0x08048eba in _putpixel32 (bmp=0x807a278, x=0, y=0, color=29497) at draw.inl:513
#3  0x08049594 in trace (x=0) at 4191.cpp:163
#4  0x080496e3 in raycast () at 4191.cpp:190
#5  0x08049a80 in main () at 4191.cpp:247

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Kikaru
Member #7,616
August 2006
avatar

OK, so where do I download OpenGL? I did a Google search, but I can't find the actual download for the library.

Thomas Fjellstrom
Member #476
June 2000
avatar

OpenGL comes with your operating system. Your compiler should generally include OpenGL headers.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

Shutting down Allegro due to signal #11
Segmentation fault

Well, I have no idea what _putpixel32 does on your system, but for me it always behaved as "(((*int)(bmp->line[y]))[x]=color)" macro. Maybe I did something wrong, but I never thought you actually had to do anything extra to use _putpixel32 with memory bitmap. :)

Thomas Fjellstrom
Member #476
June 2000
avatar

It should be working afaik. Maybe theres a bug in the C version? I dunno.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

BAF
Member #2,981
December 2002
avatar

CGames: BAFServ has been PHP 5.0.4 since the big reimage. Before that it was 5.1.

Kikaru
Member #7,616
August 2006
avatar

It comes with windows XP?

relpatseht
Member #5,034
September 2004
avatar

Yes, OpenGL comes with Windows XP, and its header files come with all respectable compilers. However, the version of OpenGL that comes with Windows XP is very old and mostly done in software. You will want to get drivers for your graphics card so that OpenGL is done in hardware, which odds are you have already done.

Ron Ofir
Member #2,357
May 2002
avatar

I think 30th same time would awesome.

CGamesPlay
Member #2,559
July 2002
avatar

Does anyone else have a problem with 30th at 1800 UTC?

Quote:

CGames: BAFServ has been PHP 5.0.4 [bafserv.com] since the big reimage. Before that it was 5.1.

http://www.php.net/manual/en/function.date-default-timezone-get.php :-/

Tomasu: Maybe check the linking consistency of your Allegro? Did you upgrade gcc without recompiling?

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

Does anyone else have a problem with 30th at 1800 UTC?

I might be out for that weekend, but I'm not completely sure at the moment. :)

Kikaru
Member #7,616
August 2006
avatar

Sounds good! I am definitely in. :)

CGamesPlay
Member #2,559
July 2002
avatar

Competition link.

Why don't you guys make sure the times are right before the day of the compo, eh? ;)

I added a "Current Time" field on the prefs page, so it should be easier.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Kikaru
Member #7,616
August 2006
avatar

One problem with the "trigonometric functions" rule: I don't know how to use them. :-/

Also, is anyone going to do a score count?

CGamesPlay
Member #2,559
July 2002
avatar

Onewing: 7
Kikaru: 7
CGamesPlay: 6
Krzysztof: 4

Two first place winners! Good job, everybody. Let's keep this thread going until the 30th ::)

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Wow! I'm first again! ;D (counting from the other end of the list, but who cares) ;D

Congratulations to all entrants! :)

Thomas Fjellstrom
Member #476
June 2000
avatar

CGames said:

Did you upgrade gcc without recompiling?

Nein. its a new install... I can try reinstalling it. but I dunno.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Onewing
Member #6,152
August 2005
avatar

The 30th eh? I might be out of town then. Actually, I hope I'm out of town. :)

------------
Solo-Games.org | My Tech Blog: The Digital Helm

CGamesPlay
Member #2,559
July 2002
avatar

Come on, you're the only other one who has been in all 3 :)

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>



Go to: