This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
United-TI Archives -> TI-Basic
 
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Author Message
Shiver


Newbie


Joined: 13 Feb 2010
Posts: 4

Posted: 13 Feb 2010 03:58:55 pm    Post subject:

Hi,

I'm new out here and I wanna program a RPG game on my TI-83+. The thing is that the only thing I ever programmed was stuff to help me at school such as Pytagore, Area & Volume, etc... I never programmed game.

I use to understand program by looking at the code, but I can't find RPG code..

Anyone can explain me (in brief) the steps to follow to create a game ?

Also, anyone have a game code I could see ? Don't worry, I won't copy ;)

Thank you very much,

Shiver

P.S. How do we set the controls ? (e.g. Right key means go right)
Back to top
Graphmastur


Advanced Member


Joined: 25 Mar 2009
Posts: 360

Posted: 13 Feb 2010 04:27:51 pm    Post subject:

Look at getkey for controls. One thing, though. If you have no idea where to start, I would start making smaller things like tic-tac-toe.
Back to top
ztrumpet


Active Member


Joined: 06 May 2009
Posts: 555

Posted: 13 Feb 2010 06:03:19 pm    Post subject:

getKey: http://tibasicdev.wikidot.com/getkey
This is a great site to learn commands at: http://tibasicdev.wikidot.com/home

Good luck!
Back to top
Bhaliar


Member


Joined: 16 Nov 2009
Posts: 221

Posted: 14 Feb 2010 01:14:28 am    Post subject:

Well like they said you need to know the neccasary codefirst. Then, you'll have to think of how the controls are. is it just Menu's r maybe some actual movement. Then you need to build the thigs up. A good thing to lean to do first is how to disp a character on the home or graph screen and have them move when you press the right buttons. Small things like that.
Back to top
Shiver


Newbie


Joined: 13 Feb 2010
Posts: 4

Posted: 14 Feb 2010 05:01:02 pm    Post subject:

Ok, thx a lot guys Smile

Btw, is it better to make the maps and movements in the Home Screen or in the Graph Screen ?
Back to top
JoeYoung


Advanced Member


Joined: 15 Nov 2008
Posts: 316

Posted: 14 Feb 2010 07:35:56 pm    Post subject:

Shiver wrote:
Ok, thx a lot guys Smile

Btw, is it better to make the maps and movements in the Home Screen or in the Graph Screen ?




That's a matter of opinion. homescreen is easier and faster but graphscreen has the most potential for nice graphics.

however, some amazing games have used homescreen maps. notable projects are pokemon purple or half the projects Omni makes.

if you're starting out, I recommend visiting omnimaga.org . you won't find me there, but you'll get plenty of help and support no matter which style you choose.
Back to top
ztrumpet


Active Member


Joined: 06 May 2009
Posts: 555

Posted: 15 Feb 2010 09:53:29 am    Post subject:

I'm more active over on Omnimaga, but UTI is nice too. If you would like to see what can be done on the homescreen, then look no farther than this game: http://www.omnimaga.org/index.php?action=d...a=view;down=455
It uses one asm program, to copy a program into RAM from Archive, so it can be ran. Other than that the entire >100000 byte game is written in Basic. Illusiat 13 is my favorite calc game ever, and I'm pretty sure it's opened people's eyes to what can be done on the homescreen. :)

Since this is you're first game, I'd reccomend writing it on the homescreen. However if you would like to see what can be done on the graphscreen, the I would like to point out my current project, Elmgon: http://www.omnimaga.org/index.php?topic=1326.0

Good luck! Very Happy


Last edited by Guest on 15 Feb 2010 09:54:02 am; edited 1 time in total
Back to top
Shiver


Newbie


Joined: 13 Feb 2010
Posts: 4

Posted: 15 Feb 2010 08:31:36 pm    Post subject:

I began to learn how to make maps with Ti-Basic Dev (great site btw) and it seems way easier in the homescreen.

For my project, I don't want real nice graphics.. Just some letters to make the walls, etc.. So I guess the homescreen is a good choice, am I right ?

Still trying to figure out how to move... But I'll keep at it and get along with it!

Another thing, how do we say that, for example, when I press the "," key, it opens an in-game menu ?

Thx a lot for your helpful answer :D

Shiver
Back to top
Graphmastur


Advanced Member


Joined: 25 Mar 2009
Posts: 360

Posted: 15 Feb 2010 08:49:29 pm    Post subject:

Well, the getkey for that is 62, I believe. So basically, you would have a variable that would hold the status of the menu. If the menu was closed, the arrows move the character. If the menu is open, arrows allow selecting in the menu. Just use the key to toggle that variable and displaying the menu vs displaying the game.
Back to top
ztrumpet


Active Member


Joined: 06 May 2009
Posts: 555

Posted: 15 Feb 2010 08:52:36 pm    Post subject:

It's great to see you progress. :)

