We're on Discord! Please join our server now if you don't want to miss anything! (More info) | Join the UCC4 contest! (More info)

* WalrusIRC & Discord main room

If you have a forum account, have more than 4 posts and are not part of a restricted usergroup, then you can chat in our main Discord server room directly from here and continue using the forums at the same time. Or you can join our server directly and access many more discussion rooms!

Poll

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

Author Topic: Star Trek Multiplayer (CE Edition) nears first demo release  (Read 5622 times)

0 Members and 1 Guest are viewing this topic.

Offline ACagliano

  • Full User
  • Join Date: Sep 2015
  • Location: New York, NY
  • Posts: 65
  • Post Rating Ratio: +2/-0
    • acagliano
    • Anthony Cagliano
    • @@ACagliano
    • ClrHome Productions
  • Gender: Male
Update

After a bit of not understanding double buffering and then finally understanding the concepts, I figured it out, and created fairly smooth graphics rather than flickering mayhem. I implemented this only for the view screen, since it should be like you looking out a window. For the other tabs, which are LCARS displays, I left the faint flickers in, since I would think a refreshing LCARS display would have a quick flicker.

Here is a screenshot showing the Borg cube with the new graphics.


=========================
A few more things to do (Bugs):

1. Implement a shunting yard or some other form of algorithm that sorts rendered map objects by distance, so we can render them in order. (help, please?!)

2. Projectile tracking not working. (reviewing)
----- 2-a. Projectiles do not track their targets.
----- 2-b. Sometimes, pressing the fire key fires a phaser, other times it seems not to.

3. The Borg sphere not AI'ing.
----- 3-a. The Borg sphere does not seem to track the player
----- 3-b. The Borg sphere does not seem to fire as its supposed to. This is likely the same bug as 2-b.

4. The collision detection and collision interpolation algorithms might need some work

** If anyone is willing to assist me in debugging, let me know!

I'm hoping for a release by Christmas.
  • Calculators owned: TI-84+ SE

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Moderator
  • Forum Maintenance
  • Original 5
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 19085
  • Post Rating Ratio: +101/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
I can't see the screenshot D:. Is it the same as the one you showed me yesterday?
  • Calculators owned: TI-84 Plus C Silver Edition, TI-84 Plus CE, Casio fx-CG10
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nintendo Switch, Playstation TV

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline c4ooo

  • Pedanticity prevents ambiguity
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 1036
  • Post Rating Ratio: +13/-4
  • Advanced forumer
  • Gender: Male
For full 3D, I could make 16x16x16 models for each item, leading to an overhead of 4096 bytes per object,
ehh this isnt how you should be storing 3D models. 3D models are stored as a a bunch or vertices and faces made from those vertices. ;)

Offline ACagliano

  • Full User
  • Join Date: Sep 2015
  • Location: New York, NY
  • Posts: 65
  • Post Rating Ratio: +2/-0
    • acagliano
    • Anthony Cagliano
    • @@ACagliano
    • ClrHome Productions
  • Gender: Male
For full 3D, I could make 16x16x16 models for each item, leading to an overhead of 4096 bytes per object,
ehh this isnt how you should be storing 3D models. 3D models are stored as a a bunch or vertices and faces made from those vertices. ;)
oh. Can you give me an example? Would this require more or less a) memory and b) processing power to use than a series of sprites of ships from various angles?
  • Calculators owned: TI-84+ SE

Offline c4ooo

  • Pedanticity prevents ambiguity
  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 1036
  • Post Rating Ratio: +13/-4
  • Advanced forumer
  • Gender: Male
For full 3D, I could make 16x16x16 models for each item, leading to an overhead of 4096 bytes per object,
ehh this isnt how you should be storing 3D models. 3D models are stored as a a bunch or vertices and faces made from those vertices. ;)
oh. Can you give me an example? Would this require more or less a) memory and b) processing power to use than a series of sprites of ships from various angles?
What you are describing with "16x16x16 models for each item, leading to an overhead of 4096 bytes per object" seems to be a voxel engine, which are not exactly the fastest or best looking (ahem ahem minecraft).

Here is an example of how 99.99% of 3D games store their models:
Code: [Select]
v  0.0  0.0  0.0
v  0.0  0.0  1.0
v  0.0  1.0  0.0
v  0.0  1.0  1.0
v  1.0  0.0  0.0
v  1.0  0.0  1.0
v  1.0  1.0  0.0
v  1.0  1.0  1.0
 
f  1  7  5
f  1  3  7
f  1  4  3
f  1  2  4
f  3  8  7
f  3  4  8
f  5  7  8
f  5  8  6
f  1  5  6
f  1  6  2
f  2  6  8
f  2  8  4
(This is a cube). ( and of course you want to store this as raw data, not as text). If you want to have a texture applied, you have to also store texture coordinates.

As to the question of "Would this require more or less a) memory and b) processing power to use than a series of sprites of ships from various angles?", well, i really dont know. The "sprites of ships from various angles" method will probably give you better results of far away objects, where as 3D models would be better in up-close ship to ship dog-fighting. Since the game seems more of the former then the latter, i would go with the "sprites of ships from various angles" method. You could probably make and texture the models in blender, then render them from different angles. You might also want to take a look at TheM02's 3D engine for the CE.

Offline ACagliano

  • Full User
  • Join Date: Sep 2015
  • Location: New York, NY
  • Posts: 65
  • Post Rating Ratio: +2/-0
    • acagliano
    • Anthony Cagliano
    • @@ACagliano
    • ClrHome Productions
  • Gender: Male
Yea, that 3D engine is definately something I want to use. It seems to look beautiful, but im not entirely sure it would be compatible with my map format.
  • Calculators owned: TI-84+ SE

Offline ACagliano

  • Full User
  • Join Date: Sep 2015
  • Location: New York, NY
  • Posts: 65
  • Post Rating Ratio: +2/-0
    • acagliano
    • Anthony Cagliano
    • @@ACagliano
    • ClrHome Productions
  • Gender: Male
Ok so I need some advice.

The Problem: When I'm rendering the weapon sprites, the weapons should seem to move from lower on the screen, and then move towards the center, and the ship. I thought of drawing triangles (gfx_FillTriange) to create a perspective beam phaser effect, but that's very hard to control with the degree I need to. I'd need to be able to calculate the starting point and ending point of the phaser beam and draw a line or series of lines. The starting and ending point may not always be on screen, especially when the game goes multiplayer and you'll sometimes see a phaser fly across your viewscreen, heading elsewhere. This seems to not be a problem with the torpedo sprites, as torpedoes are more in one place than beam-like.

The resolution: I could give every phaser a *trail length* value that's like some % of the weapon's speed. For each phaser, we calculate the phaser's position and the trail's ending position, draw the phaser in position, and then draw a line or triangle from the phaser to the trail end. GregsAStar also suggested stretching the phaser's sprite out so that it goes from the phaser's position to the trail's end.


Does anyone have any other suggestions?
  • Calculators owned: TI-84+ SE

Offline ACagliano

  • Full User
  • Join Date: Sep 2015
  • Location: New York, NY
  • Posts: 65
  • Post Rating Ratio: +2/-0
    • acagliano
    • Anthony Cagliano
    • @@ACagliano
    • ClrHome Productions
  • Gender: Male
Would I be able to recruit some debugging assistance? I've gotten this game mostly debugged, but I'm still struggling with two remaining issues that I can't seem to remove.
  • Calculators owned: TI-84+ SE

Offline ACagliano

  • Full User
  • Join Date: Sep 2015
  • Location: New York, NY
  • Posts: 65
  • Post Rating Ratio: +2/-0
    • acagliano
    • Anthony Cagliano
    • @@ACagliano
    • ClrHome Productions
  • Gender: Male
UPDATE -- 0.50 alpha-ish

Ok, update time!!
This game took a bit of a hiatus, as many of my projects do from time to time because of real life, skill building, and other stuff.
However, I did some code reorganization at the start of the summer, then set out on an endeavor to have a working demo of basic combat (single player) by the end of the summer.

Attached is the current pre-demo release. This version is functional but has no AI or rendering engine yet. That is what I'm working on now... 3d rendering, weapons and targeting, then wrapping everything up, optimizing, and releasing. That being said, I'll talk about some of the cool features already implemented:

1. Ship Status Icon
At the lower, left side of the screen there is an icon that shows your ship and your shields. As your ship takes damage, you'll notice the shields first. They start off electric blue, then degrade to yellow, then to red. Additionally, within the ship itself, which is normally grey, sections of the ship will turn red as systems are damaged. Hull integrity causes a small filled red circle when it reaches <50% in the saucer that gets larger when hull integrity fails. In addition to that, the nacelles turn red when the warp drive is below 50%, the aft of the ship turns red when impulse, life support, or the warp core fall below 50%. As of now, this icon is locked to an Enterprise-ish shape, as are the indicators. If/when I allow icons to be customized, I'll have to modify this to match.

2. Warp Core Failure
When the warp core system is damaged to less than 25% health, the program begins attempting to trigger a warp core breach. The odds of a core breach are 1 / system health * 10. So, for a warp core at 24% health, the odds of a breach occurring are 1/240. If the warp core is at 10% health, the odds become 1/100. Once a breach is successfully trigged, a timer begins. You get 1000 game cycles to avert the breach or your ship is destroyed. I have yet to clock how long that actually is. You can avert the breach by (1) Repairing the warp core to above 50% health (see Repair), or (2) Pressing the [Del] key to eject the warp core. The ejection occurs and spawns a critical warp core behind your ship, on a slow trajectory moving backwards (relative to you). Doing so immediately stops all power flow to your ship, meaning if you have no auxiliary power module installed or no warp core to refill the slot with, you'll lose power fast! The counter continues from whatever it was at when you ejected it, and then explodes in a MASSIVE detonation that can significantly damage your ship if you're too close.

3. Power, Inventory, Core Breach, Life Support Alerts
When any one of these four things need attention, there is an alert dedicated to them. The power icon appears when any module is unable to fulfill its power requirements, meaning that your power generation is no longer effective enough to keep your ship powered. This means that it is time to (1) Bring unessential systems offline, (2) Repair your warp core (the health of your core determines your ship's power output), or (3) Switch to an auxiliary power module (if installed).
The Inventory status alert appears when an active torpedo module has exhausted it's supply of selected torpedoes (unimplemented).
The core breach alert appears when a warp core breach has been triggered, and will disappear if the core is repaired or ejected.
The life support alert appears when the life support system hits 0% health or is turned offline. If life support is not repaired and brought back online within 2000 game cycles, your crew dies and you lose.

4. Repairing Your Ship
Any module may be repaired, including shields and hull integrity. Repairing a module stops it from being supplied power, stops it from functioning, and expends a lot of power to repair it. Every 5 game cycles, the module draws its current power default and gives itself 1 unit of health. For a starting ship, this means that it takes a module 250 game cycles to fully repair to 50 health, and costs 250 power to do so.
* A repairing module is treated as OFFLINE. This means that if you are repairing your shields, they will not function. If you're repairing your hull integrity, it will not give you extra damage protection. If you are repairing your warp core, it will stop generating power. The only modules that will function while being repaired are your engines (warp drive/impulse) and your weapon systems.*

5. Damage Calculation
Damage in game occurs as two factors: shield damage and hull damage. Phasers or other energy weapons deal more damage to your shields than to your hull, while torpedoes will deal more damage to your hull than your shields. Notable exceptions will be the Narada torpedoes that will deal staggering damage regardless and disruptor phasers, which will be somewhat balanced against both.
First, the current health and current power configuration of your shields are calculated and multiplied by the shield's damage resistance value. This is the amount of damage that your shield is capable of repelling at 100% health and 100% power. To start, this number is 5. Most weapons you'll encounter at first will deal 1-3 damage. If your shields are at, for example, 60% health, they will be capable of blocking only 3 damage. If you were to then set your shields to use 200% power, they would become able to block 6 damage. In this way, you can boost your systems to help you out in combat, but at a cost (see Boosting).
The shield damage value of the weapon is subtracted from the shield's health, resulting in shield damage. The calculated damage resistance value is subtracted from the weapon's hull damage. If this value becomes 0 or less at any time, we stop calculating damage.
We then read out the damage resistance value of your hull integrity module. If hull integrity is 50% or higher, that number is subtracted from the weapon damage. If hull integrity is <50% but above 0%, the damage resistance becomes 0. If hull integrity is 0%, the module's damage resistance is added to the incoming damage. This emulates a damaged hull becoming less effective at protecting the interior from damage. Any remaining damage is applied to a system currently chosen at random, but eventually to be chosen based on the direction of the incoming weapon compared to the direction of your ship, allowing you to target specific areas.

6. Boosting Systems
Any system, except the warp core, may be boosted to allow it to perform more effectively. Here's a list of what boosting a generic system will do:
Shields: Increase damage resistance
Hull integrity: increase damage resistance
Life Support: unable to be altered
Warp Core: unable to be altered
Warp Drive: Increases maximum attainable warp speed (to a max of +5 speed)
Impulse Drive: Increases maximum attainable impulse speed (to a max of +2 speed)
Sensors: Increases maximum sensor range/targeting range
Phasers: Increases phaser damage
Torpedoes: Increases torpedo speed
Transporters: Increases transporter range
* A boosted system will use power at a faster rate than it is being recharged, and eventually run out of power and stop working. Use boosting sparingly. *

7. Warp/Impulse Speeds
The ship has 4 average impulse speeds:
1 field / cycle = 1/4 impulse
2 fields / cycle = half impulse
3 fields / cycle = 3/4 impulse
4 fields / cycle = full impulse
certain ship types and a boosted impulse module will allow additional speeds < 10.
A damaged impulse module reduces the maximum impulse speed.
The ship has warp factors 1-9, with speeds in between the major warp factors. Each warp factor increases the speed by it's factor.
Warp 1 = 10 fields / cycle
Warp 2 = 12 fields / cycle
Warp 3 = 15 fields / cycle
Warp 4 = 19 fields / cycle
Warp 5 = 24 fields / cycle
Warp 6 = 30 fields / cycle
Warp 7 = 37 fields / cycle
Warp 8 = 45 fields / cycle
Warp 9 = 54 fields / cycle
boosted warp core max = 59 fields / cycle
Intermediary warp factors supported, for example, 16 fields / cycle equals Warp 3.5.
A damaged Warp Drive module decreases the maximum speed to a minimum of 10 (warp 1) unless the module is completely destroyed.

« Last Edit: August 13, 2018, 11:54:46 pm by ACagliano »
  • Calculators owned: TI-84+ SE

Offline ACagliano

  • Full User
  • Join Date: Sep 2015
  • Location: New York, NY
  • Posts: 65
  • Post Rating Ratio: +2/-0
    • acagliano
    • Anthony Cagliano
    • @@ACagliano
    • ClrHome Productions
  • Gender: Male
Update -- 0.65 alpha

Significant additions to the program:
1) Phasers/torpedo modules added to the ship. Only phasers shoot currently
2) Ability to quick fire or charge fire phasers, at different power costs.
3) Splash screen added
4) Navigational display for viewscreen (overlay) added, indicating ship rotation and pitch, as well as current sector position.
5) targetting display for viewscreen (overlay) added, with a crosshairs that moves on the screen and text showing the type of weapon we are firing.
6) Bug with rotation/pitch removed, thanks to MateoC

  • Calculators owned: TI-84+ SE

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games