Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => Topic started by: g28401 on December 10, 2005, 10:33:00 am

Title: My really crappy game...Dragonslayer
Post by: g28401 on December 10, 2005, 10:33:00 am
I am working on a text-based RPG for my TI-84+ SE  that sucks major, probably because I am not that good at programming.  Some help in better and slightly more technological ways to program would be nice.  I will post a link to the game download, as soon as I find my link cable





Title: My really crappy game...Dragonslayer
Post by: Ranman on December 10, 2005, 11:28:00 am
Programming is a continuous learning experience. We all have to start somewhere.

You have come to a good place to advice and support. :Dbiggrin.gif
Title: My really crappy game...Dragonslayer
Post by: tenniskid493 on December 10, 2005, 11:32:00 am
It would help if you posted your code as well as what you are planning/want to incorporate into the program.

[offtopic]@g28401  You need to close all of your tags like font, size, and color by using [/font] or [/size] or [/color]  [/offtopic]

back on topic:

Anyone here will be more than willing to help you out so just post a question and be prepared for 10 different opinions on how to solve it (LOL  :Dbiggrin.gif )
Title: My really crappy game...Dragonslayer
Post by: g28401 on January 17, 2006, 05:10:00 pm
Here is the link to the (sucky) Dragonslayer website
http://www.geocities.com/notrilia_republic/games/dragonslayer.html  yeah, I am not done with the game so it is very short, so watch the text fly!
Title: My really crappy game...Dragonslayer
Post by: tenniskid493 on January 17, 2006, 06:11:00 pm
cool...I just tried it.  It's good.  I like the story so far.  the only thing is you might want to estabilish a standard for the way you ask for an input.  You used 3-4 different styles and it seemed a little wierd.  Other than that, I like where its going.  Have you ever thought about making it graphical??
Title: My really crappy game...Dragonslayer
Post by: CDI on January 18, 2006, 12:17:00 am
@tenniskid493 - No, not yet... he needs to finisg an RPG (or get close) before we percribe xLIB :Dbiggrin.gif TURST me
Title: My really crappy game...Dragonslayer
Post by: tenniskid493 on January 18, 2006, 01:58:00 am
LOL..good point.  First finish up this text one.  Those are always good to start.  Then once you finish we can help you make it with graphics and make it a really sweet game.  If you need any help with anything...feel free to ask.
Title: My really crappy game...Dragonslayer
Post by: DJ Omnimaga on January 18, 2006, 03:00:00 am
hmm reminds me of those old D&D books, but you should change the input to something like "1:YES 2:NO" so we know that 1 is yes and 2 is no all the time. Also when new text appears you should do a clrhome before displaying the next one so its better. Anyway I guess this might be a good idea for starting up, then you can start messing with homescreen walking maps and magic animations then maybe even xLIB
Title: My really crappy game...Dragonslayer
Post by: kalan_vod on January 18, 2006, 05:06:00 am
I will relook the code, but you have many subprograms and a few things could be done differentlly.
Title: My really crappy game...Dragonslayer
Post by: g28401 on January 18, 2006, 06:21:00 pm
Sorry for the unincluded picture in the Guild path, I accidently deleted it, yeah, a friend who has artistic ability will be drawing the Red Dragon symbol  Yeah, I am actually doing this to kill time at school  :woot:woot.gif

When i get back to my cable I will fix that and standardize everything, (I don't have my cable with me.)

The ultimate goal is to end the game with the slaying of a dragon...be it figurative or real.  
Title: My really crappy game...Dragonslayer
Post by: tenniskid493 on January 19, 2006, 03:56:00 am
Sounds cool.  If I have time tonight, I'll look through your code and look for some optimizations.:Dbiggrin.gif:Dbiggrin.gif

Please try to avoid double or triple posts. You can use the EDIT button to edit your posts.  Its not a big problem, just one of those little things.  
Title: My really crappy game...Dragonslayer
Post by: Liazon on January 19, 2006, 04:52:00 am
QuoteBegin-CDI+18 January 2006, 6:17-->
QUOTE (CDI @ 18 January 2006, 6:17)
@tenniskid493 - No, not yet... he needs to finisg an RPG (or get close) before we percribe xLIB :Dbiggrin.gif TURST me  

 What about me?  I've never created a true Calc RPG.  Then again, that might be why it is taking me forever to make DEM.  (besides the lack of calc and broken computer, and other setbacks  :Dbiggrin.gif )
Title: My really crappy game...Dragonslayer
Post by: kalan_vod on January 19, 2006, 09:02:00 am
I just went through and made a few optimizations that saved 169 bytes. So one thing you may want to do like kevin said, pick one way of getting user input.
http://webzoom.freewebs.com/kalans/music/dragoo.8xg
Title: My really crappy game...Dragonslayer
Post by: dragon__lance on January 19, 2006, 03:20:00 pm
nice optimising kalan_vod :thumb:google.gif and looks good :Dbiggrin.gif
Title: My really crappy game...Dragonslayer
Post by: kalan_vod on January 19, 2006, 04:52:00 pm
@dragon_lance: Well I could have gone more, but I think it's more of a learning experiance to do it yourself (not you but g28401). And Thanks! ;)wink.gif

@g28401: There are several ways you could reduce the number of programs which you have. Also user input is rather easier using the getkey function where they could press 1/2 instead of doing 1 and then enter. Well making that way would increase program size by a lot. Unless you would like to have a sub routine to call each time you request user input.
Title: My really crappy game...Dragonslayer
Post by: g28401 on January 19, 2006, 05:54:00 pm
Um, I really don't know how to do much of anything, except what was in the game so far.  Having a different sub-routine each time is getting complicated, so learning the getkey function would be cool.  Oh, and the picture thing on the guild path is going to be fixed in a couple of minutes.

EDIT:I am currently having trouuble getting the group to upload to my website. Don't try to download the game because it doesn't exist right now  :dang:banghead.gif

LATER

It ain't working. Tommorow i will try again   :paf:tripaf.gif
Title: My really crappy game...Dragonslayer
Post by: tenniskid493 on January 20, 2006, 02:00:00 am
Probably the best way you could do user-input would be to use one sub-program just for that.  This way it saves a lot of space and, if you want to change it to something different, you only have to change one program.  Also, making a text-decoder would help save a lot of space as well because you would only have 1 Disp instead of a lot.
Title: My really crappy game...Dragonslayer
Post by: g28401 on January 20, 2006, 01:39:00 pm
The problems have been solved.

###########################################

BTW, is it possible to create a bitmap image on the computer and send it to the calculator?
Title: My really crappy game...Dragonslayer
Post by: kalan_vod on January 20, 2006, 02:03:00 pm
Nope.
Title: My really crappy game...Dragonslayer
Post by: DJ Omnimaga on January 20, 2006, 03:50:00 pm
indeed it is possible, you need to save it in 96x64 dimensions, use Image Studio http://omnimaga.dyndns.org/index.php?showtopic=268 to convert your image to 8xi file, and use TI connect to send it to the calculator :)smile.gif

I believe TI connect can convery bmp files to 8xi but I'm not sure
Title: My really crappy game...Dragonslayer
Post by: kalan_vod on January 20, 2006, 04:59:00 pm
Well that's good news to me then :Pblah.gif.
Title: My really crappy game...Dragonslayer
Post by: Spellshaper on January 21, 2006, 02:28:00 am
yep TI-connect can do the job, too :)smile.gif
Title: My really crappy game...Dragonslayer
Post by: kalan_vod on January 21, 2006, 08:30:00 am
So have you looked at the optimizations yet? And have they helped you?
Title: My really crappy game...Dragonslayer
Post by: g28401 on January 21, 2006, 11:06:00 am
Tommorow when I get back to MY computer i will take a look at those optimizations.  how do you use the getkey function?  
Title: My really crappy game...Dragonslayer
Post by: tenniskid493 on January 21, 2006, 01:11:00 pm
The getkey function works very simply.  It detects when a key is being pressed and then assigns a value that corresponds with that key to a variable.  However, getkey doesn't wait for you to press a key, it just passes right over it and assigns it to it once, so you will need to put it inside of a loop.  Here is an example code: (Keep in mind that "<>" = "Not equal to" and "->" is the Store key.

c1-->
CODE
ec1Repeat K<>0
Getkey->K
End
c2
ec2

This example will continue to loop until you press a key.  This is because if your program passes over a Getkey and no keys are being pressed, it assigns 0 to the variable that is stored from the Getkey (In my example that was K).  If you would like to detect a certain key, just change my 0 to something else.  The way the values work is first the row # and then the column #.  For example, Enter would be 105 because its in the 10th row and the 5th column or Y= would be 11 because its in the 1st row and the 1st column.

As programming is always a learning experience, I think its better for me to not give you the exact code that you need, but rather you try to use this information to develop your own code.  If you have any further questions, don't hesitate to ask.  My suggestion for trying to learn how to detect input, would be to first just make a dummy program that checks for two different keys being pressed, and then have it say something like "You pressed left" or "You pressed right".  Then try to implement what you learned into what you need for your game.
Title: My really crappy game...Dragonslayer
Post by: kalan_vod on January 21, 2006, 02:23:00 pm
In your game you will notice a few getkey functions I used, waiting for the user to press any key instead of having to press enter.
c1-->
CODE
ec1Repeat getkey
Endc2
ec2
If no key is pressed then it will keep going (stays in the loop), but when a key is pressed it passes the loop. Another example I did is.
c1
-->
CODE
ec1Repeat Ans
getkey->K
Endc2
ec2
Title: My really crappy game...Dragonslayer
Post by: g28401 on January 22, 2006, 05:44:00 am
I am unable to look at the optimizations...My computer is being an a**.
Title: My really crappy game...Dragonslayer
Post by: kalan_vod on January 22, 2006, 08:27:00 am
Try http://www.cemetech.net/projects/basicelite/sourcecoder2.php or just send it to your calc.
Title: My really crappy game...Dragonslayer
Post by: g28401 on February 01, 2006, 06:25:00 pm
You have been banned from this forum.
Please contact the webmaster or board administrator for more information.
wtf???
Next version of DS will be up soon (minor changes)
Title: My really crappy game...Dragonslayer
Post by: kalan_vod on February 01, 2006, 06:30:00 pm
Well he is debugging the sourcecoder2 so just use sc1.
http://www.cemetech.net/projects/basicelite/sourcecoder.php
Title: My really crappy game...Dragonslayer
Post by: DJ Omnimaga on February 02, 2006, 02:44:00 am
lol that was fun when I saw this message, I was like wtf why would kerm ban me? ^^
Title: My really crappy game...Dragonslayer
Post by: g28401 on February 02, 2006, 06:18:00 pm
k in one moment the lates version will be up.  there is now an alignment feature. (run pgrmLOSE) and I used getkey for descions.
Title: My really crappy game...Dragonslayer
Post by: kalan_vod on February 02, 2006, 06:40:00 pm
Cool, did the optimizations help any?
Title: My really crappy game...Dragonslayer
Post by: g28401 on February 03, 2006, 03:07:00 am
I will try to look at them tonight...I have to leave in 20 minutes.
Title: My really crappy game...Dragonslayer
Post by: tifreak on February 03, 2006, 03:18:00 am
Might I suggest you look over http://tifreakware.calcgames.org/bt83plm.htm as they are geared toward gaming/RPG making, and then post any questions you have here... :)smile.gif
Title: My really crappy game...Dragonslayer
Post by: kalan_vod on February 03, 2006, 09:38:00 am
Shameless plug eh? :Dbiggrin.gif But yeah I would like to see this finished (it looks and sounds great).
Title: My really crappy game...Dragonslayer
Post by: DJ Omnimaga on February 03, 2006, 01:38:00 pm
before I stopped coming on #tcpa when someone new asked where to learn about programming I always pointed them there :Dbiggrin.gif
Title: My really crappy game...Dragonslayer
Post by: Radical Pi on February 03, 2006, 01:55:00 pm
Your Lesson 8 was my savior at one point. :)smile.gif
(yeah, this is one of those moments when if I say anything else it's ruined.)
Title: My really crappy game...Dragonslayer
Post by: g28401 on March 12, 2006, 01:33:00 pm
SOrry it's been a while, I hav been out of it, playin Rakion, doing schoolwork, etc.  I am finsishing up a crappy DDR take-off I made one day in math class.  It will be up *soon* hehe.  I will probably gather a bit more knowledge and restart Dragonslayer, so, yeah.
Title: My really crappy game...Dragonslayer
Post by: dragon__lance on March 12, 2006, 01:37:00 pm
cool! hope to hear more progress! :)smile.gif
Title: My really crappy game...Dragonslayer
Post by: Spellshaper on March 13, 2006, 04:32:00 am
nice to see u back :thumb:google.gif