If you would like comma to open up a menu, you'd need to do something like this:
:getKey->K
:If K=62
:Then
Menu code here
:End

Movement is something like this (I'm only moving left and right, so you can figure out up and down. Smile ):
:8->A
:ClrHome
:Repeat K=105 //Loop until you press Enter
:Output(1,A," //One Space
:Repeat Ans //Loop until you press any key
:getKey->K
:End
:Output(1,A,"*
:A+(Ans=26 and A<16)-(Ans=24 and A>1->A //Note how the closing parenthesis is not needed before the "->".
:End


Last edited by Guest on 17 Feb 2010 04:53:08 pm; edited 1 time in total
Back to top
kinkoa


Member


Joined: 28 Jul 2009
Posts: 103

Posted: 16 Feb 2010 09:55:57 am    Post subject:

Ill help you but if this is your first game youve made you should probably start with something a little easier

to make a constant movement

:1->X:1->Y
:4->A:7->B
:DelVar KWhile not(K
:Output(A,B,"_
:If A=1 or A=8
:-X->X
:If B=1 or B=16
:-Y->Y
:Output(A,B,"*
:End


for controlled movement just use ztrumpets example

also another thing about your menu yes the , is 62 but i figured something out the menu is not on the homescreen but on a seperate screen; dont know if that helps but it could


Last edited by Guest on 01 Jul 2010 09:04:52 am; edited 1 time in total
Back to top
Bhaliar


Member


Joined: 16 Nov 2009
Posts: 221

Posted: 16 Feb 2010 12:27:30 pm    Post subject:

Like they said the best to use would be the graph screen. It's easier to manage an output code then a text code. The best thing would be maybe to make a game where you select options of mensu to do things. Then once you have finished it, to move up to a game where you actually can move something and attack. I finished one recently, but haven't optimized it. Its on my brothers calculator so I don't see much of it. But it had magic, different weapons, levelling up, an inn, and a single enmy. I meant to add them in, but the program size grew to 4000+ bytes so I stopped.
Back to top
Shiver


Newbie


Joined: 13 Feb 2010
Posts: 4

Posted: 16 Feb 2010 07:53:47 pm    Post subject:

Okay, thx a lot for all your fast replies, this is really helpful, thank you :)

I understand some parts (in fact, I think I do), but I don't catch some others..

For example, with Ztrumpet's code :
[what I add is in red]

:8->A // I guess the variable A stand for the X axis and the "8" is because you make start the character (*) on the center, right ?
:ClrHome // If you had put this at first, would it be alright anyway ?
:Repeat K=105 //Loop until you press Enter, since the 105 is the ID for Enter key
:Output(1,A," //One Space. I'm not quite sure to understand what this means (1,A,")
:Repeat Ans //Loop until you press any key. Here, the Ans stands for the variable stored in K, such has 24 if I was going left ?
:getKey->K // Isn't it suppose to be before the Repeat Ans ? Probably not, since you made it and you are more advanced that I ^^"
:End // Why do you put a End in the middle of a prgm ?
:Output(1,A,"* // Still not figure out..
:A+(Ans=26 and A<16)-(Ans=24 and A>2->A // Ok, here, I'm totally lost..
:End

------------

Yeah I know, so much noob questions, but we have to begin somewhere, eh?

Quote:
Ill help you but if this is your first game youve made you should probably start with something a little easier

Yeah, this is my first game, but I made a lot of prgm before. But don't worry, I won't jump on the big stuff right now, I just begin by making little stuff to understand every concepts, etc..

Quote:
It's great to see you progress.

It's all because of you guys, thank you very much Very Happy
Back to top
kinkoa


Member


Joined: 28 Jul 2009
Posts: 103

Posted: 17 Feb 2010 09:33:58 am    Post subject:

Shiver wrote:
:8->A // I guess the variable A stand for the X axis and the "8" is because you make start the character (*) on the center, right ?
:ClrHome // If you had put this at first, would it be alright anyway ? Yes it would be fine as long as you dont put it in the loop
:Repeat K=105 //Loop until you press Enter, since the 105 is the ID for Enter key thats right
:Output(1,A," //One Space. I'm not quite sure to understand what this means (1,A,") the 1 in it is the location in rows so it would be first row or "Output(*row*,*column*,*display*" that should help you understand
:Repeat Ans //Loop until you press any key. Here, the Ans stands for the variable stored in K, such has 24 if I was going left ? yes
:getKey->K // Isn't it suppose to be before the Repeat Ans ? Probably not, since you made it and you are more advanced that I ^^" no it goes inside the loop to read the keypresses
:End // Why do you put a End in the middle of a prgm ? because there are two loops here this is the end of the Repeat Ans loop
:Output(1,A,"* // Still not figure out..
:A+(Ans=26 and A<16)-(Ans=24 and A>2->A // Ok, here, I'm totally lost.. this is the logic statement that makes it move with the keypresses and sets the area that it can go in a better way to do it would be max(16min(2(A+(ans=26)-(ans=24->A
:End

if you dont know what a loop is

While
For(
Repeat
these are example of loops


Last edited by Guest on 01 Jul 2010 09:05:40 am; edited 1 time in total
Back to top
ztrumpet


Active Member


Joined: 06 May 2009
Posts: 555

Posted: 17 Feb 2010 04:52:54 pm    Post subject:

shadowking wrote:
a better way to do it would be max(16min(2(A+(ans=26)-(ans=24->A
I'd do that this way:
:A+(Ans=26)-(Ans=24
:Ans-((Ans=16)-not(Ans->A

My way is bigger (29 to 22 bytes), but I don't see how yours works. Did you forget commas?
(This one will wrap around the screen, but it's a lot more complex than the code I posted earlier.)

Here's the one I posted earlier:
:A+(Ans=26 and A<16)-(Ans=24 and A>1->A
Here's what is happening:
Value in Variable A is added to either a 1 (Ans, which has the keypress in it, equals 26, right arrow and A is not equal to 16) or a 0 (Ans dose not equal 26 or A is 16) and then (due to order of operations) (Ans=24 and A>1) is subtracted form it. The result is stored into A.
Here's a helpful page: http://tibasicdev.wikidot.com/deleted:boolean (it may be being deleted, but I like it better than: http://tibasicdev.wikidot.com/piecewise-expressions )

shadowking wrote:
if you dont know what a loop is

While
For(
Repeat
these are example of loops
http://tibasicdev.wikidot.com/sk:loops

Good luck!


Last edited by Guest on 01 Jul 2010 09:05:57 am; edited 1 time in total
Back to top
Bhaliar


Member


Joined: 16 Nov 2009
Posts: 221

Posted: 24 Feb 2010 09:14:13 pm    Post subject:

:8->A //
:ClrHome //
:Repeat K=105 //
:Output(1,A," //
:Repeat Ans //
:getKey->K //
:End //
:Output(1,A,"* // ..
:A+(Ans=26 and A<16)-(Ans=24 and A>2->A //
:End

The way it works is 1 is Stored to the variable A. The loop starts and The Character * is displayed on the first row, and the Ath column. Then, it takes a and if you pressed right and you have enough room, the * goes right. IF you press Left and have enough room, it goes left.
Back to top
ztrumpet


Active Member


Joined: 06 May 2009
Posts: 555

Posted: 24 Feb 2010 09:35:35 pm    Post subject:

Bhaliar wrote:
The way it works is 1 is Stored to the variable A.

Do you mean 8 is stored to A?
Back to top
kinkoa


Member


Joined: 28 Jul 2009
Posts: 103

Posted: 25 Feb 2010 09:13:39 am    Post subject:

Bhaliar wrote:
:8->A //
:ClrHome //
:Repeat K=105 // this wont work it needs to be K/=105; thats does not equal
:Output(1,A," //
:Repeat Ans //
:getKey->K //
:End //
:Output(1,A,"* // ..
:A+(Ans=26 and A<16)-(Ans=24 and A>2->A //
:End

The way it works is 1 is Stored to the variable A. The loop starts and The Character * is displayed on the first row, and the Ath column. Then, it takes a and if you pressed right and you have enough room, the * goes right. IF you press Left and have enough room, it goes left. it doesnt store 1 into A it stores A+1 or A-1 depending on which you pressed


Last edited by Guest on 25 Feb 2010 09:13:59 am; edited 1 time in total
Back to top
Bhaliar


Member


Joined: 16 Nov 2009
Posts: 221

Posted: 25 Feb 2010 06:22:05 pm    Post subject:

No, I meant 8 sorry. Typo.
Back to top
FinaleTI


Advanced Newbie


Joined: 28 Oct 2009
Posts: 81

Posted: 27 Feb 2010 01:19:07 pm    Post subject:

shadowking wrote:
Bhaliar wrote:
:8->A //
:ClrHome //
:Repeat K=105 // this wont work it needs to be K/=105; thats does not equal
:Output(1,A," //
:Repeat Ans //
:getKey->K //
:End //
:Output(1,A,"* // ..
:A+(Ans=26 and A<16)-(Ans=24 and A>2->A //
:End

The way it works is 1 is Stored to the variable A. The loop starts and The Character * is displayed on the first row, and the Ath column. Then, it takes a and if you pressed right and you have enough room, the * goes right. IF you press Left and have enough room, it goes left. it doesnt store 1 into A it stores A+1 or A-1 depending on which you pressed



Actually, the loop condition is correct. If it was a While loop, you would be right, but a Repeat loop works with Repeat K=105. If you use Repeat K≠105, then it will run through the loop once and end, not allowing movement, but only updating the screen with the *.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2  Next
» View previous topic :: View next topic  
Page 1 of 2 » All times are UTC - 5 Hours

 

Advertisement