rlane / oort3 Goto Github PK
View Code? Open in Web Editor NEWA space fleet programming game
Home Page: https://oort.rs
License: GNU General Public License v3.0
A space fleet programming game
Home Page: https://oort.rs
License: GNU General Public License v3.0
W A and S all behave as expected but D does not move the camera
If you run the acceleration tutorial (2), with the code:
// Tutorial: Acceleration
// Fly through the target circle.
use oort_api::prelude::*;
pub struct Ship {
saved_vel: Vec2,
}
impl Ship {
pub fn new() -> Ship {
Ship {
saved_vel: vec2(0.0, 0.0),
}
}
pub fn tick(&mut self) {
debug!("Velocity: {}", self.saved_vel);
if (current_tick() == 60) {
self.saved_vel = velocity();
}
accelerate(vec2(100.0, 0.0));
}
}
Then you will get
Velocity: [60, 0]
But this seems incorrect if you are applying an acceleration of 100 mpss if 60 ticks are a second.
Shouldn't it be 100 mpss at 60 ticks instead of 60 mpss?
No big deal but took me some time to find out so maybe you should update the first tutorial directives.
Please bear in mind that I haven't yet found the time to read the source code fully. Thus, I thought I'd ask directly.
Thank you in advance for your time and consideration.
if the ship is not moving, but only rotating, the position() is changing
the difference is +-2 unit in each axis
use oort_api::prelude::*;
pub struct Ship {
last_position: Vec2,
}
impl Ship {
pub fn new() -> Ship {
Ship {
last_position: vec2(0.0, 0.0),
}
}
pub fn tick(&mut self) {
// position will change,but we are only turning!
debug!("position {0}", position());
turn(1000.0);
if self.last_position != vec2(0.0, 0.0){
draw_line(position(), self.last_position, 255);
}
if current_tick() % 100 == 0{
self.last_position = position();
}
}
}
W A and S all behave as expected but D does not move the camera
hi, great game!
currently pane buttons are <span>
, and converting it into <a>
will make it easier to navigate with keyboard using vimium.
if i use turn(0.0) to stop the rotation, it will oscillate between -0.00000000000000005551115123125783 and 0.1047197551196597
0.104 is significant error, as it is 6deg/s of rotation
use oort_api::prelude::*;
pub struct Ship {}
impl Ship {
pub fn new() -> Ship {
Ship {}
}
pub fn tick(&mut self) {
debug!("tick: {0}", current_tick());
let angular_velocity = angular_velocity();
debug!("angular_velocity: {angular_velocity}");
if current_tick() < 10{
torque(1000.0);
return;
}
debug!("BREAKING");
turn(0.0); //this should stop us!
}
}
error[E0433]: failed to resolve: use of undeclared crate or module wasmer_compiler_singlepass
--> shared/simulator/src/vm/mod.rs:261:36
|
261 | let mut store = Store::new(wasmer_compiler_singlepass::Singlepass::new());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module wasmer_compiler_singlepass
For more information about this error, try rustc --explain E0433
.
error: could not compile oort_simulator
(lib) due to previous error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.