You are not logged in.
Pages: 1
There aren't enough of them
I wrote a simple space-invaders clone, and it's quite fun!
Here is the project;
http://code.google.com/p/vadorz/
Source, instructions on compiling, and other updates are on the project site.
Please enjoy
edit:
Thanks to Ghost1227, there are "vadorz" and "vadorz-svn" pkgbuilds in the AUR.
check it out!
Last edited by vkumar (2009-04-02 05:33:39)
div curl F = 0
Offline
Nice. What you might be wanting to add is having people press keys continuously changes the position too. Currenty it's just smacking the arrow keys too much.
Appart from that, nice initiative, I'm waiting for version 2 here
My coding blog (or an attempt at it)
Archer start page (or an attempt at it)
Offline
Yes, there are timing issues .
I think ncurses stores the keystrokes into a FIFO buffer, which becomes problematic when there is a lot of input.
I fixed a bug in sprite_draw and in the main loop, so everything should feel smoother in r0.2.
Goal for r1.0 is to get everything 100% responsive.
Goal for r2.0 is to get it to look nice =/.
Spring break just got started, so I'll be working on this for some time.
edit:
Fixed timer, improved gameplay - it feels great now!
Last edited by vkumar (2009-03-30 04:20:30)
div curl F = 0
Offline
woot i won
i want more levels
dovie andi se tovya sagain
Offline
edit:
levels are here! no need to mess around with internals.
Last edited by vkumar (2009-03-30 06:20:53)
div curl F = 0
Offline
very nice, i like it
love the ncurses games.
Offline
If anyone has suggestions for the game, please chip in!
edit:
The timer has been heavily modified.
There's a selective input queue that allows people who hold down keys to function.
Also, everything is smoother.
Last edited by vkumar (2009-03-30 06:19:48)
div curl F = 0
Offline
Level support has been added (if you win it all under default speeds, without using MegaKill, I'll put your name in the source )!
edit:
Fixed a bug in populate(). UFOs are populated sanely, now. Also, default art has changed - so has game speed.
Most of the logic has been revised: some parts are faster, some take longer, but all work better.
Fixed a regression in the timer, now running smoother than ever.
Last edited by vkumar (2009-04-02 05:34:17)
div curl F = 0
Offline
If you're going to support wasd, it would be nice if you add the hjkl keys too. They're practically the default on ncurses games. *waits eagerly*
Offline
Done (rev 24).
I've added downloads, so you can get working binaries even if the SVN version is broken .
Runs on *nix as well as Windows (with pdcurses).
div curl F = 0
Offline
Thanks for the quick response. H works fine now, but you have J going up, K going right, and L going down. J is supposed to go down, K up, and L to the right. I look forward to revision 25.
Offline
fixed the hjkl, but that'll only come in with rev 27.
I'm merging my friends code (support for colors and other cool stuff!) at the moment, and many things are broken.
edit #2:
We have some very exciting stuff working (yes, it *is* 2:30 in the morning).
A completely revamped timer (again!) which performs much better, support for art of any size (20 char wide fighter ship is possible!), great color support, new art, pause functionality, score functionality, and improved gameplay. I will finish the merge and commit tomorrow - stay tuned
Last edited by vkumar (2009-03-31 06:24:23)
div curl F = 0
Offline
All done! We have a truly fantastic release out.
http://vadorz.googlecode.com/files/vadorz
If you passed this game off as slow, un-responsive, or un-attractive before - I think you'll be surprised.
There are several new additions that make the game much more fun, including a plot, more lives for your ship, and better graphics.
@dsr: hjkl is fixed as well
edit:
please post any changes you'd like to see.
Last edited by vkumar (2009-04-02 05:35:23)
div curl F = 0
Offline
One suggestion, can you make it so that when the arrow keys are held down, the ship keeps moving? It only works for me when I press the arrow key repeatedly. Also, speed up how fast the ship moves, on level 5 I can't get out of the way of the bullets because of how slow it is.
Offline
Offline
smartboyathome:
I think you may be using an older version. The latest version (http://code.google.com/p/vadorz/downloads/list, rev 33) should fix this problem.
If the problem persists, then you may have to tweak a setting for your computer (http://code.google.com/p/vadorz/wiki/Installing);
//#define FPS 20
#define FPS 40
This will make vadorz access the ch_stack 2000 times a second, as opposed to 1000 (assuming the default PPF of 50). You will notice the game become more responsive, but it will require more CPU and memory.
Ghost1227:
I'm stunned!
I'll always have the latest release at this URL:
"http://vadorz.googlecode.com/files/vado … on}.tar.gz"
So currently:
vadorz33.tar.gz
It will contain "vadorz.c" and "vadorz" (pre-compiled).
As far as high scores go, I will put the top 10 scores right after the license header in the source .
thank you all so much!
Last edited by vkumar (2009-04-01 03:52:02)
div curl F = 0
Offline
While I would sincerely love to play this, I seem to be getting an error on the AUR version I got about five minutes ago.
vadorz: error while loading shared libraries: libncursesw.so.5: wrong ELF class: ELFCLASS64
[ lamy + pilot ] [ arch64 | wmii ] [ ati + amd ]
Offline
i'm getting the same error as well. Is the binary you're compiling only for the 32 bit version, because it works fine if i compile it by myself (on x86_64). Maybe you should just have the pkgbuild compile it from source instead of installing a binary, especially because it only takes a couple seconds.
Offline
sorry for the negligence.. I completely forgot about putting an x86_64 build up.
and thank's for the vadorz-svn pkgbuild, hope it'll encourage people to tweak
I'm focusing on getting rid of the lag when you hold keys down.
getting rid of ch_stack helps somewhat, but it's not a great fix...
div curl F = 0
Offline
Yeah, the new PKGBUILD did the trick. Neat game, it's pretty fun to play.
[ lamy + pilot ] [ arch64 | wmii ] [ ati + amd ]
Offline
Final score: 3600
I also notice a small redesign. Love the game already, quite addictive.
Responsiveness is still an issue though, also, shooting / moving together would really be a plus.
PS: I say we get ourselves a competition!! Get as high score as possible
#edit
I made 6600 just now... Really hard at that point.
Last edited by X/ax (2009-04-02 16:44:43)
My coding blog (or an attempt at it)
Archer start page (or an attempt at it)
Offline
in r40, I went ahead and removed ch_stack - and the response issues are still there. I don't know what's causing it, it would be great if someone could help me understand.. I'm beginning to think it's a limitation with ncurses.
Here's the "timer" code;
for (x=0; x < KEYBOARD_POLLS_PER_FRAME; ++x) { // abbreviated "PPF"
in = getch();
usleep((SECOND/FPS) / KEYBOARD_POLLS_PER_FRAME); // SECONDS = 1000000 u-secs, FPS = Frames per second
if (in == ERR) continue; // curses does not have any key strokes in its "key stack", i.e: you haven't pressed a key in a while
// if key_left, do this, if key_right, do that ... blah blah
And a description of getch();
The nodelay option causes getch to be a non-blocking call. If no input is ready, getch returns ERR. If disabled (bf is FALSE), getch waits until a key is pressed.
Last edited by vkumar (2009-04-02 19:13:17)
div curl F = 0
Offline
The hjkl keys still don't work correctly.
The code
if (in == KEY_LEFT || in == 'a' || in == 'h') {
aup.pos.x -= (aup.pos.x == 0) ? 0 : 1;
} else if (in == KEY_UP || in == 'w' || in == 'j') {
aup.pos.y -= (aup.pos.y == 0) ? 0 : 1;
} else if (in == KEY_RIGHT || in == 'd' || in == 'k') {
aup.pos.x += (aup.pos.x == cols-AUP_ART_SIZE) ? 0 : 1;
} else if (in == KEY_DOWN || in == 's' || in == 'l') {
aup.pos.y += (aup.pos.y == rows-1) ? 0 : 1;
should be changed so that k goes with w, l goes with d, and j goes with s. Thanks!
Last edited by dsr (2009-04-02 20:58:57)
Offline
Pages: 1