Allegro.cc - Online Community

Allegro.cc Forums » The Depot » Yeah! (and bench/bug request?)

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Yeah! (and bench/bug request?)
kazzmir
Member #1,786
December 2001
avatar

I'll just throw in a small comment.

Quote:

When you declare something, never assume it to have a value.

Global variables are guaranteed to be 0. Everything else( locals, class variables, etc ) are not.

Audric
Member #907
January 2001

kazzmir said:

Global variables are guaranteed to be 0

:o

Anomie
Member #9,403
January 2008
avatar

Glad you got it to work!

Quote:

I think there is a bug in the enemy highlighting code.

Oooooooh yeah. The player 'lighting' thing was no problem, but with the bullets and the enemies, it was rough... Each of the background's 'pixels'(not really) has to find its red/green value based its the average distance to every enemy/bullet(respectively)... I never really got it to work quite right, but it's tolerable most of the time.

Quote:

It just froze when I died. A message saying 'GAME OVER. Press ESC to quit' would be a bit nicer.

Yeah...I really do need to get around to putting in a restart button... Soon!

Quote:

Another thing I'd suggest, if you plan to spend some time on it, is to get graphics...

Actually, I like it the way it is... I wasn't driven to these graphics by lack of artistic skill (though believe me, I'm plenty lacking), I just like the semi-retro look, with the basic squares and circles, pixelated explosions and the RGB-dancefloor thing... (plus the circular enemies and player made collision detection a breeze)

If I was going to add more 'graphics'(enemies, power-ups, whatever...) I would probably make a blank bitmap in-code, draw primitives to it with some function for drawing each thing, and display that as...whatever it was. But I'm kinda avoiding that until I can figure out the whole polygon-on-polygon collision thing (for checking rotated bounding-boxes). It'd be great if someone could help me out with that.

Quote:

It'd be nice if there was the possibility of a restore health power up. Also, temporary gun improvement power ups could work.

Yeah, the health thing is a good idea, but I think the gun powerup would require a more...'intrusive' way of displaying the gun power to the player. And the only reason I haven't added that health power-up is because I was thinking of this as the sorta game you sit and play over and over, trying to beat your old score. (I'm pretty sure I'm going to replace the score at the top with a timer...make it into a 'survive as long as possible' thing. Any tips on displaying properly formatted time, as accurately as possible? )

______________
I am the Lorax. I speak for the trees. I speak for the trees for the trees have no tongues.

Vanneto
Member #8,643
May 2007

I actually like the game very much. I find myself coming to this thread every time I am on the forum and playing it. ;D

Its a really good concept, there are some flaws, like the others mentioned, so I will not write them here. Just fix those things and this game will be even more enjoyable.

Just to let you know that you have a great game/idea here. Just keep working on it. ;)

In capitalist America bank robs you.

Anomie
Member #9,403
January 2008
avatar

New version! I've made enough changes now that I'm bumping this project from version 1.0.beta to 1.0.1!

New version has a classy 'You died. Restart?' screen, and uses a timer rather than a point system. It also keeps track of the best time. Yeah!

Added new w1nd0z3 binary and the new source.

______________
I am the Lorax. I speak for the trees. I speak for the trees for the trees have no tongues.

James Stanley
Member #7,275
May 2006
avatar

I see the latest version hasn't got the bullet/enemy bug fixed.

Anomie
Member #9,403
January 2008
avatar

James Stanley said:

I see the latest version hasn't got the bullet/enemy bug fixed.

Yeah...but just cause it's not so much of a 'bug' as it is... 'something I don't know how to do better', so I just hacked something together that works most of the time. I'm thinking it might be worse in Linux than in Windows, because it doesn't really visibly glitch very often for me...maybe once (for a half-second or so) every two or three dozen times I play.

I'm certainly open to suggestions here.

[edit] Oh wait...did you mean the bug with colors, or the bools? (bools fixed now...ehehe...)

