Snaek Perviarw~
X-G

It seems puzzle games are very popular recently. Well, here's my equivalent of the cakeass thread. Not endorsed by 23yrold3yrold or Canada in general.

Ever played Puyo Puyo? Or perhaps one of its western ports, Dr Robotnik's Mean Bean Machine or Kirby's Avalanche?

Well, here's a little remake of that I'm making. In the future, it will feature hot-seat as well as networked multiplayer mode, but for now there's just endless practice mode. Combos and chains both work, but the "next" fields are kinda empty. Don't try to use the Host Game or Join Game menu options.

Anyway, test it out, and tell me if (when) you find bugs. :P

Controls: Cursor keys to move around, X/C to rotate. O queues up a bunch of ojama blobs for you (for testing purposes).

Runs in windowed mode by default, but if you pass "-fs" as a command-line argument, it will run fullscreen instead.

Frank Drebin

crashes when pressing a key

MiquelFire
The broken cookie said:

Runs in fullscreen by default, but if you pass "-fs" as a command-line argument, it will run fullscreen instead.

Err... what?

X-G

Eugh, runs in WINDOWED by default. edits

Fladimir da Gorf

Hahaha! Got rid of all of 'em! See the screenshot. Took about 15 minutes of playing though... always when I got rid of a color it reappeared. But still, victory! (in my rankings)

X-G

Hehe ... in the original, you get a bonus if you clear the well in two-player mode - extra ojama for the enemy! ;)

Mars

I really like it. Although I've never played any other version of this game I imagine it would be a lot of fun. I love the sprites -- you own creations, I suppose?

I found the controls a bit impractical: Often I only intended to send one key press, which however where interpreted as two, thus sending the blobs exactly where they shouldn't be.

23yrold3yrold

Good beginning. I'm not as fond of that kind of game as I am of Tetris Attack (or even Super Puzzle Fighter, which is very similar to this), but it plays really well. I saw the point bonuses for chains and combos in there :) Really, good job 8-)

Quote:

Often I only intended to send one key press, which however where interpreted as two, thus sending the blobs exactly where they shouldn't be.

Seconded ...

X-G

Yes, the repeat timing for the controls need to be tweaked - but it's just modifying two #defines in a header so I'm not exactly prioritizing that right now. :P

And yes, the sprites are mine.

DanielH

It was good, except I think that when two blobs are connected, they should stay connected. When a blob is cleared underneath a connected blob it becomes deconnected and falls.

X-G

DanielH: That's how the original works. That's part of the point - you can chain up some massive combos/chains that way. :P

Ultio

Hmm. Crashes when I hit enter at the menu screen on the practice mode. It was running in Windowed Mode. No real idea what might have caused it to crash. I ran it while on a WinME machine. Ahh! I want to play! Tell me what's wrong!?

X-G

I have ABSOLUTELY no idea. Did you try fullscreen?

Ultio

Same thing happens in fullscreen... hmm... I did have to download the allegro dll, and I downloaded the plain dll distribution from alleg.cc. I think it may be newer than yours? Maybe it broke something? I highly doubt it, but you never know.

X-G

I have Allegro 4.0.3 ... there could be a number of things going wrong here, but I suspect it may have something to do with the socket module (as always) ... what kind of crash was it? Segfault?

aybabtu

X-G: I run it, and the title screen pops up, but then if I hit a key or anything...it blows up! :P

X-G

If you hit a key? WTF? I can see no reason why it would do that. Anyone have any clues? The menu function looks like this:

1void menu()
2{
3 bool qgame = false;
4 int cmark = 0;
5 BITMAP *bg = load_bitmap("bg2.bmp", NULL);
6
7
8 while (!qgame)
9 {
10 clear(d_buf);
11 drawing_mode(DRAW_MODE_COPY_PATTERN, bg, ticker/3, ticker/3);
12 rectfill(d_buf, 0, 0, d_buf->w, d_buf->h, 0);
13
14 drawing_mode(DRAW_MODE_TRANS, 0, 0, 0);
15 set_trans_blender(0, 0, 0, 64);
16 rectfill(d_buf, 85, 56 + cmark * 20, 235, 73 + cmark * 20, makecol(0, 0, 0));
17 solid_mode();
18
19 shadow_textout_centre(d_buf, g_font, "Practice", 160, 61, makecol(255, 255, 255), makecol(32, 32, 32));
20 shadow_textout_centre(d_buf, g_font, "Host Game", 160, 81, makecol(255, 255, 255), makecol(32, 32, 32));
21 shadow_textout_centre(d_buf, g_font, "Join Game", 160, 101, makecol(255, 255, 255), makecol(32, 32, 32));
22 shadow_textout_centre(d_buf, g_font, "Quit", 160, 121, makecol(255, 255, 255), makecol(32, 32, 32));
23
24 masked_blit(g_gfx, d_buf, 0, 0, 90, 57 + cmark * 20, 16, 16);
25 masked_blit(g_gfx, d_buf, 0, 0, 214, 57 + cmark * 20, 16, 16);
26
27 copybuf();
28
29 while (g_time > 0)
30 {
31 g_time --;
32 ticker ++;
33 
34 if (keypressed())
35 {
36 int k = readkey();
37
38 if ((k >> 8) == KEY_ESC)
39 qgame = true;
40 if ((k >> 8) == KEY_DOWN)
41 cmark ++;
42 if ((k >> 8) == KEY_UP)
43 cmark --;
44
45 if ((k >> 8) == KEY_ENTER)
46 {
47 if (cmark == 0)
48 practice();
49 qgame = true;
50 }
51 }
52
53 while (cmark < 0)
54 cmark += 4;
55 while (cmark > 3)
56 cmark -= 4;
57 }
58 }
59}

