Since CALCnet2.2 was featured across the geekiest places on the internet, globalCALCnet started broadcasting across the globe, and Doors CS 7.1.1 is making its way to new calculators, I decided to start a small project for CALCnet that I've been meaning to attempt for quite some time. Objectively, it's a complex project, but with the magic of CALCnet and Doors CS' GUI system, I actually managed to bang out the main menu including calculator communication, About screen, username changing, and quitting within three hours last night. It's been roughly 24 hours since I've started, and since then I've also added terrain generation, terrain propagation across the connected calculators, assignment of turn-taking order, placement of tanks, and (almost) correct falling of tanks when terrain is removed.

Still to come is most of the gameplay, including turn-triggering, game-over detection, input for setting power and angle, tank turret display (I'll need to punt on some angle-to-line algorithms), display of the username of the calc currently playing, and a few other goodies. I'll leave you with some screenies.



Edit: And just to be clear, these are real screenshots, not renderings or mockups. I'm not promising you features that I may implement; these are what are implemented. Smile
This looks awesome. I can't wait to see more. Will you have different kinds of terrain?
merthsoft wrote:
This looks awesome. I can't wait to see more. Will you have different kinds of terrain?
Right now I'm randomizing a second derivative of the slope to {-1,0,1} and integrating, which is producing what you see there; I'd be open to trying the first derivative for jaggier, less abrupt mountains or some different constants or randomization ranges. I'm not planning specifically on that now, though; I would prefer to have different terrain engines, if they were to exist, to be randomly selected rather than be a user choice.
I am curious how you did checking for clicking on the words. Was it a DCS GUI thing, or was it a group of "check if in box" calls?
_player1537 wrote:
I am curious how you did checking for clicking on the words. Was it a DCS GUI thing, or was it a group of "check if in box" calls?
The DCS GUI lets you assign random hotspots that, when clicked, direct execution to a specific label (think of them like Menu() in TI-BASIC). You'll also notice I used GUIRMouseCursor areas to subtly change the cursor to P, U, A, or Q when over the options.
I suggest talking to Michael Angel (_Auron_ on #tcpa). I'm pretty sure he's the one who was making Tankies back when Maxcoderz was big, and he had some cool terrain generation stuff.
merthsoft wrote:
I suggest talking to Michael Angel (_Auron_ on #tcpa). I'm pretty sure he's the one who was making Tankies back when Maxcoderz was big, and he had some cool terrain generation stuff.
Ah yes, I'm Facebook friends with him; I'll he to poke him at some point. Thanks for the good idea, Merth.
How do you check where/when it is done "falling"?
_player1537 wrote:
How do you check where/when it is done "falling"?
For the terrain, I have a 96-byte array of coordinates, so that the terrain can be thought of us 96 lines extending from the bottom of the screen up to some coordinate. I find the tallest of the eight vertical lines under each tank, add one, and set the bottom-left corner of the tank to that value. Smile
Ah, I wouldn't have even thought of that. Props. I would've done something like: move down, pixeltest all spots below you, if none are dark, repeat.
_player1537 wrote:
Ah, I wouldn't have even thought of that. Props. I would've done something like: move down, pixeltest all spots below you, if none are dark, repeat.
That was my original plan, and how it works in my BASIC scorched-earth game Scarth v1.0. Luckily, having this nice little array made me realize that no pixel-testing would be necessary.
What about the map, do you redraw that every time, or do you save it somewhere, like safe ram?
_player1537 wrote:
What about the map, do you redraw that every time, or do you save it somewhere, like safe ram?
I don't bother saving it anywhere, partly because I don't have too many 768-byte buffers left after CALCnet, the GUI API, my variables, the per-game known calculator list, etc, and partly because 96 fastline calls using the MOS compatibility libraries in Doors CS take a trivial amount of time. It would be harder to figure out which lines to specifically redraw after a shot is fired (which I haven't designed at all yet) and fix a saved image than to just draw the 96 lines, to boot.
Oooh, this looks great!
I've always wondered this, but what is the thing in the bottom left hand corner. I saw it in Chat, too.
It is a debug indicator to show that CALCnet is working.
souvik1997 wrote:
It is a debug indicator to show that CALCnet is working.
First 8 pixels are a run indicator for the interrupt, next 8 pixels are receive, next 8 pixels are transmit. Rightmost 8 pixels in the bottom row flash on collisions. There is a one-byte flag in the Cn2.2 safeRAM that you can use to toggle the display of the indicators on and off; I'll turn it off for Chat and Obliterate before 1.0 for each.
Very cool looking! Nice speed coding =) On the note of terrain generation, I am reminded that I should give you the stratcon source for your terrain generation work on CivSim II.
elfprince13 wrote:
Very cool looking! Nice speed coding =) On the note of terrain generation, I am reminded that I should give you the stratcon source for your terrain generation work on CivSim II.
Thanks, Elfprince. Smile I have tank display repaired, tank turret display working, building the interface to aim and set firing power, next is the message-passing to orchestrate taking turns.
NSPIRE TESTING MAN! AAAAAWWWWWWAAAAAYYYYYY!

whene this gets released, I call playing/testing it!
  
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 1, 2, 3, 4, 5, 6, 7  Next
» View previous topic :: View next topic  
Page 1 of 7
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement