Author |
Message |
|
Babyboy
Advanced Member
Joined: 11 Jun 2003 Posts: 499
|
Posted: 06 Apr 2004 07:48:49 pm Post subject: |
|
|
the second one uses all ten pics, the first has only pics, no code, and the 3rd uses only one pic
what are your thoughs as a gamer? |
|
Back to top |
|
|
DigiTan Unregistered HyperCam 2
Super Elite (Last Title)
Joined: 10 Nov 2003 Posts: 4468
|
Posted: 06 Apr 2004 08:15:02 pm Post subject: |
|
|
That's a tough one. It's all kind of circumstantial (sp?). For normal purposes though, I think it's safe to say most games don't require intricate patterns for backgrounds, portraits (etc), so I have to go with choice #2 or choice #3. As a general rule of thumb, an efficient prog would try to use as few vars as possible, so I chose choice #3. |
|
Back to top |
|
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 06 Apr 2004 08:20:52 pm Post subject: |
|
|
Is this a computer game, calc basic game, or what? I'm going to just assume TI Basic, since I don't really know anything about computer programming.
I'd say draw the pics at the beginning and store them for the rest of the game. Most people who play calc games don't even know what pics are, and when they send the game to a friend, it often doesn't work since they don't have the pics (error undefined). But if you draw the pics with hard-code every time they see it, the time it takes gets annoying. So what I ussually do is draw the pics hard-coded at the beginning, store the pics, and recall them as needed throughout the game.
Another way you could do it is to draw the pics the first time the game is run. You could do this by checking the high score or another list. If the number is equal to 0, draw and store the pics, maybe even give your user a nice little "loading" message. Else, just proceed with the game without drawing the pics. That way if it gets sent to another calc, they are drawn the first time, but not every time after.
Hopefully that's what you were asking. |
|
Back to top |
|
|
Jeremiah Walgren General Operations Director
Know-It-All
Joined: 24 May 2003 Posts: 1937
|
Posted: 06 Apr 2004 09:34:29 pm Post subject: |
|
|
I'd say it really depends on the situation. Having all the pics already is nice, but one might get lost in the transfer. Drawing it at the beginning of the program would save on the number of files transferred, but it would also take the extra time. (Etc...)
My personal opinion would be to create a seperate program that someone can run which will draw all the pics needed, and then it can be deleted or saved (if the pics are lost or something). |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 07 Apr 2004 07:50:23 am Post subject: |
|
|
Only use pics for temp storage so you don't have to redraw the whole level when you've accessed a menu for example. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 07 Apr 2004 08:11:35 am Post subject: |
|
|
Do you really need pics anyway? there are a lot of other ways to draw sprites. |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 07 Apr 2004 09:12:34 am Post subject: |
|
|
They're pretty handy when you need to redraw stuff like I said, other than that I don't see any use for them.
They're not needed at all, but handy to use sometimes. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 07 Apr 2004 09:16:55 am Post subject: |
|
|
Hard coded sprites tend to save space. And most things that you need the whole screen for can be drawn with less than 767 bytes' worth of points and lines. |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 07 Apr 2004 11:41:59 am Post subject: |
|
|
The main advantage is speed, something you can always use when it comes to tibasic programming. Not to mention RecallPic 1 is a lot less bytes than 768 bytes worth of Pxl-On('s. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 07 Apr 2004 12:25:17 pm Post subject: |
|
|
But then there's 767 bytes for the Pic1. |
|
Back to top |
|
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 07 Apr 2004 12:57:29 pm Post subject: |
|
|
The thing about calculator programming, most people don't even know what pics are, all they know is that when they go to MirageOS it runs games for them. They don't really care how many bytes it takes up or how it works. That's why I'm never too concerned about how many bytes something takes up, especially when it's easily deletable, like a pic. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 07 Apr 2004 01:12:16 pm Post subject: |
|
|
Too easily deletable. What if the person forgets the pic goes with the game? or another game uses the same pic? |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 07 Apr 2004 06:51:47 pm Post subject: |
|
|
Haha, of course the pic itself takes memory. XD
I like to make my programs so a single file will handle everything, favoring a list for any long term storage, since pics, strings, and matrices are often used by other programs.
Last edited by Guest on 07 Apr 2004 06:52:03 pm; edited 1 time in total |
|
Back to top |
|
|
Babyboy
Advanced Member
Joined: 11 Jun 2003 Posts: 499
|
Posted: 07 Apr 2004 09:00:00 pm Post subject: |
|
|
ok, so having a setup thingy that takes the hard code and converts them to pics once is the best way to go?
and to hold sir robins problem at bay, i could do something like
Code: If not pic1,pic2,pic3,pic4,pic5,pic6,pic7,pic8,pic9,pic0
Then
[draw and save pics]
and jedd, thats true, to often i find that people are unwilling (or unable) do do anything more that open mirage, or press on the program.
so many times i have "fixed" calculators that the ram has cleared, and i just ungroup them, and recieve either big grins or get called a nerd , you think that someone who spends there 2 study halls a day mastering galaxia and mario, would learn something about there calculators. i even bought an 83+ for $5, the kid said it didn't work anymore, i soent 30 seconds cleaning the battery connector thingys and it worked fine, the only problem was i showed him, he gave me 5 bucks though
i guess everyone cant be as cool as us |
|
Back to top |
|
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 07 Apr 2004 11:56:04 pm Post subject: |
|
|
I got offered a dollar to program a game on a guy's calc once. That was cool.
But hey, babyboy, you better square with the whole "nerd" thing, cuz let's face it, if you have posted in this forum, you ARE a nerd. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 08 Apr 2004 08:08:45 am Post subject: |
|
|
Babyboy wrote: and to hold sir robins problem at bay, i could do something like
Code: If not pic1,pic2,pic3,pic4,pic5,pic6,pic7,pic8,pic9,pic0
Then
[draw and save pics]
1) That syntax doesn't work.
2) There is no way to check if a variable is defined using Basic.
3) Since the Pic could have just been changed, anything you did would have to compare the pics with what's supposed to be in them: something that a) is also impossible in basic and ruins the whole purpose of pics because you'd have to have their data in the program.
Just draw and save them.
Quote: But hey, babyboy, you better square with the whole "nerd" thing, cuz let's face it, if you have posted in this forum, you ARE a nerd.
Not really. I am not a nerd, have never been called a nerd, have never had anyone even reflect on the advisability of entertaining the thought that I might be a nerd - and my post count here is pretty high. |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 08 Apr 2004 10:33:03 am Post subject: |
|
|
I think it's pseudo-code. |
|
Back to top |
|
|
Babyboy
Advanced Member
Joined: 11 Jun 2003 Posts: 499
|
Posted: 08 Apr 2004 09:12:58 pm Post subject: |
|
|
correct, and i know that that is all, but something is better than nothing, at least if one is missing it will catch it
as soon as my web space cones (thank you jbirk), i will post it for you all to criticize till then, thank you |
|
Back to top |
|
|
|