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 Your Projects 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.

 » Goto page 1, 2, 3  Next
Author Message
AndrewT
Outer Limit Software

Newbie

Joined: 20 Aug 2003
Posts: 21

JacobdeHaan

Member

Joined: 10 Jul 2003
Posts: 165

 Posted: 21 Aug 2003 07:17:05 pm    Post subject: Well, two things you can do that will speed it up are to use lists like Jbirk said, and also, for( loops are actually slower than a while loop with you increasing the variable. Those two should give you a little bit of a speed increase... edit: Lists are a lot bigger because they are always made up entirely of 9 byte floating point numbersLast edited by Guest on 21 Aug 2003 07:22:08 pm; edited 1 time in total
Bryan Thomas
Outer Limit Software

Joined: 20 May 2003
Posts: 298

 Posted: 21 Aug 2003 08:43:03 pm    Post subject: Yeah Ive seen it obviously since IM helping him out on it. Its pretty fast. Hes gonna spend the night ove rmy house soon and we will get alot done, we will post updates as they come...
aka Tianon

Know-It-All

Joined: 02 Jun 2003
Posts: 1874

 Posted: 21 Aug 2003 08:53:02 pm    Post subject: ok, sweet... sounds good... looks awesome
Arcane Wizard
`semi-hippie`

Super Elite (Last Title)

Joined: 02 Jun 2003
Posts: 8993

 Posted: 22 Aug 2003 02:27:32 am    Post subject: Use one list for all frame, but only load the current frame into it. //character moves to next screen If L=1:Then //level 1 If F=1:{1,1,1,1,1,2,2,2,2,2->LLVL //frame 1 If F=2:{1,1,3,3,1,2,2,3,3,2->LLVL //frame 2 End If L=2:Then //level 2 If F=1:{4,4,1,1,1,2,2,4,4,2->LLVL //frame 1 If F=2:{1,1,5,5,1,2,5,2,2,2->LLVL //frame 2 End //your load screen routine here //resume game Something like that?
AndrewT
Outer Limit Software

Newbie

Joined: 20 Aug 2003
Posts: 21

 Posted: 22 Aug 2003 01:52:03 pm    Post subject: Hmmmm.... that is great, great, great idea. Perfect. But now I wonder how I will make a level editor since the level information will be stored into the actual program and not in there own special list... Where would the level editor store the coordinates without taking up mass amounts of memory. I could just say forget the level editor but we'll see. Thanks Arcane Wizard, that simple idea will probably solve the level problem but now I just need to figure out how to draw the enemys. Maybe in the same manner? But each enemy will need its own x,y coordinate for collision dection to work so I would imagine this would be the best way to draw the enemys... //character moves to next screen If L=1:Then //level 1 If F=1:Then 1->A 2->B 3->C 4->D {1,1,1,1,1,2,2,2,2,2->LLVL //frame 1 {A,B,A,B,C,D,C,D->LNME //frame 1 End If F=2:Then 5->A 6->B 7->C 8->D {1,1,3,3,1,2,2,3,3,2->LLVL //frame 2 {A,B,A,B,C,D,C,D->LNME //frame 2 End End If L=2:Then //level 2 If F=1:Then 1->A 2->B 3->C 4->D {4,4,1,1,1,2,2,4,4,2->LLVL //frame 1 {A,B,A,B,C,D,C,D->LNME //frame 1 End If F=2:Then 5->A 6->B 7->C 8->D {1,1,5,5,1,2,5,2,2,2->LLVL //frame 2 {A,B,A,B,C,D,C,D->LNME //frame 2 End End //your load screen routine here //resume game Think that will work?
Arcane Wizard
`semi-hippie`

Super Elite (Last Title)

Joined: 02 Jun 2003
Posts: 8993

 Posted: 23 Aug 2003 02:54:38 am    Post subject: That would work but why save everything to some variables first?
AndrewT
Outer Limit Software

Newbie

Joined: 20 Aug 2003
Posts: 21

 Posted: 23 Aug 2003 11:53:19 am    Post subject: I don't want to use up every variable on the calc. If I were to store the coordinates into there variables at the beginning of the program it would require there to be a lot of variables. Much more then exists. The way I did it solves that problem just as your level recalling rountine did. If lets say there were two enemys a screen, that would only be 4 variables. Is that what you were asking?Last edited by Guest on 23 Aug 2003 11:54:47 am; edited 1 time in total
Arcane Wizard
`semi-hippie`

Super Elite (Last Title)

Joined: 02 Jun 2003
Posts: 8993

 Posted: 24 Aug 2003 02:18:27 am    Post subject: No, I was asking why you used the variables to store the coordinates to at all, you can just use the list. {A,B,A,B,C,D,C,D->LNME Doesn't work because of the variables. This would work: A->LNME(1) B->LNME(2) etc. ///////////////////// If L=1:Then //level 1 If F=1:Then {1,1,1,1,1,2,2,2,2,2->LLVL //frame 1 {1,2,1,2,3,4,3,4->LNME //frame 1 End End
AndrewT
Outer Limit Software

Newbie

Joined: 20 Aug 2003
Posts: 21

 Posted: 24 Aug 2003 05:11:21 pm    Post subject: Your right but 1->A 2->B 3->C 4->D {A,B,A,B,C,D,C,D->LNME technically does work, LNME will = {1,2,1,2,3,4,3,4} But you are right I should just store the coordinates straight to list like {1,2,1,2,3,4,3,4->LNME I don't know why I came up with using the variables. Whatever I was thinking, it seemed good at the time but I realized that point as soon as I begin programming my previous version of the code into the actual calc. And is there any quick and easy AI rountines already made up that will go with what I'm doing? That will be the most important aspect to the game so I got to come up with something good.
Tyler

Joined: 29 May 2003
Posts: 352

 Posted: 25 Aug 2003 07:31:52 am    Post subject: I know this isn't exactly AI, but it would have difficutly levels! randInt(1,x)->z If Z=1: Follow Your X Coords randInt(1,y)->z If Z=1: Attack The difficutily could be made harder by decreasing x and y, and it may not be very good, because I spent 10 whole seconds thinking about it! Last edited by Guest on 25 Aug 2003 07:32:16 am; edited 1 time in total
tr1p1ea

Elite

Joined: 03 Aug 2003
Posts: 870

 Posted: 25 Aug 2003 08:26:14 am    Post subject: Do you guys only program in basic? I realise that this is the BASIC section...but asm offers soo much more flexability... :P (Dont hit me) *tr1p1ea runs........Last edited by Guest on 25 Aug 2003 08:32:47 am; edited 1 time in total
Arcane Wizard
`semi-hippie`

Super Elite (Last Title)

Joined: 02 Jun 2003
Posts: 8993

 Posted: 25 Aug 2003 09:45:20 am    Post subject: AndrewT wrote:1->A 2->B 3->C 4->D {A,B,A,B,C,D,C,D->LNME technically does work, LNME will = {1,2,1,2,3,4,3,4} Hmm, you're right, I swear I remember somebody (Darth Android?) correcting me after I said {A,B,C}->L1 works, then, when I tried it, it didn't work. Arg! Quote:And is there any quick and easy AI rountines already made up that will go with what I'm doing? That will be the most important aspect to the game so I got to come up with something good. Well, AI slows things down considerably, espesially with around 4 enemys. I remember somewhere asid what kind of AI you where going to use, but I can't find it anymore. I could write something up if I knew what kind you are going to use, after all; I try to specialise in AI. Actually, Tyler, that is Artificial Intelligence. AI is just if..then..else stuff. But what you suggested only works with (a) certain type(s) of AI. Also: *hits tr1p1ea with a pointy stick*
KD5YTX

Joined: 03 Aug 2003
Posts: 306

 Posted: 25 Aug 2003 09:57:21 am    Post subject: If there are simply going to be stationary gunners, I assume the only thing that would be changing would be the angle at which they are aimed (from their "home" position) and the frequency of bullets that they fire. If you keep the frequency of bullets constant, you could just change the angle at which their are aimed by a certain amount (say, 5-10 degrees) to be closer to hitting the player each cycle. They would then "follow" your character (as far as aiming goes), yet the tracking would not be imedeate, giving the player a chance. Ninja programmers can go 314 hours without sleep or caffeine.
Tyler

Joined: 29 May 2003
Posts: 352

 Posted: 25 Aug 2003 11:38:18 am    Post subject: Humans can go 512! (I think I remember that from the guiness book of world records) The grandmother died after because a lack of sleep :
AndrewT
Outer Limit Software

Newbie

Joined: 20 Aug 2003
Posts: 21

 Posted: 25 Aug 2003 01:34:03 pm    Post subject: Well I'll try to describe the ideal AI that I'm looking for. It will need to be what makes it a good game that's challenging yet possible. The enemy's machine gun and yours will have a distance limit and the enemy will only be able to fire at you if your at the same Y level as the enemy. And I also have to come up with something that will cause an enemy to turn around if you jump over him or go under him on a lower platform. I wouldn't want them to be stuck only being able to fire in one direction. But maybe if you go under him on a lower platform it could be so he won't see you so you can jump up to his platform while he is turned the other way and kill him so that could be one of the strategies. lol there goes the game speed down the drain. Ummm about him only being able to fire at you if you are near him... I wouldn't want it so right when you get into a range where you can hit him he kills you instantly haha, but I still wouldn't want to much of a delay before he fires at you. Remember, Contra was a difficult game on NES. But you could dodge bullets there too and I planned for the enemys gun to be kinda instant 5 bullets then clear so the game speed won't be shot. It really is hard making this type of a game in BASIC that is fast. I just don't want this last aspect of the game to ruin it all. I really don't want to write any AI code because it usually takes me a while to come up with something good to me but you would probably laugh at it Arcane Wizard. Whatever you think would work and is fast is all I need.
Arcane Wizard
`semi-hippie`

Super Elite (Last Title)

Joined: 02 Jun 2003
Posts: 8993

 Posted: 26 Aug 2003 09:47:17 am    Post subject: A = player X B = player Y C = bot X D = bot Y E = direction the bot is looking, -1=left, 1=right F = range of bullets If (A+3>C-F)(AD-F)(BC-F) = player isn't too far to the left //(AD-F) = player isn't too high //(BC)-(AE //look at player, remember that this is only done if the player is in range, if he's too far away the bot can't see or hear the player and can easily be shot in the back //fire at player routine, see below Else //in case you want the bots to run around if you're not near them //let's say 'place to go' X = H and 'place to go' Y = I If (C+3>H-3)(CI-5)(DH //generate new random 'place to go' D+randInt(-20,20)->I //bot would just walk through walls and float in the air and stuff, or do you have collission detection and gravity working? C-(HC)->C//move towards 'place to go' D-(ID)->D //you might not need the bot to move vertically at all, just remove some stuff End I left out the fire routine because I do not know wether you want the bots to only fire straight ahead, if so just fire in the direction E.Last edited by Guest on 26 Aug 2003 09:52:34 am; edited 1 time in total
AndrewT
Outer Limit Software

Newbie

Joined: 20 Aug 2003
Posts: 21

 Posted: 26 Aug 2003 05:48:48 pm    Post subject: Thanks a whole lot for the routine. I can't look it over right now... or untill tomorrow but thank you a lot. I'll be sure to stick you in the credits.
KD5YTX

Joined: 03 Aug 2003
Posts: 306

 Posted: 27 Aug 2003 07:37:04 am    Post subject: In contra, the enemies could all fire in at least 8 directions, up right down left upper-right lower-right upper-left lower-left. You should at least give the enemies the ability to fire up, upper right, upper left, and left + right. Then, just keep their aim following you and firing contuously, so that the bullets can jump out a good 15 pixels in but a couple cycles and the game would still be possible (you could get a feel for the on-off rythym of their shooting - shoot, pause, shoot, pause, shoot, RUN FOR IT...). The platform idea is really nifty... Ninjas love Contra!
AndrewT
Outer Limit Software

Newbie

Joined: 20 Aug 2003
Posts: 21

 Posted: 27 Aug 2003 06:19:22 pm    Post subject: Yeah, that's a perfect description of what made Contra a good game. It almost needs to have the aspect of the "shoot, pause, shoot, pause, shoot, RUN FOR IT" for it to really be considered true Contra. And having the enemy fire in all of those directions may be necessary to accomplish just that. I will see what I can do.Last edited by Guest on 27 Aug 2003 06:22:00 pm; edited 1 time in total
 Display posts from previous: All Posts Oldest FirstNewest First
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.

»
 » Goto page 1, 2, 3  Next Page 1 of 3 » All times are UTC - 5 Hours