I know it's crap, but it's more of a placeholder than anything else right now.

Oh, and by the way: Does the background scroll? It should.

Ultio

Background scrolls. I can hit up and down and it moves fine. Just closes itself without any error message or anything when I hit enter while the Practice mode is selected.

X-G

Ultio and people who had problems - I added some debug messages to points where it can just return mysteriously. Try the attached version (which also has a chain display bar, btw ;))

Ultio

Not much helpful. Now all I get is a useless information window instead of the program just crashing. "Tt has caused an error in TT.EXE. Tt wll now close."

:) Tried to hit the debug button and then realized that the MSVC installed on the computer has been removed. Sorry, I couldn't give you any more information!

Carrus85

I would test it, but I

A) Am running linux, so I cannot run the supplied binary
B) Cannot recompile the program for linux because the source is not supplied.

Sorry

X-G

I fully intend to both release source and linux binaries in time. I run linux normally - but more people use Windows around here, so I'm more likely to get responses if I supply Windows binaries. :P

Carrus85

True...

I really don't see why more people just use linux. After all, it is much more programmer friendly, not to mention highly customizable. If you know what you are doing you can configure wine to run most of your MS applications, and you can just have a small windows partition for all of those "Must have" proprietary games.

X-G

Indeed. I use linux normally - I don't really know why I chose to start this project in Windows. I'm in Windows now, mainly because I'm technically at a LAN. :P

aybabtu

{"name":"blar2.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/f\/7f4f55236ef846231ce7ff2f2cbac2e6.gif","w":427,"h":275,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/f\/7f4f55236ef846231ce7ff2f2cbac2e6"}blar2.gif
:P

X-G

Grghrhmm ... you wouldn't happen to have gdb or Dr MinGW, would you? I can make a debugging version and send it, and maybe you could get a stacktrace?

aybabtu

I have gdb. But I don't know how to use it.

X-G

Clicky.

From a DOS prompt:

Quote:

G:\Blobgame>gdb tt.exe
GNU gdb 5.1.1 (mingw experimental)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "mingw32"...
(gdb) run

Once it crashes, check the gdb window and type "backtrace" without the quotes. Copy that and post or privmsg me.

Edit: I ran GDB on it myself - oddly enough, it exits with the "numplayers < 1" when run through gdb, but not when run normally. Strange.

tareco

I can only play the game while I'm connected to the internet. Even when I select practice it just ends, is that normal? Maybe that's why the game ends on Ultio too?

X-G

Probably. Practice mode tries to connect back to itself over a loopback socket.

aybabtu
Program received signal SIGSEGV, Segmentation fault.
0x668dfe55 in hline_not_trans ()
(gdb) backtrace
#0  0x668dfe55 in hline_not_trans ()
#1  0x013f016f in ?? ()
(gdb)

There ya go.;)

X-G

... what in the world is that? Are you sure you used the debugging version I linked to?

aybabtu

-I downloaded the file, to my desktop.
-I started up a DOS prompt.
-I typed cd c:\windows\desktop
-Here is the entire message:

1C:\WINDOWS\Desktop>gdb tt.exe
2GNU gdb 5.1.1 (mingw experimental)
3Copyright 2002 Free Software Foundation, Inc.
4GDB is free software, covered by the GNU General Public License, and you are
5welcome to change it and/or distribute copies of it under certain conditions.
6Type "show copying" to see the conditions.
7There is absolutely no warranty for GDB. Type "show warranty" for details.
8This GDB was configured as "mingw32"...
9(gdb) run
10Starting program: C:\WINDOWS\Desktop/tt.exe
11 
12Program received signal SIGSEGV, Segmentation fault.
130x668dfe55 in hline_not_trans ()
14(gdb) backtrace
15#0 0x668dfe55 in hline_not_trans ()
16#1 0x013f016f in ?? ()
17(gdb)

