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
  • Calculators owned: TI-84+ CE

Dream of 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. :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

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.
  • Calculators owned: TI-84+ CE

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.
  • Calculators owned: TI-84+ CE

ACagliano

#34

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.
  • Calculators owned: TI-84+ CE

Caleb Hansberry

I love all the network backbone and security! Looks awesome and says great things about the CE's potential.
  • Calculators owned: TI-82, TI-83, TI-83+SE, TI-84+SE, TI-85, TI-89, TI-99/4A
  • Consoles, mobile devices and vintage computers owned: HP Portable Plus 110, Toshiba T3100, Toshiba T5200, GRiD 1660, TI-99/4A, Apple IIgs, and much more than I can list here

ACagliano

Quote from: Caleb Hansberry on September 29, 2020, 06:41:13 AMI love all the network backbone and security! Looks awesome and says great things about the CE's potential.
Thanks!

Update
The client can now send chat messages to the server.
The log display widget wraps text.
  • Calculators owned: TI-84+ CE

ACagliano

Update

Began work on a system for rendering client-side particles in response to certain things that occur in the game. One of those particles I have implemented... it is a crack that appears on your screen when your hull integrity falls below a certain level and remains there until your ship is repaired. It is a mask type of image that renders on top of everything and consequently obfuscates the display (if on top of it), like an actual crack in the screen would.


  • Calculators owned: TI-84+ CE

ACagliano

#38
Updates! Updates! Updates!

Version 0.0.99pre is still under development, but here is a few highlights for development so far.

1. Packets for MODULE_STATE_CHANGE, ENGINE_MAXIMUMS, and SETSPEED are now implemented at least in part. They don't check for certain statuses that might prevent the actions yet, but they do update, relay their responses to their calc, and have the effects propagate to your on-calc GUI.

2. The engine/speed configuration interface is now implemented. Accessed by pressing [Log]. You can scroll between your available engines, move sliders around to change your speed, then press [Sto] to engage your new speed.

3. With Debug Mode enabled in the client settings, the calculator now prints the Control Code and size of every packet it receives to the log widget.

4. Server-side, TrekFilter is now formally implemented into the service. TrekFilter is a custom firewall I made for the service, programmed to understand its protocol better than a system firewall could, and able to interact with your system firewall through the use of custom fail2ban jails.

Here a screenshot showing new (and some old) progress.


Here is a link to the Documentation: http://titrek.us/components/downloads/usersguide.php
  • Calculators owned: TI-84+ CE

Huredo

Quote from: Pieman7373 on December 14, 2017, 05:10:50 AMOkay, this is pretty much the coolest thing i have ever seen! I can test stuff :3

I agree, finally  :D

ACagliano

Updates

CLIENT
A few mostly silent updates have pushed our latest version to 0.0.99. This latest version has a few small tweaks.

1) Firstly, the program now implements a minor change to the SRLDRVCE implementation that is believed to fix issues with Windows... The fix was actually within the SRL/USB driver packages, so you will need to update those as well.
2) The text input routine now wraps if you overflow the first line. It should do so without text shadow or graphical glitches but if any occur please report back.

SERVER
1) A few bugs in TrekFilter resolved... TrekFilter now properly handles packets with invalid characters.
2) Client disconnect is mostly stable now... Rather than having the client send a Disconnect packet to trigger the user to disconnect, we simply detect the bridge disconnecting, trigger a custom exception that clears the socket and deletes the client from the dict. This also allows TrekFilter to interact similarly without triggering exceptions. Let me tell ya'll, I have come to love the `raise` command :p.

WEB DECK
1) The User Info and Interface tabs are combined into one tab, "Info and UI". This page contains your user information and lets you edit it, but it also can display your player stats, ship stats, and provides links to two tools, the model uploader and the asset pack maker.
2) The asset pack maker tool deploys convimg to assist users in generating their own asset packs, using the procedures outlined by convimg. You can upload replacement sprites of the same size or direct the tool to use the default. When every sprite is assigned to either custom or default, you can then build your appvar. The Web Deck implements lib-yaml to generate a well-formed YAML, and then runs convimg. This feature has been lightly tested, but to all potential users, feel free to have at it.
3) The ship model uploader tool is similar to the asset helper, in that it allows you to upload your own custom model to define your ship appearance. For now, I will ask people to not use this tool, as there is no size limiter yet. That is part of the purpose of the new 3D Modeling Contest I started in the Graphics section of this forum--to ascertain a good limiting size. The page also implements WebGL to render any existing model you may have uploaded onto the page for quick viewing. That render IS actually the file upload button.

Also, for anyone interested in testing out existing features, please note that in order to access the Web Deck, you must register first with the server using your calculator. This is a feature meant to prevent stray accounts from people who do not intend to play. I may ease that in the future for certain extenuating circumstances, but as of now it stands.

Also also, anyone who previously made an account on the system will need to do so again... during a config change, I deleted the accounts directories. Sorry.

Also also also, 3d frame compositing is planned to happen server side, with the server implementing opengl or pyglet to generate a frame for each client, a compressed RLET sprite, that is then rendered to the client through the standard graphx calls. As of right now that, as well as collision, are the main things that needs to be done before we are ready to start putting out actual playable releases rather than feature showcases.

Also also also also, for those unaware, the client-server will implement an auto-update functionality allowing clients to be served, and then subsequently install and reload, newer versions of the game upon connecting to the server without dealing with the hasstle of doing it manually.
  • Calculators owned: TI-84+ CE

ACagliano

UPDATE 0.0.103

The TI-Trek client now has full version matching capabilities. What this means is that when you connect to a TI-Trek server, you will automatically be served the client version that the server requires, which will be relaunched. You will also be automatically served the default (or custom, if supported) graphics pack for that version. No more user fussing over "do I have the right client version?" or "Do I have the right graphics pack?". The server will make sure you do. Also, if you are connecting to a server that needs an earlier version than you have, it will autodowngrade in that case. However, all servers will be hardcoded to not start if you are not requiring a minimum default of the first version that supports RSA (when implemented).

I will soon add the capability to the server to have the version(s) specified and to fetch the gfx and the client automatically into the correct directories to serve them.

  • Calculators owned: TI-84+ CE

Powered by EzPortal