I'm making a slight bit more progress on this. One of my key hurdles is in the fact that if there are alot of players on the server, the vast number of ingoing and outgoing transmissions could cause confusion...attacks don't hit their targets, ect.

I was thinking of setting up some sort of basis by which players play on several independent virtual servers. gCn handles the data the same, but on calc, each transmission is prepended with a server number. If the server number does not match the server that calc is playing on, the calc ignores the transmission. Is that a good idea? Would that improve gameplay?
For those of us just joining the topic who have no idea what ACagliano is talking about, we have several previous threads about his project; I guess he's starting a new one. The others:

http://www.cemetech.net/forum/viewtopic.php?t=6242
http://www.cemetech.net/forum/viewtopic.php?t=6250

One of the great things about the CALCnet protocol is guaranteed delivery: as long as target calculators routinely clear out their receive buffers in non-infinite time, they will receive all directed messages intended for them, though they will drop some broadcast messages. Therefore, everything that must be delivered should be sent as a directed message, and everything that won't break the game's logic if it's not received (ie, presence heartbeats) should be a broadcast. If you include a "server number" in the packet format, it will certainly save confusion with multiple games running on the same network, so for that I recommend it, but it won't reduce each calculator's workload in receiving and sorting through incoming messags.
Well, my issue was that, especially with the position updates, any one calc has to process 9 bytes of data per other calc on the network. So, for a server with 10 calcs, that's 90 bytes, per 5 cycles of the main loop. Obviously, if we start getting alot of calcs....you get the point. So I figured, cap the number of calcs. For a calc that is not on your server, it just ignores the broadcasts from that calc, so it only processes one byte, not 9.

That's weird. I tried to find the other topics, but I couldn't. We can delete them. I'll use this one.
Nah, that's not how we do things here; there's nothing wrong with the topics to merit their deletion. As long as we have them all properly linked together, it's fine.

One possible way of leveraging gCn to help solve this problem is simply have people playing different "games" of Star Trek join different virtual hubs in gCn, but still provide the ability to number/name servers so if two servers do exist on the same virtual hub, nothing will break.
Wonderful. Now, another question. In asm, if I use bcall(_Arc_Unarc) on a program while runnning that program, what will happen?
Alpha Release Coming Soon:

I will soon be prepared to present an alpha release of Star Trek MP, containing only the main GUI, just for testing purposes. As expected, this release will contain no working gameplay and will be unstable in spots. Test only the portions indicated in the release notes and you should be fine.
ACagliano wrote:
Wonderful. Now, another question. In asm, if I use bcall(_Arc_Unarc) on a program while runnning that program, what will happen?
Spectacular crashes immediately, if the program was in RAM. Spectacular crashes when the program exits and DCS tries to check about writeback, if the program was in Flash. Wink
Update

Current Progress seems to be roughly 40%. I have completed the "Status Report" and "Tactical System Control" menus, as well as completed the handling of received packets over CALCnet of the text, and join data types. While other routines remain in pieces, I am pulling them together slowly but steadily. I am at the point now that has killed every major project before this...I look at the various segments of code, get lost in the seemingly infinite jp's and calls, and give up. I pray that does not happen again.

Some fun facts for all who are interested...my current project page/character/line count:

Pages: 36; Characters: 30,996; Lines: 1,716.
Hehe, you make me want to be competitive with my Sandpaper stats, even though it's irrelevant:

Characters: 81,944; Lines: 3,946

I'm very happy to hear that you're continuing to make progress. I hope that you're documenting as you go to prevent getting lost, and even diagramming your flow between routines if you need. Have you been testing as you write? CALCnet is working well for you?
KermMartian wrote:
I'm very happy to hear that you're continuing to make progress. I hope that you're documenting as you go to prevent getting lost, and even diagramming your flow between routines if you need. Have you been testing as you write? CALCnet is working well for you?

I have not...because I have nothing to test by...since my gcnclient.exe is not working Sad
You can test between two calculators, using the PindurTI emulator. Heck, you can even test a four-calculator network using it. Smile
KermMartian wrote:
You can test between two calculators, using the PindurTI emulator. Heck, you can even test a four-calculator network using it. Smile

Not on Mac, I can't. Unless that program is ported to mac. I'll be testing on WabbitEmu first, for GUI, then on my own hardware w/ a friend for linking, then on beta testers for gCn.
ACagliano wrote:
KermMartian wrote:
You can test between two calculators, using the PindurTI emulator. Heck, you can even test a four-calculator network using it. Smile

