Jump to content

SteveB

Members
  • Posts

    548
  • Joined

  • Last visited

Everything posted by SteveB

  1. There is 3:1 chance when I see the opponent he points to another direction. I am interested to know if I have been detected or not, leading to an aggressive attack or being cautious not moving in front of his cannon... even the most stupid program will shot me then. You are right, this is only relevant when I see the enemy, otherwise I don't have the data to check if he sees me. I
  2. I think your argument is wrong. If I can't see the enemy, X1, Y1 and DIR1 are 0, I have no data to CALL SCAN. I don't know that he sees me then. I can only check if he sees me when X1, Y1 and DIR1 are filled, so if I am in advantage (being undetected) or we see each other. So it is either I copy your routine or call it. Either way, I get no advantage concerning the data.
  3. May we use CALL SCAN to check if the enemy sees me (I only have his coordinates when I see him) and and CALL LOS if the way to a position is free? This would free me from duplicating code. This does not reveal additional information.
  4. I also inserted some code in SUB TANK1 I wanted to share, as this is a friendly competition and not a fierce contention. SUB TANK1(X,Y,DIR,X1,Y1,DIR1,CODE) // GOTO NormalTank1 CALL JOYST(1,jx,jy)::CALL KEY(1,k,s) code=1 IF jx=4 OR k=3 THEN code=2 IF jx=-4 OR k=2 THEN code=3 IF k=18 THEN code=4 SUBEXIT NormalTank1: IF X1=0 THEN nolos ... This way I can steer TANK1 with the joystic or (E)SDQ to test my TANK2 code. Simply setting/removing the comment // before the GOTO NormalTank1 toggles automatic and manual mode. My first impression is that 100 steps will often not suffice for a real fight when the programs are reasonable clever.
  5. I investigated the issue ... for some reason TiCodEd expects the CALL before the SUB. Those two routines are declared first with SUB and later used by CALL. You get rid of the warning by moving both routines further down in the code. I did so and renamed DELAY to VDELAY (VorticonDelay) because I prefer Warning-Free code. CALL DELAY is part of XB256 which in integrated in the Jewel BASIC Compiler and a reserved word there, and TiCodEd is especially aimed at compiling BASIC.
  6. For those of you who never used TiCodEd before I made a short video to help you setting it up in Windows and use the integration with Classic99. Download TiCodEd Version 2.4, unpack it to a directory and copy CCombat.sxb to this directory as well. For simplicity I use the ToCodEd directrory directly as the DSK5 in the emulator to load the tokenized file. No need for Cut&Paste anymore. TiCodEd.pdf will give you a quick overview of the features and the usage, TiCodEd Beginners Manual.pdf is a complete tutorial. You might ignore all features except the labels. The label name needs to be unique and is not case sensitive. Use the label instead of a line number and define the label by putting it in the beginning of a line, followed by a colon. That's all there is to it. But if you want, there is much more... REPEAT/UNTIL, WHILE/WEND, ... explore and enjoy.
  7. This is correct ... you can even DIM an array there.
  8. The actual SUB code is SUB TANK2(X,Y,DIR,X1,Y1,DIR1,CODE) and numeric variables are initialized with 0. So if you have some initialization to do you a SUB TANK2(X,Y,DIR,X1,Y1,DIR1,CODE) if firstrun=0 then notfirst Q=1 firstrun=1 notfirst: Q=Q+1 ... subend
  9. I see this competition will lead to further improvements of TiCodEd ... My To-Do List for version 2.5 is growing ... keep sending feedback!
  10. Yes, a designator is a designator: variable, subroutine or label ... they must be unique. I will include a check and error-message when the generated line number exceeds 32767, good idea. I never managed to do so. When you set the log-level to "verbose" or above, you get a "Line Number Table" in the log-page: LABELNAME -> LINI-NUMBER You can also use a line-number like an AORG in your code to force it, as long as it is higher than the current automated one, perhaps a temporary help while debugging.
  11. I get three warnings, two of themmight be bugs: Warning: Subroutine DELTA not declared. Warning: Subroutine FIRE not declared.
  12. I think speed does not matter in this competition, so I don't see a point in assembly language.
  13. I did stand there, but did not take the picture ... my one is from the net as my trip was in 1995 and the pictures I took are not digital (yet) ...
  14. After many hours of learning and coding I am happy to publish version 1.0 of my Multicolor Library. MColor_V1.0.zip Included in this package are four example programs and a 22 page manual, covering both TiCodEd SXB and standard XB. When using TiCodEd please copy the file Lib/MultiColor.xbpkg to the Lib directory of TiCodEd and select this package on the Project page. The mentioned "Lowercase LINK" and Cactus-Speedbutton will only be available in the upcomming TiCodEd release 2.5, where the package will also be included. I am working on the release and there are two features I am not yet happy with. Thanks to everyone who supported my project here in this thread and a special thank to Harry and Lee. I hope someone finds this usefull for a project in Multicolor Mode. Suggestions for enhancements are always welcome here. Quix.mp4 PS: I kept "Writethrough" direct drawing as the internal use PUTPIX covered all checks, which would have been implemented all over the place to avoid VRAM corruptions. This way you can safely draw outside of the window, it just gets ignored.
  15. Local variables do survive ... but I don't know if they also survive a garbage collection though. Same result with XB 2.9 GEM. "13" is printed on the second call to TEST and not in the main program. Alternatively you may provide a DIM a(20),a$(10),b(20),b$10 and add these a resp. b to the CALL, so we have a set of 32 variables we can rely on. I would like use a dump of the VDP RAM of the screen (not the sprite table, no cheating...) to have a map I can pencil in my strategy. Perhaps you can provide a wrapper to do so, so we don't need MOVES in our own program.
  16. A tank might change the color (to red?) when it is in sight of the opponent? Furthermore I think 100 steps are still way too few, I think of implementing three modes, Cruise, Flight and Attack .. Excaping an unfaivorable situation and start a counter-attack will take some steps ... And I think strategic waiting for some cycles should be possible somehow.
  17. I stopped at Tombstone City on my way to Bisbee ...
  18. If we have to few participants we might do it like in the Formular 1 ... two cars per "team" ... ? we should also impose a code limit to make sure we fit host and two contestants into the memory ... 6kb tokenized code? Could we use RXB CALL MOVES to copy the screen into lower memory to have map we can actually write to? Each contestant could get 4kB low memory with a variable base of >2000 or >3000 (or whatever under RXB is free to use). I'm not sure yet if I really need this ...
  19. Will you participate yourself or would it be too difficult to stay neutral?
  20. The one with the most forward-steps wins in a time-out situation? At least he tried ...
  21. I also wonder if this is too much of a gamble. As soon as you see him, you calculate the distance and shoot ... not much of a strategy. If you need to align yourself without getting shot, this becomes tricky and more challanging, doesn't it?
  22. So your cannon also has a +/- 45 degree turning angle ... you can shoot what you can see if it within 10 squares reach?
  23. It looks like I know RXB way better than you know TiCodEd with SXB ... TiCodEd is an Editor with a pre-processor, which extends the BASIC language with constructs it then translates to standard TI (Extended) BASIC with line-numbers. With the RXB-Package included, it even knows all your RXB extensions, both for code-completion and for checking of valid subroutines. The advantage in this context is that it delivers fully relocatable code when you use labels and REPEAT-UNTIL / WHILE-WEND for loops. As a design limit you currently can't use BEGIN/END in SUB-Routines. But you also have your local variable scope in SUB, so you don't interfere with your competitor or the host. So yes, TiCodEd will output a tokenized XB or RXB program in your FIAD directory and then Classic99 with XB resp. RXB will take over, requiring the module.
  24. I have multiple questions ... How do I initiate a move? With "CODE"? What are the options to turn, move forward (backward?) and fire? Do you supply a test-program, i.e. where you manually play one player to test your AI/NPC player? I can GCHAR the screen as a map? But not query the enemy?
×
×
  • Create New...