Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » The 2004 Allegro ScreenHack

This thread is locked; no one can reply to it. rss feed Print
The 2004 Allegro ScreenHack
lillo
Member #303
April 2000
avatar

D'oh!!

Under my IDE on OSX that line was shown to be 80 characters... This is a side effect of using a binary string for data... even if I only used characters 96-223 (7 bit) exactly to avoid this!

Anyway, it's now fixed. And I also fixed another little bug with mines :)
BTW, also changed color back to cyan; I also liked it more, but the use of white was not random: I needed the constant "15" on other places of the code too, so... But now I optimized things a bit and made it possible to use cyan again. Actually you can change the color to whatever you like without other consequences: just modify the "c" variable, declared at line 2.

--
Angelo Mottola
lillo AT users DOT sourceforge DOT net
Enhanced Creations++

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

And I also fixed another little bug with mines

I thought that was a feature. They had really cool movement (although a bit illogical). :)

lillo
Member #303
April 2000
avatar

The bug was their vertical speed was not limited while it should have been. Now they still chase you, but when you approach them their speed will be high instead of very high. And maybe now they're more deadly as their horizontal speed is a bit higher than the player's one, so you can't step back easily to destroy them if they're near you...

--
Angelo Mottola
lillo AT users DOT sourceforge DOT net
Enhanced Creations++

Marcello
Member #1,860
January 2002
avatar

My highscore on this version was 481, while ~340 on the previous.

For some reason my keyboard doesn't like up+left at the same time, that really cramps my style. Any chance on a non 80x25 version with either key config, or gamepad support?

Marcello

Krzysztof Kluczek
Member #4,191
January 2004
avatar

I played it a bit too and got 1719. ;D

lillo: maybe you could replace space key with a Ctrl or Alt? Keyboards should behave better with eg. Ctrl still held down than with space (on mine space key wasn`t any problem). :)

[edit: new highscore: 2751 ;D]

Goodbytes
Member #448
June 2000
avatar

I'm still here! Just bogged down with work. I'm not going to disappear into a black hole or anything. I am currently both
(a) very busy, and
(b) very not finished my entry and deciding to unfairly extend the competition until I'm done
But I'll try to finish it up. Basically I just have to compress the thing. And it's really nothing overly special, so don't expect something logical, like it being a good entry since I had lots of time.

Anyway this thing will be wrapping up soon.


--
~Goodbytes

Billybob
Member #3,136
January 2003

post code and we'll compress it. ;D

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Could I post my new project for a little compression? ;)

I think I`ll manage to do it myself since I need only few bytes. I`m writing a Rogue-like Hack`n`Slash RPG with experience, spells, items, monsters, dynamically generated dungeons and everything what RPG should have. :) I have a beta written but it still needs a lot of balancing. Any beta-testers? ;D

I think, we should make 4096 bytes code competition someday. Nice game engine can be fit in 2k and there will be another 2k for really nice gameplay. This could be very interesting. :)

Pyykkö
Member #4,375
February 2004
avatar

I wrote this about two weeks ago, try to escape from The Dungeon Of Infinitum ;)

1#include "allegro.h"
2#define a(z){px+=cos(pa)*z;py+=sin(pa)*z;}
3#define b blit(dblbuf,screen,0,0,0,0,320,240)
4#define c pa+((float)(sx-160)/160.0)
5#define d 6.283185
6#define e(y,x,w) for(y=0;y<x;y+=w)
7#define f clear_bitmap(dblbuf)
8#define g(u,v) textprintf_ex(dblbuf,font,u,v,255,0,
9static volatile int t;static void tmr(void){t++;}END_OF_FUNCTION(tmr);int main(
10void){float px,py,px2,py2,pa;int sx,tx,ty;float vx,vy,vd;float vdm;BITMAP*dblbuf
11;char map[4096];allegro_init();install_keyboard();install_timer();set_color_dep\
12th(32);set_gfx_mode(GFX_AUTODETECT,320,240,0,0);LOCK_VARIABLE(t);LOCK_FUNCTION(\
13tmr);install_int_ex(tmr,23863);dblbuf=create_bitmap(320,240);e(sx,4096,1){map[s\
14x]=(rand()*sx)&15;if(map[sx]<9)map[sx]=0;}f;g(100,8)"Lichtenstein 3D 2");g(0,24)
15"You woke up in a cave without any idea");g(0,32)"who you are or where you are.\
16");g(0,40)"All you know is that you have to escape.");g(70,64)"Press EnTER to c\
17ontinue");b;while((readkey()>>8)!=KEY_ENTER);px=py=pa=0;while(!key[KEY_ESC]){if(
18key[KEY_LEFT])pa-=0.05;if(key[KEY_RIGHT])pa+=0.05;if(pa<0)pa=d+pa;if(pa>d)pa=pa-
19d;px2=px;py2=py;if(key[KEY_UP])a(0.1);if(key[KEY_DOWN])a(-0.1);tx=(int)px&63;ty=
20(int)py&63;if(map[ty*64+tx]){px=px2;py=py2;}t--;while(t<0);if (t<1){clear_bitmap
21(dblbuf);e(sx,320,4){vd=0;vdm=0.5;vx=cos(c)*vdm;vy=sin(c)*vdm;while(vd<128&&vd>=
220){vd+=vdm;tx=(int)(px+vx*vd)&63;ty=(int)(py+vy*vd)&63;if (map[ty*64+tx]){if (v\
23dm!=0.125){vd-=vdm;vx/=2;vy/=2;vdm/=2;}else vd=-vd;}}if (vd<0){vd=-vd;rectfill(
24dblbuf,sx,120-240/vd,sx+3,120+240/vd,(map[ty*64+tx]*17)*(1-(vd/128)));}}b;}}ret\
25urn(0);}END_OF_MAIN();

CGamesPlay
Member #2,559
July 2002
avatar

KK: Call it 100h and allow people that many bytes in their source. I almost did that, but it evolved into ACG.

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

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

Billybob
Member #3,136
January 2003

Don't you mean 1000h? Not sure you can do much of anything in 100h.

Krzysztof Kluczek
Member #4,191
January 2004
avatar

I meant 1000h of course (4096b). :) Maybe I`ll think about organizing it (unless Goodbytes would like to do it - he has much more experience in this) but not too soon since we have ScreenHack now. :)