Not on Mac, I can't. Unless that program is ported to mac. I'll be testing on WabbitEmu first, for GUI, then on my own hardware w/ a friend for linking, then on beta testers for gCn.

I thought you are dual-booting Windows and OSX with BootCamp, is that incorrect? You might be able to run it under Wine, though.
Both Windows and Wine can run it, indeed, and I was sure you had access to Windows as well. Smile Perhaps not, though.
Oh, that's right. *Facepalms. I do run windows.
ACagliano wrote:
Oh, that's right. *Facepalms. I do run windows.
Then download PindurTI and get testing! Smile If you need any help with using PindurTI, since it can be somewhat cryptic, please don't hesitate to ask.
Ok. I will. Umm

Progress update: Got an idea figured out to display a ship in the viewscreen if it is in front of you. Bear in mind that the data entry for each network member is:

5-byte member ID
8-byte username (padded if necessary)
6-byte position (xx,yy,zz)
3-byte sector (x,y,x)

So, first I check the sectors. If a ship is not in the same sector as you, I skip that entry. If it is, then I check the high byte of the axis you are moving on against that of the current entry. If it is not the same, I skip that entry. If it is, then I check the low byte. If the ship is in front of you, then I check the high bytes of the other two axises of the entry. If the high bytes of those two axis positions are the same as yours, then you see the ship on the view screen. The only downside I see to this is if you are, for instance, moving forward and the other ship is at $0012,$0000 and you are at $0011,$FFFF, you will not see the opponent on your screen, despite him being just one unit away (though you will be able to see him on your sensors). Comments? Suggestion?

The movement is only in 6 directions. Forward, Backward, Left, Right, Up, and Down. I kind of want to support full 3-d movement. Can anyone help?

As for weapons firing, you are most effective when you can lock onto your target. In order to do this, the sensors must be online. While locked, photons and phasers fly directly at the target. Without sensors locked, weapons will not function at all (except for the scrambler). As for weapons firing, I planned to make them instantaneous, but I've been thinking I should animate them flying through space in the view screen. Can someone help me with this?

As for locking, picking your target is very easy with gCn. Your calc will not spend time finding its target. "Locking-on" returns a pointer to the current target's data entry, making it trivial to return the ID for sending. Wink That's why I mandate locking for weapons firing.

The scrambler is an all-targetting weapon. It basically causes you to emit 0's for all your position data for some time, thus rendering you invisible. While you can be found at that corner of the map, you calculate the odds of being there. The scrambler is like the cloak in that it makes you invisible, but eventually, the jamming transmission wears off.

The cloaking device may be used to render you invisible until you choose to remove it. It emits 0's for your position data. Thus, you cannot be targetted. On level 0, you have no cloak (go figure). On level 1, you cannot transport or attack while using it. On level 2, you can transport, but not attack. On level 3, you can transport and attack.

Using the cloaking device consumes energy, as does firing weapons, using the shields, and mostly everything else. Every time you fire a phaser or photon, you use power. Having shields raised, being moving, and having the cloak raised also consume power at a steady rate. Your Power Level will drop if you begin using too much power at once, and if you run out, everything fails. Your Generator will be supplying power to all main drives by increasing your Power Level by a certain amount at a steady rate. This rate is in direct proportion to the current percent health of the generator multiplied by the level of the generator (you can equip upgrades). As your generator takes damage, the rate of power output decreases, thus your ship cannot produce power as fast. If your generator is knocked offline, once your Power Level drops to 0, shields drop, cloaks fail, and all other systems (except repair (which gets to work) and life support) go offline. Trust me, you don't want that to happen.
Sorry about the double post, but I wanted to draw attention to this topic, so that I can get public opinion on this asap:

For sending text between calcs, which format is preferred?
1. You select your recipient, and the message is sent PtP to the recipient.
2. A "chat-room" type system where all text msgs sent are broadcast and all can see.

*2 would be easiest for me Wink
Sorry, I read that first post, but there was so much there to process that I wasn't sure what to day in response. Very Happy I think that 2 would be the best option here. However, remember that broadcast messages are not guaranteed to be delivered at the recipients' calculators.
Ok, so, at byte (SystemStats), I want to reset the 'a' bit of that byte, since a is the number of the system that we are setting as offline.

Solution:

oh, wait. guys, if i rla a down to 0, then xor with (SystemStats), will i get the result I want?


Code:

   ld b,a         ;b is a number 0-7 inclusive
   ld a,%00000001
loop:
   rla a
   djnz loop
   ld b,a
   ld a,(SystemStats)
   xor b
   ld (SystemStats),a
  
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
Page 1 of 2
» 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