[off topic]
QuoteBegin-g28401+-->
QUOTE (g28401)
playin Rakion,


kewl... will u gimme your char name for my buddy list? ^^
(Currently I
Title: My really crappy game...Dragonslayer
Post by: Krid on March 13, 2006, 09:31:00 am
Good to see you're back :)smile.gif Looking forward to more updates.
Title: My really crappy game...Dragonslayer
Post by: g28401 on March 16, 2006, 07:42:00 pm
QuoteBegin-Spellshaper+Mar 13 2006, 10:32-->
QUOTE (Spellshaper @ Mar 13 2006, 10:32)
nice to see u back :thumb:google.gif


[off topic]
QuoteBegin-g28401+-->
QUOTE (g28401)
playin Rakion,


kewl... will u gimme your char name for my buddy list? ^^
(Currently I
Title: My really crappy game...Dragonslayer
Post by: DJ Omnimaga on March 17, 2006, 10:34:00 am
I hope to see it soon :)smile.gif
Title: My really crappy game...Dragonslayer
Post by: g28401 on March 17, 2006, 04:11:00 pm
Yeah.  The changes from the way I was programming DragonSlayer is:
I am using the Lbl and Goto commands
I am using the Stop command
Archiving variables
Getkeys instead of Pauses.
Title: My really crappy game...Dragonslayer
Post by: tenniskid493 on March 17, 2006, 05:39:00 pm
QuoteBegin-g28401+Mar 17 2006, 21:11-->
QUOTE (g28401 @ Mar 17 2006, 21:11)
I am using the Lbl and Goto commands

99% of the time, lbls and Gotos can be avoided.  The only time they absolutely can't be avoided is if you are using the Menu( command.  The reason they are bad is because they can cause memory leaks.  This means that, whenever you enter a loop, the calculator stores some data telling it to look for an end.  When it reaches the end of the loop, this information is opened up again.  However, if you break up a loop with a Goto so that it never reaches the end, that memory space is wasted, thus causing a memory leak.  This will lead to an annoying Err:Memory message that will cause you to have to quit out in the middle of the game.  Gotos and Lbls can always be replaced with If:Then statments.  Instead of saying:
c1
-->
CODE
ec1If A=5
Goto 99c2
ec2
you could say
c1
-->
CODE
ec1If A=5
Then
(Put what was at Lbl 99 here)
Endc2
ec2

If you are performing the same function many times in different spots throughout the program, then you might want to make sub-programs.  Then you would do
c1
-->
CODE
ec1If A=5
prgm???c2
ec2
Where you put whatever was at Lbl 99 into prgm???

Hope this helped you out.  If you still need more help or have any questions, feel free to ask.  Also, if you have a specific question about your code, you could post a portion of your code and we could have a look at it and let you know the best way to go about what you want to accomplish.
Title: My really crappy game...Dragonslayer
Post by: g28401 on March 18, 2006, 02:04:00 pm
I have a couple questions:
Text Decoders? What's This?
How can you use one subroutine for many functions?
Many more, but can't think of them all ;O
Title: My really crappy game...Dragonslayer
Post by: Spellshaper on March 19, 2006, 01:27:00 am
1. A text decoder is a prgm that takes the contents of a string and displays it as text. This saves a lot of space if u use many dialogues, but is a bit slower than text(

2. For example: Write your function inside an if-construction like

If var= something
then
do stuff
End

and repeat this for every function. That way, u have one function library to call upon instead of many lil prmgs.
Title: My really crappy game...Dragonslayer
Post by: g28401 on March 19, 2006, 11:22:00 am
Ok, If you could translate this into *simple* terms I could understand I would be thankful :Dbiggrin.gif
Title: My really crappy game...Dragonslayer
Post by: Spellshaper on March 19, 2006, 11:37:00 am
1. try http://www.ticalc.org/archives/files/fileinfo/378/37880.html

2. Instead of writing a function every time it is needed, put them into 1 prgm

example:

PROGRAM:LIB
:If A=1
:then
:For(A,0,100    /this just slows down the prgm...
:End
:End
:If A=2
:then
:12
:Asm(prgmCODEX    /this shuts down the calc until ON is pressed, needs CODEX
:Repeat getkey
:End
:End


to call upon function1, do

:1->A
:prgmLIB


for function2

:2->A
:prgmLIB