Author |
Message |
|
wormsrocks
Newbie
Joined: 17 Apr 2008 Posts: 17
|
Posted: 24 Apr 2008 06:47:44 pm Post subject: |
|
|
Ok, I wasn't too sre about C. One question about it, though: can you send it straight to your calc, or do you have to have some sort of file type converter? Also, I'm fairly familiar with all of those commands except for the arrays, and I don't tend to use while loops that much. Oh, and one thing you all should know, the night before last, our computer finally fried. It was about 7 years old, and the motherboard died, so I'm borrowing my sister's laptop to send this stuff. I won't be able to get on very much, so my posts will be fewer and farther between. We got a new laptop, and it's getting the backup files back onto it, but it's a slow process, and will probably not be done until about next Tuesday or Wednesday (sorry!).
Anyways, do you need any special software to write in C?
Also, about the one pixel characters, that's just for map moving. It gives you a bigger map to move around, and I don't need to really work on really hard (but good) graphics for every direction you can face. It goesto closeup stuff when you get into a battle, which it does a random number every 100 steps you take, and if that number is 2, it'll do the battle routine. Anyways, any of you guys very familiar with 68k BASIC? I've found about two people at my end (friends of mine) that'll help me, but one of them is just with game design, and the other will get his irst calc this week and start to learn programming from me, then help me, so it'll be a long while.
Oh, and by the way, I'm not worrying about the images. I'm not too good with making my own, so I stick mainly to the solid code anyways. And finally, as a little side project, I've been doing this other thing since I first started programming. I take a little ball bouncing around the screen, and I test how much I can optimize the code, making it as small and fast as possible. My latest report, with about 3k mem, I have a program that runs using about 50 lines, and has about 3 frames a second (in 68k). Anybody have any suggestions on the most optimized code possible on that? |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 24 Apr 2008 06:56:53 pm Post subject: |
|
|
To write a program in C for the TI-89, you'll need TIGCC, a C compiler. I mean, you can write the program in C using just notepad, but then you'll need to use TIGCC to compile the .c file into a TI-89 program. |
|
Back to top |
|
|
simonzack
Advanced Newbie
Joined: 25 Dec 2007 Posts: 71
|
Posted: 24 Apr 2008 08:45:54 pm Post subject: |
|
|
Bouncing ball (pseudo code)
draw a circle (the ball)
save the sprite
xor the sprite
move the sprite
check if hit boundary (2 if optimized)
if hit, change dx or dy
repeat
that should give you more than 3fps, and (hopefully) more optimized
I'm ok with 68 basic, but just don't have the time for some project like this, sorry
And yeah, like everybody said, its good to program in C, for convenience, or for optimization (if you're good at it), 68k op codes
TIGCC can do that too |
|
Back to top |
|
|
wormsrocks
Newbie
Joined: 17 Apr 2008 Posts: 17
|
Posted: 25 Apr 2008 06:01:37 pm Post subject: |
|
|
DarkerLine, thanks. As to SimonZack, yeah, I can get about 10 fps or so with just one, but I put in a lot more options, like the background, the color of the ball, the trail, letting you control it if you want, etc. Thanks for the try, though. |
|
Back to top |
|
|
cjgone Aw3s0m3
Active Member
Joined: 24 May 2006 Posts: 693
|
Posted: 27 Apr 2008 04:58:41 pm Post subject: |
|
|
Array, like a list... erm... such as List A = { 1,7, 9, 3, 12 }, as
A(1) = 1, A(2) = 7, A(3) = 9, A(4) = 3, A(5) = 12... They're pretty much essential with matrices in making a game. MAtrix has a row and column instead of being 1d
Such as having a map... Matrix = a grid of numbers... so that a number can represent a picture, like a tile map....
something like
Code: // B is a variable
// C = variable
//[Matrix] = matrix
For B, 1, somenumber
For C, 1, somenumber
if [MATRIX]( B,C) = 1
then
//draw some pic at location B,C on screen
endif
//etc, for more pics
end
end
For C, you need TIGCC, to compile the file, which can then be sent to your calc via a link port.
Drawing a tile map is really easy if you know how to do it...and a rpg is pretty much based on a tile map. You probably want to know what a tile map is before trying to make it.. I dunno if you know tho, so I won't explain unless you ask
Last edited by Guest on 27 Apr 2008 05:01:07 pm; edited 1 time in total |
|
Back to top |
|
|
wormsrocks
Newbie
Joined: 17 Apr 2008 Posts: 17
|
Posted: 27 Apr 2008 08:11:53 pm Post subject: |
|
|
I have a question, and this is something I've noticed over and over during my time programming: is all programming just variable manipulation? Is that the basic essence of programming? |
|
Back to top |
|
|
magicdanw pcGuru()
Calc Guru
Joined: 14 Feb 2007 Posts: 1110
|
Posted: 27 Apr 2008 08:40:26 pm Post subject: |
|
|
Essentially, yes. All the CPU does is read bytes from memory, write bytes to memory, and do math or logic using those bytes. Everything you do in programming eventually boils down to those three things. |
|
Back to top |
|
|
cjgone Aw3s0m3
Active Member
Joined: 24 May 2006 Posts: 693
|
Posted: 27 Apr 2008 09:24:23 pm Post subject: |
|
|
Variable manipulation, lol?
You use logic to manipulate the data... The logic is far more important. If you were coding a quadratic formula solver, then variable manipulation is everything. However, coding something that does something is logic superior. |
|
Back to top |
|
|
alexrudd pm me if you read this
Bandwidth Hog
Joined: 06 Oct 2004 Posts: 2335
|
Posted: 27 Apr 2008 10:00:25 pm Post subject: |
|
|
At its physical foundation, programming is flipping electrons.
In its most abstract formulation, programming is defining a problem you want to solve and using a computer to enable your solution.
Last edited by Guest on 27 Apr 2008 10:00:42 pm; edited 1 time in total |
|
Back to top |
|
|
wormsrocks
Newbie
Joined: 17 Apr 2008 Posts: 17
|
Posted: 28 Apr 2008 05:39:07 am Post subject: |
|
|
Well, yeah, I know that. The computer switches 1s and 0s an changes them and such. If somebody were to write a program in that language, it would be the fastest possible that the cpu could read. All it does with a program is use some program to translate it into another language which translates it into yet another language again and again until it reaches a stage it can read straight from. The more translation jumps, the slower the program runs. This is one reason why BASIC runs slower than ASM. Also, I got the TIGCC thing started, but I'm not sure what to do at this point. Anybody want to help me get started with it? I'd like to start out with something simple, maybe the ball thing bouncing around the screen, just to get used to C. After that, I probably could go on my own. Thanks!
Last edited by Guest on 28 Apr 2008 05:41:11 am; edited 1 time in total |
|
Back to top |
|
|
Liazon title goes here
Bandwidth Hog
Joined: 01 Nov 2005 Posts: 2007
|
Posted: 28 Apr 2008 03:53:00 pm Post subject: |
|
|
technoplaza |
|
Back to top |
|
|
cjgone Aw3s0m3
Active Member
Joined: 24 May 2006 Posts: 693
|
Posted: 28 Apr 2008 05:54:37 pm Post subject: |
|
|
Info about ti-89 is pretty scarce. However, knowing normal C will suffice with a few some knowledge of calls like drawing a sprite that you need to know.
Last edited by Guest on 28 Apr 2008 05:56:23 pm; edited 1 time in total |
|
Back to top |
|
|
simonzack
Advanced Newbie
Joined: 25 Dec 2007 Posts: 71
|
Posted: 29 Apr 2008 01:54:34 am Post subject: |
|
|
ah, for C, there's a great example in extgraph examples 'bouncing ball' one, maybe look at that can teach you a lot of basic stuff for calcs and C |
|
Back to top |
|
|
Liazon title goes here
Bandwidth Hog
Joined: 01 Nov 2005 Posts: 2007
|
|
Back to top |
|
|
wormsrocks
Newbie
Joined: 17 Apr 2008 Posts: 17
|
Posted: 30 Apr 2008 06:40:44 pm Post subject: |
|
|
Y'know, we've kinda deviated from the original topic... lol. So, anybody want to help out with this undertaking? Now that I'm shifting to C and ASM, it'd be helpful to have someone skilled in those languages, if only to tell me certain commands to get started. |
|
Back to top |
|
|
cjgone Aw3s0m3
Active Member
Joined: 24 May 2006 Posts: 693
|
Posted: 30 Apr 2008 11:00:19 pm Post subject: |
|
|
I don't think you explained very well what you're working on... Is it a tilemap based game? Is it smooth-scrolling, non smooth scrolling, etc?
There's so many possibilities.
Getk in C is similar to the basic kind.. The only other thing you need to know is some routine to draw sprites...
Code: #define WIDTH 20
#define HEIGHT 12
void main ( void)
{
int top_offset;
int left_offset;
int a;
int b;
int Tilemap[some_number][some_number];
char images[] = { images here };
for ( a = 0; a < HEIGHT; a++)
{
for ( b = 0; b< WIDTH; b++)
{
PutSpriteXOR(8*b, 20 * a, images[ TileMap[b + left_offset, a + top_offset]] ); // hypothethicla statement cuz i frogot the command name
// ( xcor, ycor, Picture... this might be a pointer, IDK
}
}
}
something pretty general like that to draw an alligned tilemap, etc.
Last edited by Guest on 04 May 2008 05:59:25 pm; edited 1 time in total |
|
Back to top |
|
|
wormsrocks
Newbie
Joined: 17 Apr 2008 Posts: 17
|
Posted: 02 May 2008 06:56:55 am Post subject: |
|
|
Sorry if you had any confusion. It's tile based, and when you hit the edge of the screen, it moves over to the next. |
|
Back to top |
|
|
cjgone Aw3s0m3
Active Member
Joined: 24 May 2006 Posts: 693
|
Posted: 02 May 2008 09:18:46 am Post subject: |
|
|
That's fairly simple assuming no unallgined collisions. |
|
Back to top |
|
|
wormsrocks
Newbie
Joined: 17 Apr 2008 Posts: 17
|
Posted: 06 May 2008 03:28:01 pm Post subject: |
|
|
Well, considering you move at 1 pixel, and you are one pixel, everything is alligned. The only difficulty (other than hitting mazes and such in it) are fighting the monsters as you go. And, of course, there will be dungeons that you will hit. |
|
Back to top |
|
|
cjgone Aw3s0m3
Active Member
Joined: 24 May 2006 Posts: 693
|
Posted: 06 May 2008 06:00:45 pm Post subject: |
|
|
Erm, alligned as everything is the same sized tile of 8x8 or 16x16... Like an equal sized grid. |
|
Back to top |
|
|
|