btw. I`ll check and I`ll try to fit some thing into 100h. :) Anyway I made <100h (248b exactly) .com dos demo which was animated Julia set (but it was in asm and I put restriction on executable so I had more space).

LSd016
Member #3,561
May 2003

Quote:

Not sure you can do much of anything in 100h.

I've seen a wolf-like 3d engine in 100h. I don't have it anymore though.

____________________________________________
[update soon]

Billybob
Member #3,136
January 2003

100h of source code, or a 100h executable? 100h executable, that seems alright, but 100h of source is only 80x3.2, heh.

LSd016
Member #3,561
May 2003

obviously it was a headerles executable for dos - .com

____________________________________________
[update soon]

Niunio
Member #1,975
March 2002
avatar

Krzysztof Kluczek said:

I think, we should make 4096 bytes code competition someday. Nice game engine can be fit in 2k and there will be another 2k for really nice gameplay.

Videopac G7000 game executables have 2Kb wide...

And for those that are waiting for the ScreenHack collection, I am too busy now, but I was test all entries of the first page and selected some of them. I'll try to upload it this week-end.

-----------------
Current projects: Allegro.pas | MinGRo

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Actually, I was thinking about 4kb limit for source code size. :)

Niunio
Member #1,975
March 2002
avatar

...80x25=2000...

4kb would be cool too.

[side note]Wow, this tread is pretty big...

GB, finish you entry soon, before Matthew close this madness!

-----------------
Current projects: Allegro.pas | MinGRo

CGamesPlay
Member #2,559
July 2002
avatar

Niunio: That's what pages are for. Actually, I hated pages until I decided to split up threads on the 100 marks, because it was taking so long to render.

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

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

Marcello
Member #1,860
January 2002
avatar

Quote:

Videopac G7000 game executables have 2Kb wide...

That's some mad image compression.

Marcello

Niunio
Member #1,975
March 2002
avatar

Marcello: What? Image compression?

VG7K was a video-game console from late '70. I have some original cartridges that announces Memory Extended 4Kb:o

-----------------
Current projects: Allegro.pas | MinGRo

Billybob
Member #3,136
January 2003

Wow, this combo has almost gone on for an entire month :P

Ryan Broomfield
Member #3,126
January 2003

please end it so we can vote ;)

shippay

Krzysztof Kluczek
Member #4,191
January 2004
avatar

I think this competition is taking a bit too long too. :P

Well, maybe I`ll manage to finish my 80x25 RPG (some balancing left) although I`m not working on it too hard (read: recently not at all). :P

btw. I wonder if I was writing multiplayer game would I be allowed do make two apps: 80x25 server and 80x25 client for it? ;D

Goodbytes
Member #448
June 2000
avatar

Sorry guys, I know we should be done the voting by now, but I got really swamped with schoolwork coupled with extracurricular activities and everything... I'm almost done putting everything together.

So, anyway, no new entries.


--
~Goodbytes



Go to: