Jump to content



Photo
- - - - -

The Shortest Game Ever


  • Please log in to reply
18 replies to this topic

#1 genesis

genesis

    UCF BASIC Programming Runner Up

  • Super Member
  • PipPipPipPip
  • 281 posts
  • Location:Perth, Australia
  • Interests:Speaking German, computers, defending CFX calculators...

  • Calculators:
    CFX 9850 GB+

Posted 16 November 2003 - 02:46 PM

As my cable is broken I am reduced to short codes, whilst making a new game I fiddled around with the layout for the main loop and came up with this. Paste it in a program called Dodge and its really simple. You are 1 and you have to dodge 2, play with some friends and have a laugh. Tell me your high score, mine is 255...

ClrText
11->A~C:3->D~E
For 3->B To 5
Locate 10,B,"---"
Next
Do
Getkey
If Ans=27 And A<12
Then Locate A,B,"-"
Isz A
IfEnd
If Ans=28 And B>3
Then Locate A,B,"-"
Dsz B
IfEnd
If Ans=37 And B<5
Then Locate A,B,"-"
Isz B
If Ans=38 And A>10
Then Locate A,B,"-"
Dsz A
IfEnd
Locate A,B,1
Int 4Ran#
If Ans=0 And C<12
Then Locate C,D,"-"
Isz C
IfEnd
If Ans=1 And D>3
Then Locate C,D,"-"
Dsz D
IfEnd
If Ans=2 And D<5
Then Locate C,D,"-"
Isz D
If Ans=3 And C>10
Then Locate C,D,"-"
Dsz C
IfEnd
Locate C,D,2
Isz E
LpWhile AB=/=CD- Disp -
E


BTW, my game on my site will be the same one as the comp except with correct plurals :lol:. Enjoy!

#2 casiokingdom

casiokingdom

    UCF BASIC Programming 2nd Place

  • Members
  • PipPipPipPipPipPipPip
  • 782 posts
  • Gender:Male
  • Location:Perth, WA, Australia

  • Calculators:
    CFX-9850GB PLUS WE, fx-9860G AU

Posted 17 November 2003 - 01:03 AM

More like: The crapest game ever!

kidding.........don't worry, i will play it.
First i must study for my exams

#3 genesis

genesis

    UCF BASIC Programming Runner Up

  • Super Member
  • PipPipPipPip
  • 281 posts
  • Location:Perth, Australia
  • Interests:Speaking German, computers, defending CFX calculators...

  • Calculators:
    CFX 9850 GB+

Posted 20 November 2003 - 10:48 AM

The LpWhile Getkey=/=31- Disp - command is VERY useful for pauses or end of game codes in text mode (if you press a key, the screen goes blank and usually your pressing in vain when its game over). It pauses the game and requires you to let go and press it again, the fastest code of it's function. Another great thing to use when doing the direction a character moves and is facing is using sine and cosine, they work very well.

--- EDIT ---
Here's what I mean by a minimum of one post to become a member: there are 200 members (over half!) who haven't made a post. Making members have an opening post also makes the forum more active and different (not the same people again and again).

#4 casiokingdom

casiokingdom

    UCF BASIC Programming 2nd Place

  • Members
  • PipPipPipPipPipPipPip
  • 782 posts
  • Gender:Male
  • Location:Perth, WA, Australia

  • Calculators:
    CFX-9850GB PLUS WE, fx-9860G AU

Posted 21 November 2003 - 07:27 AM

Do you mean their first post can start a new topic, introducing themselves?? as i think that will be a good idea

#5 huhn_m

huhn_m

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1957 posts
  • Gender:Male
  • Location:Germany / Dresden
  • Interests:Assembler(!!!)
    Computers and Programming
    Operating Systems
    Programmable Calculators
    Maths and everything arround it

  • Calculators:
    FX-82SX / AFX 2.0+ (ROM 1.03) / FX 1.0+ (ROM 1.03)

Posted 21 November 2003 - 11:34 AM

I don't think this is a good idea since it would float
the forum with senceless posts
without contants since members only want to join
but not to read anything. we had this discussion before.

Or the won't join at all.

#6 BiTwhise

BiTwhise

    Casio Overgod

  • [Legends]
  • PipPipPipPipPipPipPip
  • 627 posts
  • Gender:Male
  • Location:Guildford, Surry, UK
  • Interests:Programming, games, consoles, martial arts

  • Calculators:
    FX9700WE, CFX9970G, AFX2.0, Classpad 300

Posted 21 November 2003 - 09:25 PM

Here's what I mean by a minimum of one post to become a member: there are 200 members (over half!) who haven't made a post. Making members have an opening post also makes the forum more active and different (not the same people again and again).

That the same people post over and over agian, is not a bad thing..

The people who are most interested would naturally post most, and to force low posters to post doesn't make the forum higher quality..

Some of our members are in here to learn, some to excange knowlegde and ideas, some to look for answers to specific questions they might have. The point is, not everyone in here needs to post to take use of the forum... and that's good :)

Obviously it would be nice to see some new names taking part in discussions every once in a while, but that's achieved through promoting the forum and adding members, not by forcing current members to post (and perhaps leave the forum)

If poeple feel like introducing themselves, they're free to do so in the free discussion forum.

#7 Overlord

Overlord

    Casio Technician

  • Moderator
  • PipPipPipPipPipPip
  • 355 posts
  • Gender:Male
  • Location:Brussels - Belgium
  • Interests:Math Researcher

  • Calculators:
    My head - C300 OS 3.00 - G100 Rom 1.02 - G65 - G60 - G25

Posted 21 November 2003 - 09:53 PM

Do you mean their first post can start a new topic, introducing themselves?? as i think that will be a good idea

i think it's a not so good idea, for example, i've been here since a long time : at the begin i came here as an "observator", i was only reading and not posting. And i hate presentations :P (especially when i must write something about me)

#8 casiokingdom

casiokingdom

    UCF BASIC Programming 2nd Place

  • Members
  • PipPipPipPipPipPipPip
  • 782 posts
  • Gender:Male
  • Location:Perth, WA, Australia

  • Calculators:
    CFX-9850GB PLUS WE, fx-9860G AU

Posted 22 November 2003 - 06:46 AM

When i first joined i was a poster! :D

But i found it hard to get to know many of the members, as you can't really introduce yourself properly.

#9 casiokingdom

casiokingdom

    UCF BASIC Programming 2nd Place

  • Members
  • PipPipPipPipPipPipPip
  • 782 posts
  • Gender:Male
  • Location:Perth, WA, Australia

  • Calculators:
    CFX-9850GB PLUS WE, fx-9860G AU

Posted 23 November 2003 - 06:46 AM

Genesis, i played your game today. Your code had a few minor bugs (eg. missed comma etc.).

But, it's fun and quite hard. my best score is only 74! :(
=============EDIT===============
make that 126!

#10 genesis

genesis

    UCF BASIC Programming Runner Up

  • Super Member
  • PipPipPipPip
  • 281 posts
  • Location:Perth, Australia
  • Interests:Speaking German, computers, defending CFX calculators...

  • Calculators:
    CFX 9850 GB+

Posted 23 November 2003 - 01:07 PM

Thanks, I changed them. How did you get the code, can you just paste it in a program and send it to your calc or do you need to type it from the screen? I can't beat 255, it's a one-off achievement.

I can see what you mean by a poster. Two posts in a row, usual antics eh, casiokingdom?

#11 casiokingdom

casiokingdom

    UCF BASIC Programming 2nd Place

  • Members
  • PipPipPipPipPipPipPip
  • 782 posts
  • Gender:Male
  • Location:Perth, WA, Australia

  • Calculators:
    CFX-9850GB PLUS WE, fx-9860G AU

Posted 23 November 2003 - 01:12 PM

Yeah, you must have been lucky to get that HS.

i copied your code on the post and pasted it in FA-123. i had to change a few letters though...also a few bugs. :) but it didn't take long.

BTW: i double posted because my posts we like 2 days apart. i have changed! :D I am know a careful poster.

#12 genesis

genesis

    UCF BASIC Programming Runner Up

  • Super Member
  • PipPipPipPip
  • 281 posts
  • Location:Perth, Australia
  • Interests:Speaking German, computers, defending CFX calculators...

  • Calculators:
    CFX 9850 GB+

Posted 30 November 2003 - 05:28 AM

What is the fastest snake game you've ever seen for CFX? This is the best I can do:

