![]() |
|
Collaborators for Allegro Demo Game Competition? |
Dennis
Member #1,090
July 2003
![]() |
Carrus85 said: Exact same error I was getting. Put the readme.txt and the thanks.tx_ from the allegro distribution into the games root directory. Ah. Thank you, now it works. Thomas should add error handling to check if those two files were actually succesfully opened before trying to read from them.;) [edit] --- 0xDB | @dennisbusch_de --- |
Elias
Member #358
May 2000
|
efence found one buffer overrun for TanTable.. the very last element may get referenced in Game.c:215 (SCREEN_H << 2), but the malloc only allocates (SCREEN_H << 2) slots.. so the last one is not allocated. Valgrind said the below, but it seems to be false alarms. Posting here anyway, but I couldn't see much wrong on any of the locations. ==17405== Use of uninitialised value of size 4 ==17405== at 0x80629BE: InitEdge (Level.c:329) ==17405== by 0x8063592: LoadTriangles (Level.c:648) ==17405== by 0x8063E2F: LoadLevel (Level.c:901) ==17405== by 0x805F54C: LoadResources (Game.c:93) ==17405== by 0x805F95A: GameInit (Game.c:164) ==17405== by 0x805F243: run (framework.c:192) ==17405== by 0x805E83E: main (demo.c:9) ==17405== ==17405== Conditional jump or move depends on uninitialised value(s) ==17405== at 0x805FD3A: GameDraw (Game.c:216) ==17405== by 0x8068C1B: create_transition (transition.c:22) ==17405== by 0x805F27F: run (framework.c:193) ==17405== by 0x805E83E: main (demo.c:9) ==17405== ==17405== Conditional jump or move depends on uninitialised value(s) ==17405== at 0x8068168: DrawQuadTreePart (QuadTree.c:541) ==17405== by 0x806828C: BeginQuadTreeDraw (QuadTree.c:584) ==17405== by 0x806210E: DrawLevelBackground (Level.c:28) ==17405== by 0x805FFA3: GameDraw (Game.c:250) ==17405== by 0x8068C1B: create_transition (transition.c:22) ==17405== by 0x805F27F: run (framework.c:193) ==17405== by 0x805E83E: main (demo.c:9) ==17405== ==17405== Use of uninitialised value of size 4 ==17405== at 0x805CD30: AdvanceAnimation (Animation.c:12) ==17405== by 0x8067109: RunPhysics (Physics.c:278) ==17405== by 0x8060726: GameUpdate (Game.c:380) ==17405== by 0x805F17A: run (framework.c:180) ==17405== by 0x805E83E: main (demo.c:9) ==17405== ==17405== Conditional jump or move depends on uninitialised value(s) ==17405== at 0x805FD3A: GameDraw (Game.c:216) ==17405== by 0x805EF58: draw (framework.c:125) ==17405== by 0x805F2EF: run (framework.c:212) ==17405== by 0x805E83E: main (demo.c:9) ==17405== ==17405== Conditional jump or move depends on uninitialised value(s) ==17405== at 0x805FD51: GameDraw (Game.c:216) ==17405== by 0x805EF58: draw (framework.c:125) ==17405== by 0x805F2EF: run (framework.c:212) ==17405== by 0x805E83E: main (demo.c:9) ==17405== ==17405== Conditional jump or move depends on uninitialised value(s) ==17405== at 0x805FD3A: GameDraw (Game.c:216) ==17405== by 0x8068B7C: create_transition (transition.c:14) ==17405== by 0x805F27F: run (framework.c:193) ==17405== by 0x805E83E: main (demo.c:9) ==17405== ==17405== Conditional jump or move depends on uninitialised value(s) ==17405== at 0x805FD51: GameDraw (Game.c:216) ==17405== by 0x8068B7C: create_transition (transition.c:14) ==17405== by 0x805F27F: run (framework.c:193) ==17405== by 0x805E83E: main (demo.c:9) And lastly, my fortify-like debug library said this, probably false alarms as well: [Edit: yes, they are] Oh, and I added some stuff to the level, it's attached. -- |
Thomas Harte
Member #33
April 2000
![]() |
Quote: Hit 'New Game', crashed again "read error". Figured out that level.txt had to be put inside the games root dir. Tried again. Worked. There is complete error handling for readme.txt. There is incomplete error handling for level.txt and thanks._tx. My task tonight is to complete both (+ TanTable, which probably needs a little fixing for other reasons anyway)! [My site] [Tetrominoes] |
Richard Phipps
Member #1,632
November 2001
![]() |
Any chance someone could attach a windows EXE and the relevant allegro DLL so I can see the latest version working? |
Thomas Harte
Member #33
April 2000
![]() |
I can't as I don't have a working PC. To be honest I'm getting a bit concerned that the thing won't actually be finished. I think it will be code complete and commented, just not properly tested. I may go on an Allegro bug hunt to try and delay the beta 4 release! At the very least I'm going to find out if the mouse cursor thing actually is a bug or if I'm just being a thickie. [My site] [Tetrominoes] |
Evert
Member #794
November 2000
![]() |
Quote: To be honest I'm getting a bit concerned that the thing won't actually be finished. I'm going on holiday by the end of the week. So for me, it will barely make a difference if you're a few days late. Given the amount of work already done, it'd be a shame to not use the new demo! Quote: I think it will be code complete and commented, just not properly tested.
That's ok, we can do stress-tests before packaging up 4.2 release. Quote: I may go on an Allegro bug hunt to try and delay the beta 4 release!
About two weeks late for that |
Elias
Member #358
May 2000
|
I just tried changing the "logic_framerate" in the config, but it slows down the physics. Can this be fixed? I think 100 is way too high, the thing uses 100% CPU here all the time, even when only a single polygon is visible. (Reducing the update rate to 30 makes CPU drop to around 50%.. but I expect it to maybe get less smooth, but not slower as it does right now.) -- |
Richard Phipps
Member #1,632
November 2001
![]() |
Would a sleep(1) help here? |
Thomas Harte
Member #33
April 2000
![]() |
Quote: I just tried changing the "logic_framerate" in the config, but it slows down the physics. Can this be fixed? Yes - very easily. It should be a 1 line adjustment. I never really use this sort of frame limiting myself so I've just stuck what I had on top of what Miran had - it is possibly not surprising that there are some fault lines. I assume 100 was chosen because obviously there is no point having a frame rate above the logic rate? I guess it makes sense to 'pull in' the logic rate if it is miles below the frame rate until the two stabilise at more or less the same place but in that case why is it even an option in the config file? Quote: I think 100 is way too high, the thing uses 100% CPU here all the time, even when only a single polygon is visible. It's all software rendering, due to the exclusive use of scaled and/or rotated sprites or esoteric vector based stuff. Quote: I haven't really looked at the code at all yet myself. Just make sure you're prepared for all sorts of questions and requests. At the minute I'm most concerned about game.c as its become a horrid mess. As I have file validation all but implemented now, this is likely to be my tomorrow morning focus. Although I can feel a somewhat horrid cold coming on... Quote: I'm going on holiday by the end of the week Enjoy that! For how long? Quote: As I said before, I'll probably do a massive sed session to rename things to follow Allegro's naming convention and pass it through indent to fix formatting issues at least. Will this also fix the filename issues mentioned above (i.e. reduction to lowercase 8.3 format)? Or do I still need to do that personally? Would it be considered bad form if I included a personal disclaimer of the formatting and function naming in this case? Quote: Would a sleep(1) help here? My personal viewpoint is that sleep(1) is always pretty useless anyway. My practical viewpoint is that the game is already doing this if you enable power saving (or something like that) in the system configuration! [My site] [Tetrominoes] |
Elias
Member #358
May 2000
|
Quote: It's all software rendering, due to the exclusive use of scaled and/or rotated sprites or esoteric vector based stuff.
Yes, I know, so can't compare it to things like Doom3 where the gfxcard does that work (and therefore uses less main CPU than the Allegro Demo -- |
Thomas Harte
Member #33
April 2000
![]() |
Well, it's my bedtime but attached is a new version that "should never crash", featuring a dead scroller if thanks._tx isn't found and reasonably informative error reporting on any problems it encounters opening and successfully parsing level.txt (e.g. "Unknown object referenced at line 209"). The buffer overflow on TanTable is removed and probably explains some weird graphical glitching I'd been seeing with the water at the bottom of the screen. The need to be smarter about logic update quantities is not yet addressed, but the thing is worth a download for Elias' new level! Although personally I'd still make the ice more slippery. [My site] [Tetrominoes] |
Elias
Member #358
May 2000
|
I could make the platforms more slippery. But when I made the hills slippery (first the one above all were ice), you don't get up any slopes. (And due to the new air friction, you can't build up much speed by rolling/sliding downwards anymore, it seems.) -- |
Evert
Member #794
November 2000
![]() |
Quote: Would a sleep(1) help here? sleep is not portable. Quote: Will this also fix the filename issues mentioned above (i.e. reduction to lowercase 8.3 format)? Or do I still need to do that personally? Well, rename and sed could probably do most of the work. Although, it would safe a great deal of time if you could do the renaming before hand. Quote: Would it be considered bad form if I included a personal disclaimer of the formatting and function naming in this case?
You mean like `I hereby wish to distance myself from the_way_function_are_named because INamedThemDifferently'? Quote: Enjoy that! For how long?
Thanks! |
Elias
Member #358
May 2000
|
Quote: You mean like `I hereby wish to distance myself from the_way_function_are_named because INamedThemDifferently'?
I agree - but then, it's a matter of running indent and some small sed/perl/python scripts over the code. So no problem if you keep your preferred style for now, and let the work of conversion to someone committing it to CVS (I guess I just volunteered -- |
miran
Member #2,407
June 2002
|
Quote: Would a sleep(1) help here? There's a rest(1) in there somewhere, if that helps. It can be enabled/disabled in the menus (the option is called "conserve energy" or something like that). -- |
Richard Phipps
Member #1,632
November 2001
![]() |
Thanks to Matthew Leverton I just played the demo. Looks great and plays really nice too! Well done everyone, I'm impressed with the game! |
Dennis
Member #1,090
July 2003
![]() |
Thomas said: Well, it's my bedtime but attached is a new version that "should never crash" I did not experience any crashes this time, BUT there still are those syntax-errors on MSVC6. I just decided to fix those "declaration not at the beginning of a block"-errors myself. Attached are those .c files that had to be changed at some places and that are now MSVC6 compatible. --- 0xDB | @dennisbusch_de --- |
Thomas Harte
Member #33
April 2000
![]() |
Quote: You mean like `I hereby wish to distance myself from the_way_function_are_named because INamedThemDifferently'? No, I mean like 'functions are named_like_this in order to follow the Allegro API definitions'. I don't want to explicitly distance myself or suggest that they were changed by someone else. 'Disclaim' was clearly a very poor choice of word. It really isn't any different to one comment I've already written which says something along the lines of 'all variables are declared in a block up here because Allegro is written in C89, please ignore this and look for descriptions of used variables where they crop up'. And I assume that sort of comment won't be frowned upon? Quote: Thanks to Matthew Leverton I just played the demo. Looks great and plays really nice too! Well done everyone, I'm impressed with the game! I've just tweaked it a little to make it 'harder' so that in more places you are required to use the preceeding down slope to build enough momentum for an up slope and if you fail to use the down slope properly the first time on the loop onto the platforms the first time you pass the exit then you actually have to do a little back and forth momentum building to get up - which is relatively hard but not impossible. It took me four or five shots. I also just figured out how to get onto the "Shawn Hargreaves" text and fell through his 'w'. So perhaps more bug testing is required. I intend to fix the flickery nature of the main sprite and the gamepad controller dialogue (which has a habit of writing text over the edge of its box) then hopefully get some binaries together and put it out for wider testing simultaneously to the big code clean up and document. EDIT: Quote: I did not experience any crashes this time, BUT there still are those syntax-errors on MSVC6. I just decided to fix those "declaration not at the beginning of a block"-errors myself. Attached are those .c files that had to be changed at some places and that are now MSVC6 compatible. Thanks. I had a search for these but couldn't think of an automatic way to find them so was just reading myself (in XCode 2.1, which sits upon gcc 4.x). Obviously I missed most of them! [My site] [Tetrominoes] |
Evert
Member #794
November 2000
![]() |
Quote: No, I mean like 'functions are named_like_this in order to follow the Allegro API definitions'. Ah, ok. That's fine then (but in my opinion, redundant). Quote: Thanks. I had a search for these but couldn't think of an automatic way to find them so was just reading myself (in XCode 2.1, which sits upon gcc 4.x). Obviously I missed most of them! You should be able to find most of them by passing -std=c89 to gcc on the commandline (not sure where to set that up from XCode). EDIT: hmm... have we reached `longest on-topic thread ever' yet? Regardless, lets keep using this one. It's so long it'd be a shame to switch to a new one at this point. |
Elias
Member #358
May 2000
|
Quote: I've just tweaked it a little to make it 'harder' so that in more places you are required to use the preceeding down slope to build enough momentum for an up slope and if you fail to use the down slope properly the first time on the loop onto the platforms the first time you pass the exit then you actually have to do a little back and forth momentum building to get up - which is relatively hard but not impossible. It took me four or five shots. Sounds good. I couldn't really get it to enable the momentum building. If I make high friction (e.g. 1.0, like now), you can't build up much momentum. If I make it less, then you don't get back up anywhere. Can't wait to play the tweaked version, mine was too easy I guess. Quote: I also just figured out how to get onto the "Shawn Hargreaves" text and fell through his 'w'. Heh. There are actually two ways. One is, if you jump up just before the top of the hill to the left, and gave enough momentum, you will jump over all of the "Allegro" and land somewhere on "Shawn". The other way obviously is top fall through from above. I also noticed that you can fall through, but that may be a problem in the mesh. Blender likes to degenerate faces.. I'll do a manual check for such faces. Oh, and when you said "tweaked" above, do you mean, you actually got Blender to load it - or just the friction values in the .txt? [Edit: Oh, and this thread catapulted me over the 1000 posts mark.. not sure this is good or bad..] -- |
Thomas Harte
Member #33
April 2000
![]() |
Elias said: I also noticed that you can fall through, but that may be a problem in the mesh. Blender likes to degenerate faces.. I'll do a manual check for such faces. No, it was a rounding issue. I hadn't updated a particular rounding error value. I need to turn these into #defines, obviously. This dates from when I addressed the problem of the 'invisible walls' affecting the first hill in your first Blender export and the top left right angle of the half pipe. The non-fixed rounding error had another side effect - it was 'pushing' the player so that their contact with surfaces wasn't quite as consistent as it looked. So the fix improves the 'correct' calculation of friction and kills the slight up/down 'jumpiness' of the character on some surfaces. I will play with friction constants further. Quote: Oh, and when you said "tweaked" above, do you mean, you actually got Blender to load it - or just the friction values in the .txt? I've given up on confusing Blender, I'm just editing the text file and the in game constant relating to how 'strong' the player is. Anyway, other things achieved today: - datafiles folded into just one (with nesting) Target is to add skateboard and door opening sound effects then leave it since the cold I was scared of has materialised and I really just want to sleep all day. Which given that I'm "inbetween jobs", I can! [My site] [Tetrominoes] |
Elias
Member #358
May 2000
|
Quote:
I've given up on confusing Blender, I'm just editing the text file and the in game
Heh, ok. Unfortunately, Blender simply is confusing at first. I had played with it a few times in the past, but never could really do anything with it. After creating this level, it's the first time I start feeling somewhat confident while using it. Just what I had hoped for Anyway, I'll make sure to update the .blend file accordingly to your changes, in case there will be any suggestions about the level geometry and therefore I'll modify it again. -- |
|
|