Yes, that is the debug version. No images or anything...just tt.exe.

X-G

... you know, it'll crash for entirely different reasons if it can't load the resources. Unzip it in a directory with the rest of the stuff. :P

aybabtu

Ok. It appears to work only when I'm online. Um...why does it need to do this for practice mode? In the other version, it does just crash if I'm not online, but in this one it gives me a message...fun game, though.

X-G

When running a local game, it still spawns a server and the game client connects back to it over loopback. It shouldn't behave like this - I'll look into it, though. Gillius, think of anything I shouldn't be doing when doing loopback things?

gillius

Loopback should work just the same as it does online. Do you still connect with the loopback when you are running a non-dedicated server? Sorry I haven't tried the game yet -- I'm at work now.

I didn't even know the game was networked until your post? Maybe I wasn't paying attention that the earlier posts didn't say anything about it ;).

You are pretty lucky this is the first time I've ever read the "The Depot" forum and this is the only thread that I clicked on in the whole forum and was the only thing I was going to read. I clicked here out of randomness and boredom. Pretty freaky if you ask me.

Anyway if you are running the server and client in the same process is your game then multi-threaded? Or how does that work... Is there any problems with memory sharing between server and client in the same process?

EDIT: OK I read the thread some more. What do you think "loopback" is. When not connected online, only the IP address 127.0.0.1 or the name "localhost" will work. Doing loopback through the computer's primary NIC's IP or hostname only works when the computer is connected. What network library are you using?

X-G

I am running the server and the client on the same computer, in the same process and thread, non-dedicated, using non-blocking connects.

Quote:

Loopback should work just the same as it does online.

That's what I thought too, but apparently people are having problems with it ...

gillius

Oops you got in right after my edit... you can read that edit in my previous post.

X-G

Quote:

When not connected online, only the IP address 127.0.0.1

g_client->Connect("127.0.0.1");

I mean loopback as the lo device. The loopback driver. :P

And I'm using BSD sockets, wrapped in a C++ class.

Bruce Perry

[EDIT: n/m]

Uhh don't delete this, it's a bump ;)

X-G

Thanks. :)

So, as I was saying; is gethostbyname() a bad thing to call on a network without internet access? I'm thinking this is what's causing the problem ...

Carrus85
Top Relevent Lines of MSINFO32 said:

OS Name Microsoft Windows XP Professional
Version 5.1.2600 Service Pack 1 Build 2600
OS Manufacturer Microsoft Corporation
System Type X86-based PC
Processor x86 Family 6 Model 5 Stepping 1 GenuineIntel ~350 Mhz
Total Physical Memory 256.00 MB
Available Physical Memory 96.25 MB
Total Virtual Memory 874.70 MB
Available Virtual Memory 552.99 MB
Page File Space 619.21 MB

Dr. Mingw32 Using Debug version of blobs said:

tt.exe caused an Illegal Instruction at location 00405fb3 in module tt.exe.

Registers:
eax=00000000 ebx=00000010 ecx=0022faa0 edx=00000020 esi=04d23888 edi=0022faa0
eip=00405fb3 esp=0022fa60 ebp=0022fa88 iopl=0 nv up ei pl zr ac po nc
cs=001b ss=0023 ds=0023 es=0023 fs=0038 gs=0000 efl=00000256

Call stack:
00405FB3 tt.exe:00405FB3
00406668 tt.exe:00406668
00405958 tt.exe:00405958
00405983 tt.exe:00405983
00401FE8 tt.exe:00401FE8
00401404 tt.exe:00401404
0040194A tt.exe:0040194A
00402473 tt.exe:00402473
66902229 alleg40.dll:66902229 _WinMain

YES I am connected to the internet (DSL line is always up, so I better be, I'm dumb!).

Hope some of this information helps with your troubleshooting.

gillius

gethostbyname if given an IP address shouldn't try to access the internet. If it does it shouldn't crash but it MIGHT return an error code or a NULL pointer (I forget what it does) that if you program doesn't check for the error return it will crash.

It is something to look into though.

X-G

The socket class sets its state to SST_NOTHING if gethostbyname fails, and returns false from the Connect method. I don't know, I just think I remember seeing that somewhere - trying to use gethostbyname might make it go looking for a DNS server, even when one does not exist. Why this crashes I don't know. :-/

Bruce Perry

bump

X-G

Again, thanks. People, post more so we don't have to do this (or, Matthew can just add that feature I've been requesting .. ;)).

Right, here's another version. Those of you who had problems, take it for a spin and see if the problem is solved.

tareco

This version works when I'm offline.

Thread #281350. Printed from Allegro.cc