ClrText
{21,7->Dim Mat S
[[10,11,12][6,6,6->Mat T
For 10->A To 12
1->Mat S[A,6
Locate A,6,"O"
Next
6->B:1->C:0->D:3->E~F:11->G:4->H
Locate G,H,"*"
Lbl 0
Do
If Getkey=27
Then C=0=>1->C:0->D
IfEnd
If Getkey=28
Then 0->C:D=0=>-1->D
IfEnd
If Getkey=37
Then 0->C:D=0=>1->D
IfEnd
If Getkey=38
Then C=0=>-1->C:0->D
IfEnd
A+C->A:B+D->B
AB=0 Or A=22 Or B=8=>Goto 1
1->Mat S[A,B
Isz E
E>F=>1->E
Mat T[1,E->I
Mat T[2,E->J
A->Mat T[1,E
B->Mat T[2,E
If I>0
Then 0->Mat S[1,J
Locate I,J," "
IfEnd
If A=G And B=H
Then Isz F
Augment(Mat T,[[(zero)][0->Mat T
Do
Int 21Ran#+1->G
Int 7Ran#+1->H
LpWhile 1=Mat S[G,H
Locate G,H,"*"
IfEnd
LpWhile Getkey=/=31
Do
Getkey
LpWhile Ans=0 Or Ans=31
Goto 0
Lbl 1
ClrText
Locate 7,4,"Game over"
Do:LpWhile Getkey=/=31
Locate 7,7,"Score:"
Locate 14,7,F-3
Stop


You must use Stop if your program uses labels. As the statement Getkey=0 doesn't work, does anyone know what value is actually returned IN THAT STATEMENT for no buttons pressed? Someone told me it's 31 but Getkey by itself leaves 0 in Ans. Hmm, [0] is the first smiley conflict the forum has seen so far...

#13 huhn_m

huhn_m

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1957 posts
  • Gender:Male
  • Location:Germany / Dresden
  • Interests:Assembler(!!!)
    Computers and Programming
    Operating Systems
    Programmable Calculators
    Maths and everything arround it

  • Calculators:
    FX-82SX / AFX 2.0+ (ROM 1.03) / FX 1.0+ (ROM 1.03)

Posted 30 November 2003 - 06:24 AM

you can do:

do
loopwhile fract(getkey/10)=0

since the last number of getkey is only 0 if no button is pressed.
I used this as a workarround.

#14 genesis

genesis

    UCF BASIC Programming Runner Up

  • Super Member
  • PipPipPipPip
  • 281 posts
  • Location:Perth, Australia
  • Interests:Speaking German, computers, defending CFX calculators...

  • Calculators:
    CFX 9850 GB+

Posted 01 December 2003 - 10:22 AM

Here's the best I can do: 2Getkey=0. I'll replace it in the code.

=== EDIT ===
I'll leave it the way it is, multiple Getkey's in a row tends to stuff up programs.

#15 genesis

genesis

    UCF BASIC Programming Runner Up

  • Super Member
  • PipPipPipPip
  • 281 posts
  • Location:Perth, Australia
  • Interests:Speaking German, computers, defending CFX calculators...

  • Calculators:
    CFX 9850 GB+

Posted 05 December 2003 - 12:52 PM

Ok, call me a hippocrite huhn_m (or is the correct word hippocrit?). The first version of Killer Instinct is open for downloads (my signature). I need suggestions, especially errors and the location of pictures as I can't see them on my calc. Again, I must thank Bmp2Cat. Sorry, no combos or combo breakers... :(

#16 huhn_m

huhn_m

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1957 posts
  • Gender:Male
  • Location:Germany / Dresden
  • Interests:Assembler(!!!)
    Computers and Programming
    Operating Systems
    Programmable Calculators
    Maths and everything arround it

  • Calculators:
    FX-82SX / AFX 2.0+ (ROM 1.03) / FX 1.0+ (ROM 1.03)

Posted 05 December 2003 - 02:01 PM

???? I don't understand your questions. What do you want? The adresse of video ram is 1A00:0

#17 genesis

genesis

    UCF BASIC Programming Runner Up

  • Super Member
  • PipPipPipPip
  • 281 posts
  • Location:Perth, Australia
  • Interests:Speaking German, computers, defending CFX calculators...

  • Calculators:
    CFX 9850 GB+

Posted 06 December 2003 - 08:02 AM

Not that technical... I meant the positions of the players on the screen, not the address of the picture storage. And by not being able to see them I mean I haven't got a cable... what a coincidence.

#18 casiokingdom

casiokingdom

    UCF BASIC Programming 2nd Place

  • Members
  • PipPipPipPipPipPipPip
  • 782 posts
  • Gender:Male
  • Location:Perth, WA, Australia

  • Calculators:
    CFX-9850GB PLUS WE, fx-9860G AU

Posted 08 December 2003 - 01:48 AM

Genesis, i just played KI, and i am having a few difficulties.

Firstly, i can't see my oponent, only always an arrow (i know that means the opponent is out of the screen but does he ever come on the screen?) what's your opponent supposed to look like?

#19 genesis

genesis

    UCF BASIC Programming Runner Up

  • Super Member
  • PipPipPipPip
  • 281 posts
  • Location:Perth, Australia
  • Interests:Speaking German, computers, defending CFX calculators...

  • Calculators:
    CFX 9850 GB+

Posted 08 December 2003 - 08:39 AM

The readme has an explanation, incase anyone hasn't noticed, you can move too. Without moving the game gets boring and too difficult, moving adds an extra dimension. And also, you have to actually download the characters, as sometimes having pictures stored on your calc is good. If you want, you don't need pictures as RclPict doesn't use any memory if there are no pictures and you can be playing with ghosts... right... <_<




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users