______________
I am the Lorax. I speak for the trees. I speak for the trees for the trees have no tongues.

James Stanley
Member #7,275
May 2006
avatar

I meant the bools thing. :)

Timorg
Member #2,028
March 2002

I am using linux on a p3 863mhz, 128meg ram, GeForce FX 5700LE, just before running it 43meg is free, and 90% of the cpu is idle. (to give an idea of resources available, will check in a moment without firefox running, if there is much difference in game performance I will edit my post)

I get 3fps, then 0fps, well nothing happens for a few seconds when there are lots of shrapnel on the screen, basically every time an enemy dies.

Specifying the GFX_FBCON driver, I got 16fps out of the game and no pauses, I could actually play it, I like the game, I have no idea what the driver it defaults to though.

____________________________________________________________________________________________
"c is much better than c++ if you don't need OOP simply because it's smaller and requires less load time." - alethiophile
OMG my sides are hurting from laughing so hard... :D

Anomie
Member #9,403
January 2008
avatar

Timorg said:

I get 3fps, then 0fps, well nothing happens for a few seconds when there are lots of shrapnel on the screen, basically every time an enemy dies.

Specifying the GFX_FBCON driver, I got 16fps out of the game and no pauses, I could actually play it, I like the game, I have no idea what the driver it defaults to though.

Huh...what distro are you running?

(And it would be awesome if someone running the same distro could let me know if this happens to them too.)

______________
I am the Lorax. I speak for the trees. I speak for the trees for the trees have no tongues.

Timorg
Member #2,028
March 2002

I use a debian base install, then used aptitude for xorg and fluxbox, then various other programs as I needed them (http://www.go2linux.org/installing-a-light-linux-operating-system-debian-fluxbox I sort of followed this, but went with my favorite programs, rather than their suggestions.)

____________________________________________________________________________________________
"c is much better than c++ if you don't need OOP simply because it's smaller and requires less load time." - alethiophile
OMG my sides are hurting from laughing so hard... :D

Anomie
Member #9,403
January 2008
avatar

Well...if I was going to take a stab in the dark, I'd say fluxbox might be a problem? But only because I don't know many people who use it... I really don't have much useful to say... Glad you knew how to fix it!

______________
I am the Lorax. I speak for the trees. I speak for the trees for the trees have no tongues.

Timorg
Member #2,028
March 2002

Its a window manager as opposed as a desktop, I can run the program without any windows manager.

Just to see, I replaced the contents of .xinitrc with "~/yeah/yeah" and started x. I got exactly the same fps and everything. :D

As for how many people use it, I don't have a clue, but at a guess I would say quite a few.

http://popcon.debian.org/main/x11/by_inst here is the current results for debians popularity contest of x11 packages.

It came in at 170, there is a couple windows managers that are above it, from my understanding 3349 have installed it on debian in the last month and 1205 use it regularly. I don't know how many people have the popularity contest stuff turned on, I don't, its just another thing that would slow this poor machine down and its mainly used on low end machines (IMHO or people that want a desktop to slow their "super" computers down), so lots of people might have thought the same way and skewed the results.

____________________________________________________________________________________________
"c is much better than c++ if you don't need OOP simply because it's smaller and requires less load time." - alethiophile
OMG my sides are hurting from laughing so hard... :D

Anomie
Member #9,403
January 2008
avatar

Huh... I always thought Fluxbox was a desktop environment, like KDE or GNOME... Dunno what to say then!

______________
I am the Lorax. I speak for the trees. I speak for the trees for the trees have no tongues.

piccolo
Member #3,163
January 2003
avatar

Game run fines

needs:

Fonts

as i mover faster it becomes harder to see the mouse pointer. i guess that is some thing that can be trained but, you could give small breaks so you can get your self back focused for earlier levels.

you need text to say press 'R' to reset.

also i like to use arrows keys to move for this type of game because it is already programed in my brain how the arrow keys work and where that are.

Quote:

The playing field felt a little cramped

It is not to cramped because the trick is timing.
Notice there are time points of homeing and actcelaration for the bad dots.

they home what then enter 1 and the home on attack 2 once you get the timing its easy to doge them but, its a good thing the don't bounce off the walls or you would be in deep dodo then.

EDIT: you could make a radar for those that think it to much for them

wow
-------------------------------
i am who you are not am i

Anomie
Member #9,403
January 2008
avatar

Quote:

needs:

Fonts

...nah...thanks though.

Quote:

as i mover faster it becomes harder to see the mouse pointer. i guess that is some thing that can be trained but, you could give small breaks so you can get your self back focused for earlier levels.

I just think it'd be a little awkward to have 'breaks' in a game that reaches its peak difficulty after a minute and forty seconds.

Quote:

you need text to say press 'R' to reset.

...huh? Such text does, indeed, exist.

Quote:

also i like to use arrows keys to move for this type of game because it is already programed in my brain how the arrow keys work and where that are.

WASD works just like the arrows, but is on the other side of the keyboard. I find it awkward to use the arrows and mouse at the same time, having both arms skewed to the right across the keyboard while facing the monitor. Even so, it can't hurt.

Quote:

Quote:

The playing field felt a little cramped

It is not to cramped because the trick is timing.

When that was posted the screen size was 600 by 600, and looking at it now, it was way cramped...

______________
I am the Lorax. I speak for the trees. I speak for the trees for the trees have no tongues.

GullRaDriel
Member #3,861
September 2003
avatar

Quote:

Global variables are guaranteed to be 0. Everything else( locals, class variables, etc ) are not.

You are assuming things instead of being sure of them. Don't assume, give them all a value at init !

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Thomas Harte
Member #33
April 2000
avatar

Quote:

WASD works just like the arrows, but is on the other side of the keyboard. I find it awkward to use the arrows and mouse at the same time, having both arms skewed to the right across the keyboard while facing the monitor. Even so, it can't hurt.

Don't forget left handed people. They have to skew to use WASD.

Slartibartfast
Member #8,789
June 2007
avatar

GullRaDriel
Member #3,861
September 2003
avatar

One thing: while dead the time counter do not stop to grow.

It means that I can shit my score the following way:

Dead the quickest I can
Wait 2 minute
Press the restart key.

My last best time won't be me lifetime, but my whole playtime.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Audric
Member #907
January 2001

kazzmir said:

Global variables are guaranteed to be 0. Everything else( locals, class variables, etc ) are not.

Gullradriel said:

You are assuming things instead of being sure of them. Don't assume, give them all a value at init !

I was dubious too (hence my "huh?" smiley) but since then I've searched for the info, and the C99 standard specifies that all uninitialized static data is zeroed at program startup:
http://c0x.coding-guidelines.com/6.7.8.html
section 1653 onwards

Anomie
Member #9,403
January 2008
avatar

Quote:

Don't forget left handed people. They have to skew to use WASD.

I'm actually left-handed. ;)
It's certainly no problem for me.

Quote:

One thing: while dead the time counter do not stop to grow.

Yeah...I fixed that in the version I'm going to put on my Depot project page. (if it ever gets approved)

I wasn't going to put this thing up in the Depot, but I looked at some other stuff in there, and I think this'll fit just fine...

______________
I am the Lorax. I speak for the trees. I speak for the trees for the trees have no tongues.

kazzmir
Member #1,786
December 2001
avatar

Quote:

and the C99 standard specifies that all uninitialized static data is zeroed at program startup

The reason is that globals are stored in the .bss section of the executable which the OS will zero out when it loads the program. Globals that are initialized with a value are stored in the .data section.

GullRaDriel
Member #3,861
September 2003
avatar

Audric said:

...C99 standard specifies..

Heh, when programming on Windows, never trust a standard is rule #2 ;-p (It's a joke/sarcasm/whatever, for those lazy geeks who think I am mad)

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

 1   2 


Go to: