Game Programming
#1
Posted 25 June 2004 - 12:14 AM
#2
Posted 25 June 2004 - 04:31 AM
#3
Posted 25 June 2004 - 04:32 AM
#4
Posted 25 June 2004 - 06:32 AM
1 thing i found is that to figure how something works, use RUN mode to try stuff.
good luck
Mr Sparkle
#5
Posted 25 June 2004 - 08:43 AM
1. Get a concept (idea) of the game. This main thing that you think would be worth player's time, just don't make another classic (tetris etc) as everyone played them 1M times.
2. Make a plan (project) of a game that is design screens, structures, attributes, transitions etc. for the game. You can do it informally but it should list all the features. You can list them in order of importance.
This is the MOST important part of the developement. If you don't do it well your game will be crooked and look amateur.
3. Think seriously about calculators limitations, that is for CFX you must know that you won't make a fast game (don't argue about it) and for AFX you'll probably run out of memory sooner than you suspect.
4. Implement the engine - start programming the core of the game, things that are the most important and most difficult. Don't start programming from creating title screen as you probably got bored before finishing the game.
5. Implement less important stuff - save game, highscores, nice graphics etc.
6. TEST YOUR GAMES - that is prove that although you tried you couldn't crash od do something unpredictable to the game (sic!), testing IS NOT about proving that your program hasn't got any bugs, program's authors are the worst testers as they subconsciously don't want to harm "their child".
7. Do Beta testing
Give your game to your friends and observe him as he is introduced to the game and find out which things are unclear to him, he'll probably report some problems that you wouldn't expect.
This above is for serious programming, you can also write you game at the boring classes or in the bus, but probably your game won't be worth playing for other people - just think of how many calc games you played and found buggy or unineteresting.
Roeoender.
#6
Posted 25 June 2004 - 11:28 AM
Build an interface
Bug test the interface
Make a storyline
Bug test the lot
Copy, and expand the prog!
#7
Posted 25 June 2004 - 10:35 PM
Personally, i focus on completing the engine firstly, like most others do. Implementing new abilities (like magic, if you're making a rpg for instance), comes afterwards.
When i made my combat simulator, the "player" only had "attack" as possible command until a few weeks before i was done. I programmed all enemy skills and such before focusing on the commands i could do for myself. This means that i priore making the inpredicatble parts of the game before the predictable ones.
On other hand, i think i'm a bit different from most others when it comes to beta testing. As soon as the main engine is implemented, i start beta testing everytime i implement a new option. I tested every new magic skill right after i finished coding them. This way, it's faster to find your way back to where the problem is - if you forgot to close a If/Then/IfEnd, for instance.
#8
Posted 26 June 2004 - 12:21 AM
#9
Posted 26 June 2004 - 03:14 AM
I hope this helps with your game development!
#10
Posted 26 June 2004 - 03:37 AM
lol, thats pretty much the same for memy method is determined by when I get board of what I was doing last...
#11
Posted 26 June 2004 - 05:27 AM
Now I'm trying to create the World Map for the game(an rpg) and this is the outline.
^ represents areas that you can move on(there are also random monsters)
# represents areas that are blocked(walls,etc). You cannot move over an area with # on it.
~ represents forest(different monsters appear in the forest)
X represents the player
#^^^^^^^^^^^#
#^^^^^^^^^^^#
#^^^^^^^^^^^#
#X^^^^^~~~~~#
#^^^^^^~~~~~#
#^^^^^^~~~~~#
#############
How can I make a coding for movement? I tried using the coding that Kingdom uses for his Star Wars Empire but it didn't work. when the X moves over '^' it produces ' ' instead. I actually want to have it like when X passes over a '^' the '^' will come back again, just the same as the '~'. I also would like to make it that when X reaches the top, it will load another part of the world map screen which is entirely different from this part of the world map.
Is it very difficult?
#12
Posted 26 June 2004 - 06:04 AM
here is a demo:
[1,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,1
][1,0,0,0,0,0,0,2,2,2,2,2,1][1,0,0,0,0,0,0,2,2,2,2,2,1][1,0,0,0,0,0,0,2,2,2,2,2,1
][1,1,1,1,1,1,1,1,1,1,1,1,1]->Mat M
Lbl 1
Locate X,Y,"X"
Do
GetKey->G
LpWhile G=0
If Mat M[Y,X]=0
Then Locate X,Y,"^"
Else If Mat M[Y,X]=2
Then Locate X,Y,"~"
EndIf:EndIf
X->A
Y->B
//movement code
If Mat M[B,A]=1
Then A->X
B->Y
EndIf
Goto 1
thats a bit generalized, but i think you get the idea
The matrix at the top funtions as a map that the calc can look at, you can also use it to tile each screen.
#13
Posted 26 June 2004 - 06:16 AM
nice work
i wish i was as good as u lol
Mr Sparkle
#14
Posted 26 June 2004 - 06:47 AM
oh, heres another tip, you can make false walls by not having the visible map correspond to the internal map. so:
#^^^^^^^^^^^#
#^^^^^^^^^^^#
#^^^^^^^^^^^#
#X^^^^^~~~~~#
#^^^^^^~~~~~#
#^^^^^^~~~~~#
#############
with this matrix:
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,0]
[1,0,0,0,0,0,0,2,2,2,2,2,1]
[1,0,0,0,0,0,0,2,2,2,2,2,1]
[1,0,0,0,0,0,0,2,2,2,2,2,1]
[1,1,1,1,1,1,1,1,1,1,1,1,1]
it will appear that the map is solid along the right wall while in fact you can walk right through the wall right above the forest.
this can be veeery handy
#15
Posted 26 June 2004 - 04:17 PM
the easiest way to code a "world" is by having a matrix, and having each square you can move to at the map being symbolized by this matrix. Utilise different number codes for accesibility; Mat A[x,y]=n, n=0 means cannot pass, n=1 means can pass, n=2 means can pass & there's a certain chance you encounter monsters, n=3 means city, and so on.
It's quite easy, just twist your brain around
#16
Posted 26 June 2004 - 06:14 PM
simple, but inflexable:
r=10 //before the program is run A=10
o=10 //these variables are used to hold your position on the map
//r=map X coord
//o=map Y coord
then for your movement section:
if G=27
Then X-1->X
If X=0
Then 13->X
r-1->r
Prog "MAP"
Goto 1
EndIf:EndIf
If G=28
Then Y-1->Y
If Y=0
Then 7->Y
o-1->o
Prog "MAP"
Goto 1
EndIf':EndIf
//i think you get the idea...
PROGRAM "MAP":
Lbl 1
If o=1
Then If r=1
Then //map for 1x1
Return
EndIf
If r=2
Then //map for 2x1
Return
EndIf
If r=3
Then // you get the idea...
Return
EndIf
//the rest of colum 1
EndIf
If o=2
Then //all map code
EndIf
// continue for the rest of the colums
now another idea:
have a matrix (for this we will use 5x5) and fill it with numbers representing parts of the map:
[26,24,23,20,19,18]
[27,25,22,21,17,16]
[28,5,4,3,15,14]
[29,6,1,2,13,12]
[30,7,8,9,10,11]-> Mat W
in this case you can access this matrix to get the code of the map at that position:
Mat W[r,o]->M
if M=1
Then [1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,2,2,2,2,2,1]
[1,0,0,0,0,0,0,2,2,2,2,2,1]
[1,0,0,0,0,0,0,2,2,2,2,2,1]
[1,1,1,1,1,1,1,1,1,1,1,1,1]->Mat M
Return
EndIf
If M=2
Then //another map...
EndIf
//continue till you get to the last number.
get the idea?
EDIT:
you may find this helpfull: http://www.casiocalc... basic tutorial
#17
Posted 27 June 2004 - 06:41 AM
Okay, while waiting for your replies I have already started doing the "Battle" section, somewhat like Final Fantasy where you have to fight a group of monsters(4 at the most). Now I'm not so sure about this:
I want this output, when you press (down) on the calc, the "arrow pointing to the right,(the L key)" will scroll down to the next monster name. Like this:
> represents right arrow
> Bite Bug 10
Bite Bug 15
Bite Bug 14
When I press(down)...
Bite Bug 10
> Bite Bug 15
Bite Bug 14
The text output i'm using is Text.
Now the problem is when I put in this code, the > doesn't disappear, but 2 of the > will come out!
15->r
Do
Getkey->L
L=79=>Goto A
L=69=>Goto D
L=59=>Goto M
L=49=>Goto I
L=39=>Goto S
Do
Text r,4,">" 'the right arrow
Do
Getkey->H
H=37=>r+6->r
H=28=>r-6->r
r<15=>15->r
r>34=>34->r
Lpwhile H>0
Lpwhile r>0
ClrGraph
Lpwhile L>=0
Btw I'm not entering the competition because there's still so much that I don't know. I've already printed out your tutorial, Crimson.
#18
Posted 27 June 2004 - 06:46 AM
change your code to this and see if it helps:
15->r
Do
Getkey->L
L=79=>Goto A
L=69=>Goto D
L=59=>Goto M
L=49=>Goto I
L=39=>Goto S
Do
Text r,4,">" 'the right arrow
Do
Getkey->H
LpWhile H=0
Text r,4," "
H=37=>r+6->r
H=28=>r-6->r
r<15=>15->r
r>34=>34->r
Lpwhile r>0
ClrGraph
Lpwhile L>=0
thats a pretty inneffecient loop for doing what i think your doing though... gimme a few minutes and i'll see if i can optimize it for you.
#19
Posted 27 June 2004 - 06:57 AM
Do
Text r,4,">"
Do
GetKey->L
LpWhile L=0
L=79=>Goto A
L=69=>Goto D
L=59=>Goto M
L=49=>Goto I
L=39=>Goto S
Text r,4," "
L=37 And r<34=>r+6->r
L=28 And r>15=>r-6->r
LpWhile 1=1
if im not mistaken this is all you need to do... but you may need to tweak it a bit as im doing this in my head and not actually typing it in.
btw, in english this is what the code does:
sets r to an intial value of 15, which is the first selection;
displayes the arrow;
waits for a key press;
if one of the F buttons is pressed then the user has made his selction, and so the loop is exited;
if down is pressed AND the pointer is not on the bottem selection then the pointer is moved down 1;
if up is pressed AND the pointer is not on the top selection then the pointer is moved up 1;
since 1 always = 1 the loop will repeat untill one of the F keys is pressed.
#20
Posted 27 June 2004 - 07:01 AM
#21
Posted 27 June 2004 - 07:08 AM
15->r
Do
Text r,4,">"
Do
GetKey->L
LpWhile L=0
Text r,4," "
L=37 And r<34=>r+6->r
L=28 And r>15=>r-6->r
LpWhile L<>31
//now that enemy is selected give the user options of what to do:
While 1=1
Do
GetKey->L
LpWhile L=0
L=79=>Goto A
L=69=>Goto D
L=59=>Goto M
L=49=>Goto I
L=39=>Goto S
WhileEnd
see? it really depends on the loop and your style of programming. the plus side to this is that it will make both loops faster, but will make the code a bit bigger.
#22
Posted 28 June 2004 - 12:27 AM
Lbl 5?
[[1,0][100,100][0,100][7,0][8,0][7,0][8,0][2,0][2,0]]->Mat R?
Mat R[1,1]->B?
Intg 1Ran#+1->U?
Intg 4Ran#+1->theta?
For 15->J To 6theta+9 Step 6?
U=1=>Text J,10,"BITE BUG"?
Next?
{8,4}->Dim Mat S?
For 1->Z To theta?
Intg 20Ran#+10B->Mat S[2,Z]?
For 3->C To 6?
Intg 2BRan#+1->Mat S[C,Z]?
Next?
Intg BRan#+9->Mat S[7,Z]?
Intg BRan#+1->Mat S[8,Z]?
Mat R[2,1]->H?
Mat S[2,1]->I?
Mat S[2,2]->J?
Mat S[2,3]->K?
Mat S[2,4]->N?
theta>=1=>Text 15,60,I?
theta>=2=>Text 21,60,J?
theta>=3=>Text 27,60,K?
theta>=4=>Text 33,60,N?
Next?
Text 3,10,"YOU"?
Text 3,60,H?
Horizontal -2?
Horizontal -1?
Horizontal 2?
For -6->A To 4 Step 2?
F-Line A,-3,A,-2?
Next?
1->Q?
Lbl 9?
Text 56,6,"ATK"?
Text 56,26,"DRAW"?
Text 56,46,"MAG"?
Text 56,66,"ITEM"?
Text 56,86,"STAT"?
H<I/4=>Text 56,106,"LIM"?
15->r?
1->Z?
Do?
Text r,4,">"?
Do?
Getkey->L?
LpWhile L=0?
6theta+9->C?
Text r,4," "?
L=37 And r<C=>r+6->r?
L=37 And r<=C=>1+z->Z?
L=28 And r>15=>r-6->r
L=28 And r>15=>z-1->z?
Z>4=>4->Z?
Z<1=>1->Z?
LpWhile L/=/79?
While 1=1?
Do?
Getkey->L?
L=79=>Goto B?
L=69=>Goto D
L=59=>Goto M?
L=49=>Goto I?
L=39=>Goto S?
H<I/4 And L=29=>Goto L
WhileEnd?
Green Text 45,2,"YOUR TURN"?
Text 45,2," "? '17 spaces
Mat R[4,1]->S?
Mat R[8,1]->A?
Mat S[5,Z]->W?
Mat S[8,Z]->F?
Lbl B?
If Q=1?
Then A/F->E?
If E>=1?
Then (Intg SRan#+S)-Intg WRan#->D?
D<0=>0->D?
Orange Text 45,66,D?
Text 45,66," "? "17 spaces
If Z=1?
Then I-D->I?
Text 15,60," "?
Text 15,60,I?
I<=0=>Text 15,4," "?
IfEnd?
If Z=2?
Then J-D->J?
Text 21,60," "? '1 space
Text 21,60,J?
J<=0=>Text 21,4," "? '17
IfEnd?
If Z=3?
Then K-D->K?
Text 27,60," "? '1
Text 27,60,K?
K<=0=>Text 27,4," "? '17
IfEnd?
If Z=4?
Then N-D->N?
Text 33,60," "? '1
Text 33,60,N?
N<=0=>Text 33,4," "? '17
IfEnd?
1+Q->Q?
Goto B?
IfEnd?
If E<1?
Then Green Text 45,2,"MISS"?
Text 45,2," "? '17
1+Q->Q?
Goto B?
IfEnd?
IfEnd?
If Q>=2 Or Q<=theta?
Then Int 2Ran#+1->R?
Q>theta=>1?Q?
Q>theta=>Goto B?
Mat S[3,Z]->T?
Mat S[4,Z]->M?
Mat S[7,Z]->L?
Mat R[9,1]->E?
Mat R[6,1]->V?
Mat R[7,1]->P?
If R=1?
Then Text 45,2," "? '3
Text 45,2,"ATTACK"?
Text 45,2," "? '17
L/E->G?
If G>=1?
Then (Int TRan#+T)-Int VRan#->O?
O<0=>0->O?
Green Text 45,66,O?
H-O->H?
Text 3,60," "? '3
Text 3,60,H?
1+Q->Q?
Goto B?
IfEnd?
If G<1?
Then Text 45,2,"MISS"?
Text 45,2," "? '17
1+Q->Q?
Goto B?
IfEnd?
If R=2?
Then Text 45,2," "?
Text 45,2,"MAGIC"?
Text 45,2," "?
L/E->K?
If K>=1?
Then (Int MRan#+M)-Int PRan#->O?
O<0=>0->O?
Text 45,66,O?
H-O->H?
Text 3,60," "? '3
Text 3,60,H?
1+Q->Q?
Goto B?
IfEnd?
If K<1?
Then Text 45,2,"MISS"?
Text 45,2," "? '17
1+Q->Q?
Goto B?
IfEnd:IfEnd:IfEnd?
Goto 9?
#23
Posted 28 June 2004 - 02:57 AM
e-mail: crimsoncasio AT casiocalc.org
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users