Alternatively, join us on Discord.
You can help CodeWalrus stay online by donating here.

TI-Trek Multiplayer (CE Edition) nears first demo release

Started by ACagliano, November 19, 2017, 10:26:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Should the graphics (sprites) for this game be...

Multiple 2D images, at various angles?
3 (37.5%)
16x8x16 3D sprites with a viewing algorithm adapted for it?
5 (62.5%)
Other suggestion (post in topic)
0 (0%)

Total Members Voted: 8

ACagliano

UPDATE

Project TI-Trek has now been successfully compiled with full USB support... using srldrvce. Due to wonkiness in CEmu's usb support, it is no longer possible to test networking on the emulator (the lib cannot initialize the driver properly). I will need to move to on-unit testing for the remainder of client-side development of this project. I have gotten written the ntwk_Login(), ntwk_Register(), and ntwk_Disconnect routines, which are the first aspects of gameplay that will be tested. While I have been hard at work on client-side things, commandblockguy has been working on a USB=>IP bridge similar to the one Kerm devised for gCn over DirectUSB. And last but not least, beckadamtheinventor has been hard at work developing the server side of things... from map generation to control codes and saving/loading data. For those interested, the server is written in Python, runs on port TCP 1701 (the registry number of the Enterprise), and uses json for long-term storage. It stores connection descriptors to an array of Client objects, which also contain the IP address, username, and some more information about the connected user.

The game will implement semi-accurate space physics. When the map generates, the server pre-generates some paths for celestial bodies using formulas for things like gravity and inertia. Those objects will follow those paths every tick, scaled to the time-rate of the game. In addition to fluidity in space (meaning planets, starbases, etc will not be in exactly the same spot every time you look for them), other objects will pose a threat... black holes will exist and end your journey very fast. Stars will tick their life cycle and then die in a manner determined by their size. Major celestial events, such as star death or planet destruction will result in a path-adjustment for entities within gravitational range of the changed section.

Also, after discussion with beck, another feature will be added to the game, called a synthesizer. This component will allow you to interact with materials you own on a molecular level to enhance them in certain ways. For example, say you place a piece of tempered steel into the synthesizer. You can then select from reserves of any type of element, and the properties they enhance/detract from will most reflect their actual chemical properties (toughness, deflection, malliability, heat resistance, etc). Say you choose to combine the tempered steel with a type of element that increases toughness but decreases heat resistance. You would wind up with steel (hull plating, for instance) that provides a boost against projectiles and physical impact, but is damaged more by heat sources, phasers, and the like. You could also, for instance, infuse your hull plating with a mineral that enhances magnetism, which in turn enhances your shield deflection. And if you attempt to combine unstable materials, you could, for example, wind up inflicting feedback damage to an attacking enemy, but also winding up with vastly increased damage to your own ship.

For anyone wishing to have a look at the code-base so far (yes, it will need some optimization), here it is. I will say, in my opinion, at least the network handling is remarkably well-organized... for what I usually do.
https://github.com/acagliano/titrek-calc

DJ Omnimaga

I completely forgot that this project had multiplayer even though it's in the title XD, I dunno why. I saw the screenshots and it looks promising. The TI-84+ series only has one online multiplayer game (Obliterate) so it would be cool to see another come to fruition. :)

ACagliano

Update
* First Pre-Release *
== TI Trek Client version 0.0.92 Released ==


