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.

This forum is locked: you cannot post, reply to, or edit topics. Contra 83 => Your Projects
United-TI Archives -> Contra 83
 
    » Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
» View previous topic :: View next topic  
Author Message
Bryan Thomas
Outer Limit Software


Advanced Member


Joined: 20 May 2003
Posts: 298

Posted: 13 Feb 2004 09:30:09 pm    Post subject:

Quote:
I think that you did a good job on Contra! It is a fun game and it is actually quite cool to be able to see something like it in pure BASIC. However, I have a few questions to ask. First, why do you create two sets of identical lists? If you already have the "ZINSTL" program then you should not need to do that. Further, what is the point of un/archiving the lists? This is just a waste of space since the data in the lists is backed up in the "ZINSTL" program. Second, why do you use so many subprograms for the game? I understand that you are wanting to make it as fast as possible, but fourteen distinct programs is too many. For example, imagine that somebody wants to give your game to somebody else. And because there are fourteen programs they forget to give the person one of them, thus making Contra not work. If instead you cut it back to include the main program, the installer program, the title picture, and one extra program (that includes shooting, enemies, etc.) then your game would be easily exchanged between kids at school. (Please note that that is just an example of how you could break your program up.) Lastly, why did you leave your code so unoptimized? I think you should go through the "BASIC tips and tricks" list and optimize your program accordingly; if anything, just change the noobish mistakes (ie. multiply signs, closing parentheses, etc.). Keep in mind that these are just suggestions, but nonetheless, I think you should take them into consideration. My goal is just like yours: I want to see Contra be the best that it possibly can be.


1. I install 1 perm list, and 1 temp list b/c the install progs are very big and I cannot archive them from within a program unless I use an ASM utility. And using perm lists allows me to unarchive them, install them into temp lists, and then archive them back to save like 2k of ram space while playing.
2.And as far as shortening the subroutines, I see no use for it. Because most of them have to be. If I put the shoot subroutine in the main loop it would be slower, if I put the enemy routine in, it would be slower, if I put the nmeshoot routine in, it would be slower. I know having all the subroutines is annoying and seems unescassary, but contra would not bas as fast without them. It also allows me to program faster. Its a pain in the a to search like a mile through code until you find the right place, and its so much faster having organization. Sure I will try and decrease how many I have, but dont make a big deal out of it when I have alot.
3.OMG, I do not know why everyone is making such a big deal out of my code being not perfect. It obviously is not perfect because Im not perfect. Im very good at making games. Im good at turning visions into real life and organizing everything in a game. Im also good at the appearance of my games, the graphics are always good and they usually have good speed. I know Im a little week in the code area, but thats b/c Ive only been programming for like 2 years. And Its taking me a while to learn all the tricks. What most people dont understand is that alot of optimizations slow crap down and worsens gameplay, and since a game is supposed to be fun, I sometimes sacrifice code for gameplay.

Sorry for getting so upset, but I did work so hard on getting the code optimized but as I said Im not the best at it, because thats not my focus in games. And I know you guys just want the best from contra, and so do I, just take a little slower approach at it because I am trying my best, its alot to program. And when u program so much, im bound to make stupid mistakes Sad


Last edited by Guest on 13 Feb 2004 09:31:39 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 13 Feb 2004 10:00:08 pm    Post subject:

You could release the code and have someone on this forum optimize it for you.
Back to top
Bryan Thomas
Outer Limit Software


Advanced Member


Joined: 20 May 2003
Posts: 298

Posted: 13 Feb 2004 10:23:27 pm    Post subject:

I do not some1 to optimize it. I wanna make this game by myself, since it will most likely be my last major project Sad

OK ill go by the temp lists,

L1=Equals the cordinates for each line. I did this by jamming 1, 8 digit number int o each cell, then extracting 2 separate cordinates for the the line to draw to. Since the levels are so detailed, that list is the biggest
L2=Tells the generater how many lines to generate outta list one for each frame, and where to start generating.
L3=This lists for the nmes, has 4 cells per nme, 1 for the y cord, 1 for the x cord, 1 for the direction of the nme, and one for the type of nme (1=regular, 2=rocket launcher, 3=sniper)
L4=Once again tells the above list how many enemys to generate in each frame, and where to start at.
L6= The water data, consists of two numbers, one for the x cord, and 1 for the number of waves to put. (water and only be on a fixed y placement.
L5= Once again tells the above list how much water to generate in each frame, and where to start at.
LZ= Weapon upgrade data, needs two numbers one for y cord, and one for x cord in order to place upgrade on level
LO(theta)=Once again tells the above list how many weapon upgrades to generate in each frame, and where to start at.
LY=Mine locations, needs to numbers, 1 for y cord, 1 for x cord in order to place mine
LX=Once again tells the above list how many mines to generate in each frame, and where to start at.

OK that about sums it up hart326 Very Happy
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 14 Feb 2004 12:19:32 am    Post subject:

he wants the pressure. he explicitly told me that i could finish teh level i was working on, but no more until the release.

it would look funny if contra came out with its 6 levels and i or someone have 20-30 levels for it :P

i guess thats why he only told you the temp vars


Last edited by Guest on 14 Feb 2004 12:11:51 pm; edited 1 time in total
Back to top
AndrewT
Outer Limit Software


Newbie


Joined: 20 Aug 2003
Posts: 21

Posted: 14 Feb 2004 12:38:40 am    Post subject:

The way I see this is... Bryan has done his best to program the game keeping the game's speed in mind at all times. He has looked it over and over for any optimizations that could be done that would actually influence the game's speed, otherwise doesn't look at them as an extremely big deal especially since he has been pressed to release this demo anyway which keep in mind is only a demo not the full release. It was given out to relieve some of the anxiousness, not to show a flawless finished product. Bryan, I think you sort of gave in when you said you have only been programming for 2 years and that you are week in the code area because I know that isn't true. There is some extremely advanced concepts and complicated programming involved with bringing this game to life and the minor optimizations that you missed shouldn't make anyone think otherwise. Think about it, you created a platform jumping type game with multiple types of enemies that each have there own AI and can turn around depending own which side of them you are on and fire acoordlingy to how close you come to them. You control an animated sprite dude that fires his gun and can kill enemies, or die from their fire or from falling into the water. The graphics are absolutely incredible and give an arcade feel to the game. You even included a boss at the end of the level that has his very own characteristics and looks insanely graphical. And the mine explosion effect and the teleport in and out of the level sequence also adds to the incredible gameplay. The game features all of this and more while retaining such decent speed for being programmed in pure BASIC.... And you were trying to say you are little week in the code area? Neutral Yeah right!! Also, that sort of disappoints me to see that people are bashing the demo because of such stupid reasons. It was put together in a hurry so that you guys could play it early. I understand that there is some concern that the finished game may be released lacking some simple optimization but I assure anyone with that doubt that Bryan won't let that happen. If he can program a game like this, it is obvious that those simple optimizations will be a sinch for him so please stop bugging him about it.
Back to top
Bryan Thomas
Outer Limit Software


Advanced Member


Joined: 20 May 2003
Posts: 298

Posted: 14 Feb 2004 01:25:16 am    Post subject:

DEISEL Andrew,

That really summed it up man and Im glad that you think so highly of me. Yeah, all that stuff people said did discourage me, and made me have a whole day of not programming, b/c when you feel bad about what your programming, its hard to motivate yourself Sad I guess Im kinda modest when it comes to code, and obnoxious when it comes to gameplay. I guess overall I just need more confidence. Anyhow, Andrews right I will not release contra until it is perfect. And I did make the demo in a rush, so please, give me a chance to fix the problems. Very Happy
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 14 Feb 2004 03:48:50 am    Post subject:

Did I miss something? Where did all this bashing occur?
Back to top
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 14 Feb 2004 05:16:44 am    Post subject:

How about we all just leave Bryan alone until the next release. Then we can bug the hell out of him again (if we want to).
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 14 Feb 2004 12:15:24 pm    Post subject:

*gives Bryan motivation and takes up chant*
contra! contra! contra!

Arcane Wizard wrote:
Did I miss something? Where did all this bashing occur?


people were complaining about how unoptimised his code was. i say if they wanted something better, they shouldnt have pressured this almighty basic guru into releasing his demo early.
not to mention, much of his code IS optimised - for speed, not size


Last edited by Guest on 14 Feb 2004 12:19:34 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 14 Feb 2004 12:22:41 pm    Post subject:

Meaning breaking up for( loops and that stuff?
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 14 Feb 2004 12:24:57 pm    Post subject:

oh, and he found out a way to combine majority of teh subroutines into the main prog Smile
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 14 Feb 2004 12:27:03 pm    Post subject:

Wouldn't that slow it down? Neutral
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 14 Feb 2004 12:37:51 pm    Post subject:

no Smile (not noticable anyways)
well, only when you run the program (at the very begining) because it has to skip the if-then statements for the subroutines. after you see the splash, then it wont matter Smile


Last edited by Guest on 14 Feb 2004 04:44:49 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 14 Feb 2004 12:39:20 pm    Post subject:

Oh. So to get the subroutines you'd do something like 2333098:prgmCONTRA?
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 14 Feb 2004 12:50:40 pm    Post subject:

yeah. at first he didnt think that it would return right where it left off. i showed him an example in my blakjack game (for drawing the cards) and it made him estatic.

not to mention it save space, because several bytes are needed to define that it is a program/name of the prog. if you have sparate subs, then you waste these bytes on the subs, but if you make it one prog, they define bytes are only needed once Smile


Last edited by Guest on 14 Feb 2004 04:45:26 pm; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 14 Feb 2004 01:08:20 pm    Post subject:

Darth Android wrote:
no Smile

Actually, that's impossible.

What do you think takes less time, this:


Code:
If 2=L1(X:"YAY->Str0


or this:


Code:
If Ans=234235:Goto 1
Goto 0
Lbl 1
If 2=L1(X:"YAY->Str0
Return
Lbl 0
234235:prgmYAY


subroutines can only save memory.

Bryan, just ignore the whining, there's always people who whine regardless of wether you release it unoptimized. You're the one who decides when you work on this game, how, and why, not a bunch of nerds on the internet.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 14 Feb 2004 02:11:40 pm    Post subject:

arcane:

ive posted it before:
//program start
If 23=iPart(%I //check to see if this time we're running the prog or calling a sub
Then
If .1=fPart(%I
Then
//sub1
End
If .2=fPart(%I
Then
//sub 2
End
//reapeat for each sub
Return
End
//main prog starts here

example:
prgmSUBS:

Code:
If 23=iPart(%I
Then
If .1=fPart(%I
Disp A
If .2=fPart(%I
Disp B
Return
End
For(A,1,100
If not(fPart(A/2
Then
A/2->B
23.1->%I
prgmSUBS
23.2->%I
prgmSUBS
End
End
DelVar %I //we dont want it to run the subroutine next time the prog is ran


this isnt very optimised, but it demonstrates how to do it

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Arcane Wizard wrote:
Did I miss something? Where did all this bashing occur?

some one had the nerve to give him a 5 on a scale of 1-10 Mad Mad Surprised


Last edited by Guest on 14 Feb 2004 04:49:33 pm; edited 1 time in total
Back to top
Bryan Thomas
Outer Limit Software


Advanced Member


Joined: 20 May 2003
Posts: 298

Posted: 14 Feb 2004 06:25:49 pm    Post subject:

Yeah I will use darths idea, however I will only use it for the subroutines where speed is not that much of an issue, like ZNMESHOT, ZCRE, ZCS, ZMAT, ZDIE, and all the others. However do not expect to see ZNME or ZSHOOT gone, b/c If I slowed them down it would hurt the game bad.

Yeah I guess I should of expected this kind of reaction from some people, but ya know, I guess I did not prepare myself for it good enuf.

I think arcane said it best:
Quote:
Bryan, just ignore the whining, there's always people who whine regardless of wether you release it unoptimized. You're the one who decides when you work on this game, how, and why, not a bunch of nerds on the internet.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 14 Feb 2004 06:45:10 pm    Post subject:

actually, if you put them as the first 2 subs, it shouldnt slow down too much... maybe you could try it both ways and see how much slower it is? see if its really worth all those bytes...

Last edited by Guest on 14 Feb 2004 06:45:21 pm; edited 1 time in total
Back to top
Bryan Thomas
Outer Limit Software


Advanced Member


Joined: 20 May 2003
Posts: 298

Posted: 14 Feb 2004 09:36:15 pm    Post subject:

Dont worry Darth I will in time Very Happy

just got done annialating 6 subroutines. I didnt use your idea to do it, I just realized that the ones I got rid of only needed to be called once, so I just put the actuall code where it belonged in the main program, then I just deleted the sub. It save me about 100 bytes already, and I will see what i can about the other subs.

I am also going to try and shorten the size of the list data, for example, I could use the same idea I used for the lines, for the mines, water, and weapon upgrades. It would resolve in cutting all the lists in half. For example:

The mine data requires 2 cells per mine, well I could make 2 cells into one four digit number and use an equation to exctract each number by itself. In the end it may be a bit slower when generatiing the mine placement, but It would decrease the nescessary running space by alot.

I have an idea that would greatly improve the game SOO much. I could add buttons. Now what the buttons would do is you would press them, and a platform would appear at a certain place and would allow you to get past a jump or gap, just imagin how cool a frame could be if you had to strategically press buttons to get across the terrain, it would, for me, make it alot funner to play. What do you think? Of course it would require two more lists, but If Im gonna chop the lists in half already, then it would not be to much of a difference in mem consumption. I could make buttons that only need two cells per button, so think about it guys!

** Im 6 frames into the 2nd level Very Happy **


Last edited by Guest on 14 Feb 2004 11:42:07 pm; edited 1 time in total
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 Previous  1, 2, 3, 4, 5, 6, 7  Next
» View previous topic :: View next topic  
Page 3 of 7 » All times are UTC - 5 Hours

 

Advertisement