![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on First c experience (fixed) within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; This is the first program I made in C. It is a little game and I´m posting to get tips ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
This is the first program I made in C.
It is a little game and I´m posting to get tips from the veterans. It still has a lot to be done but I´m posting now that the structure is done so if there any change to be made, better do it earlier. My previous experience was mostly on pascal and I made this based only on the psp-programming tutoriais. I have some php experience that helped too. The objective of the game would be the only color remaining, it is kinda intuitive so I won´t explain here. I put some comments on the code so the veterans will grasp it easier. I think it´s is easy enough for others begginers to study also. I´m accepting any hint or constructive criticism. What I´m planning next (in order): A.I. for the computer (play alone is boring) PNG´s instead of drawing. Some sound to make marrier. Learn how use fonts Multiplayer adhoc (I´m dreaming here but since I will need for my next homebrew ideas better work to learn it) (Sorry if some sentences didn´t make sense, english isn´t my native language) Last edited by petervaz; 08-09-2007 at 08:38 AM.. Reason: this was the intended post |
|
|
|
|
|
|
#5 | |
![]() |
Quote:
__________________
If you ever need me, you can contact me at [URL="**********.net"]**********.net.[/URL] |
|
|
|
|
|
|
#7 |
|
Banned for LIFE
|
Adiuvo, thats weird i got a qj attachment error message
_dysfunctional is totally right. it causes mess in the development forum and is an annoyance. Im sorry but if you cant setup your own compiler then with regret. You're on your own. sorry. |
|
|
|
|
|
#10 |
![]() |
attachment doesnt work btw.
Invalid Attachment specified. If you followed a valid link, please notify the administrator
__________________
[CENTER][SIZE="1"][1 Year QJ Member] [COLOR="Sienna"][LUA Coder and C Learner][/COLOR] [URL="http://dl.qj.net/Ball-Revamped-Clone-v.1-PSP-Homebrew-Games/pg/12/fid/15231/catid/195"] [COLOR="SlateGray"][Ball Revamped Clone v0.1][/COLOR] [/URL] [URL="http://dl.qj.net/Phil-s-Shooting-Range-v0.3-PSP-Homebrew-Games/pg/12/fid/11542/catid/194"] [COLOR="SlateGray"][Phil's Shooting Range v0.3][/COLOR] [/URL] [URL="http://dl.qj.net/Organization-Apps/pg/12/fid/14248/catid/190"][COLOR="SlateGray"][HideFile PRX v2][/COLOR][/URL] [URL="http://dl.qj.net/SSR-PRX-v1.1-PSP-Homebrew-Applications/pg/12/fid/14725/catid/151"][COLOR="SlateGray"][SSR PRX v1.1][/COLOR][/URL] [/SIZE][/CENTER] |
|
|
|
|
|
#12 | |
![]() |
Quote:
Whats wrong with using underscores?
__________________
...Just Returned To The Scene... |
|
|
|
|
|
|
#13 | |
![]() |
Quote:
edit: did he ask it to be compiled before he edited it?
__________________
[I][U]QJ took away my sig. :([/U][/I] |
|
|
|
|
|
|
#15 | ||
|
Quote:
Quote:
About the globals, well, nowadays I´m making my life programming on cobol so I still have to learn how to get the best out of functions and arguments. The way I made looks me more readable and easier to track. Why is it a bad habit? No arguing here, just looking for a better understanding. btw, the colors variables were all on redraw() function, i moved them out so I could use on others functions. Thanks for your anwser. |
|||
|
|
|
|
|
#16 |
![]() ![]() Developer
|
I just shout off a list as I see them:
Globals are bad because any function can access them so it breaks encapsulation and makes it harder to debug as you may not remember which functions change the value of the same global.
__________________
[Blog] [Portfolio] [Homebrew Illuminati - Serious Homebrew Development Forums] [I want to make Homebrew FAQ] [How I broke into the Games Industry] [Programming Book List] [Programming Article List] |
|
|
|
|
|
#17 | |
|
Quote:
Hmmm... Now I should look up for some terms
|
||
|
|
|
|
|
#18 |
![]() |
Well, what yaustar is saying...
You do: Code:
#define addOne(x) x+1 Code:
inline int addOne(int x)
{
return x+1;
}
Code:
#define PLAYER_ONE 1 #define PLAYER_TWO 2 #define PLAYER_THREE 3 #define PLAYER_FOUR 4 Code:
enum PlayerList
{
PLAYER_ONE = 1,
PLAYER_TWO = 2,
PLAYER_THREE = 3,
PLAYER_FOUR = 4
};
The rest are simple, so I won't right them up. :P |
|
|
|
![]() |
| Tags |
| experience , fixed |
| Thread Tools | |
|
|