At long last, the first pre-release for TI-Trek is finally out. The current version of the client software provides the ability to login or register on our server (the TI-Trek server), as well as to disconnect. It also comes with an autoupdate system, to allow us to push updates to clients easily (the updater simply compares your existing version string with the version string for (1) the latest client, and (2) the earliest compatible client. If your client version is out of date, but still compatible, you will be given the option to autoupdate. You can say yes or no, either way, you will log in. However, if your client version is not compatible with the server, you will not be able to log in unless you either autoupdate or update manually.

To actually perform the autoupdate, the server will fetch the TITREK.bin file within the latest client directory and begin sending the data inside it over the TCP socket, in 1024-byte intervals. The client dumps this data into a temporary program file. To conclude the transfer, the final packet of the autoupdate is empty, which tells the client it is done. The client will then call ti_Close(), then rename the program to TITREK, then call an assembly routine that reloads the new program into RAM, and starts over. Meanwhile, if the latest client version has a "gfx-force-update" flag set in the config for that version, the server then proceeds to send a new graphics pack to the client, using the same method. Once again, an empty packet finishes the transfer, and then the graphics are reinitialized.

Meanwhile, the Web Deck (the GUI front-end for account management) for the game has also seen work. The server's IP is play.titrek.us... connecting to that with the bridge connects to the game server, but going to that IP in a browser takes you to the Web Deck (it's also accessible through the footer of the main site). To prevent spam accounts and to ensure accounts are active, only active users who have registered an account with their calculators can access the web deck; Once your account is created there, you can log in using the username/password you used. When logged in you can modify your Display Name, Password, and Email Address, as well as upload custom graphics to replace the existing ones (not yet implemented). Also admins and moderators can see all registered users' display names, emails, and usernames (but not passwords). They also get a printout of the server's console that refreshes every 30 seconds (*can anyone tell me how to make a widget like that scroll dynamically to the bottom- as in load in scrolled down, and scroll down as more content is added? it's a div with overflow auto.*) via ajax.

Special thanks to:
beckadamtheinventor: server dev
commandblockguy: bridge dev
me (ACag): client dev, web dev
graphics devs: Eaghan, Pieman, Ampersand, TurquoiseDrag0n, Argus, epsilon

Downloads Available at: http://titrek.us/downloads.php
This program requires the following C libs: fileioc, keypadc, graphx, srldrvce, usbdrvce.
To use the last two, you will need to obtain the srldrvce branch of the toolchain, or ask one of the project devs for a copy.

ACagliano

A few teasers from the upcoming 0.0.94 release.

1) Custom graphics packs supported. To indicate that the graphics pack is custom made (so the client doesn't do a normal version check), you use the following settings in convimg, in addition to the normal ones.
lut-entries: true
header-string: "\xff\xff"
Special thanks goes to MateoC for implementing the `lut-entries` option in convimg... it simply moves the offsets LUT into the appvar itself, rather than leaving it defined in the program. This allows the program to load any array of sprites as assets. You will still have to keep the same sprite order, however. Refer to the link I posted previously for details.

2) The splash screen has been completely reworked.

The menu interface is cleaner, and the networking status is indicated by icon now, instead of by text. A green USB icon indicates that the serial device is ready, a red icon indicates some error. If we implement nanotube, or internetce support, an icon will indicate if the program is preferring that connection.

3) The program now alerts you on the splash screen if your graphics version is incompatible.

The incompatible graphics is triggered in one of two ways:
 a) You are using a default sprite pack and the version header does not match the one set within the program's `reqd_version` array.
 b) You are using a custom sprite pack (version string 0xff, 0xff), and the number of sprites in the LUT does not match the number of sprites in the program build.
Either of these being the case causes the above alert to show up, and the "Play Game" menu option to just return you to the main menu.

All splash screen and error/alert icons are built directly into the program to ensure they are available... the asset pack only supplies stuff used for the game.

ACagliano

September 28, 2020, 02:27:41 AM #34 Last Edit: September 28, 2020, 02:33:38 AM by ACagliano

Update - v0.0.95
Planned to make this the full combat beta, but some security enhancements to the server and the whole setup make it necessary to release a client and bridge update before then.


NEW FEATURE - Client-Side Server List
As of right now, the server to connect to (through the bridge) is no longer controlled by the bridge's config file... it's controlled by the calculator itself.

Slot 1 is set by default and cannot be edited. Slots 2-10 are blank and can be edited (so that the game can connect to other hosted instances of the server).

The client adds 2 new packets, CONNECT and DISCONNECT.
Connect: Instructs the bridge to open a tcp socket to the server or host name following the control code in the serial packet.
Disconnect: Instructs the bridge to close the current socket.
* So long as the calculator does not unplug or disconnect from the bridge, you can connect/disconnect/reconnect without needing to restart the bridge. *
* Special thanks to commandblockguy for implementing this change. *

NEW FEATURE - On-Calc Mini-Log
The calculator has a 4-line mini-log, with each log-line buffered to 50 characters. This log can display errors, info, debug messages, and server broadcasts. The widget has variable height based on how many of the 4 lines it needs to display, and also remains on the screen for a configurable time. Default is 100 ticks. Any time a new message is written to the log, the clock resets.

And here is the new Settings interface to change the log timeout:


NEW FEATURE - Server Supports SSL
This may have been posted in this thread earlier, but the server is written with an optional SSL context. This can be enabled in the server config. The actual handling of certificates and renewal is not something the server does, so anyone hosting an SSL instance will need to handle ensuring their SSL config is up to date. The SSL path is also configurable, it just needs to be readable by whatever user is running this service.
*As of right now, the bridge does not support SSL, so any SSL servers will be unable to be connected to.*

NEW FEATURE - Verification-Based Authentication
As an attempt to dissuade connections to this service that are not from the calculator, such as random port probes or script kiddies, the server now implements a code-based verification system. When a user registers an account, an 8-digit code is generated and written to the user's account file, as well as sent to the calculator for display. You will be required to log into the web deck and input your verification code before you will be able to log in to the game server. This will allow us to filter unsolicited connections, as well as remove any anomalous user accounts created.

Caleb Hansberry

I love all the network backbone and security! Looks awesome and says great things about the CE's potential.

Powered by EzPortal