Sea of Tranquility

I like talking about sci-fi, space, robotics, linux, anti-fascism and democratic socialism. 🇩🇪☮️

(SeaOfTranquility on libera.chat)

  • 4 Posts
  • 22 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle

  • The “towards the center of mass” force, will grow with the square of the distance reduction to the closest bunch of mass(es)

    This is the key point of my question because the mass m of the “bunch of mass” that is close to Venus will be less when you consider the density p with m = p * V, where V is just the volume of mass that is close enough to Venus. Assuming the Suns density is uniform (which it isn’t, most of the mass is far away from Venus), p and by extension m and by extension F (the gravitational force) are proportional to 1/r³.

    Unfortunately, the actual calculations are far too hard for me, but my intuition would suggest that the 1/r³ relationship of density and volume would outdo any other factors here.







  • This sounds a bit like hamster simulator, which we used in high school in our “programming” class, the site is in German, but you might the idea. But I can absolutely see how you can make this more compelling.

    Deutsch wäre jetzt kein Problem für mich und ich glaube, ich erinnere mich sogar daran, das auch mal im IT Unterricht gehabt zu haben. Leider war die Lehrerin damals 'ne Katastrophe und ich hab’ das meiste von damals wohl schon ausgeblendet 😅



  • Personally, and I’m going to be completely honest and frank with you, I don’t think I would play it, (though I’m definitely not the target market), but also, it’s not likely that I would recommend it to someone who wants to learn to code either.

    Usually when people want to learn to code, it’s because they have some end goal in mind - they want to make an app, game, website, they want to get a job as a developer, data analyst, QA, etc. or they have something in particular which interests them - such as machine learning, embedded design, blockchain (yes, I know it’s a scam), digital music/art, etc. - and based on what they want to do, I’d recommend them some very different pathways, and it’s very unlikely that your game would be the best use of their time, to be honest.

    I appreciate the honesty, and I see your point about the game not appealing to a lot of the target audience. Your suggestion with the platform-first approach and the monetization options sound like a good idea, but it is not the direction I’d want to take. I definitely have to think about it more and figure out, how to address the points you made while still pursuing a project I fell invested in.




  • I think your idea is interesting, but based on the examples I’ve listed, which I must admit is not a huge sample, most of them are played in a sort of GUI experience sort of way. I think it would be very, very difficult to translate the core concepts of programming to a side scroller.

    Unfortunately, I haven’t played any of these games, but I have scrolled through that category myself to see what’s out there. I agree with you, that a side scroller is probably not the best option to introduce programming concepts from a game-mechanic perspective. I think didn’t really communicate well, that the way I envision my game differs a bit from these approaches. I don’t actually want to focus on specialized in-game mechanics that help to visualize algorithms or programming concepts. Instead, the game is meant to be a very mechanically trivial, story focussed frontend, that makes achieving the programming tasks more exciting.









  • One thing that is never mentioned when it comes to “price tag” articles for NASA projects, is how good of an investment it is. Most of NASA’s research projects (especially the ones of the JPL) are done in America by American workers and companies and, therefore, boost the economy. Investments like this also strengthen the scientific community which has a ripple effect on education and future innovations. It is also absolutely necessary if the US wants to continue being the leader in the aerospace industry.

    Outsourcing r&d work to private companies means, that innovations will be kept proprietary and patented behind growing price tags that will always be just a little cheaper than doing it from scratch. It also means that shareholders of those contractors get significant margins that won’t be injected back into the system. In that sense, privatization doesn’t reduce the “price tag” on research projects, it just makes some of the costs less visible for shortsighted financial planners.

    Ultimately, research will always be expensive and the real reason for the bad budget estimations is the political pressure that forces NASA to operate at such a low budget (compared to other industries with less or equal economical return). A pressure that is created by politicians who are funded by these private companies and not acting in the interest of the public.




  • There are a many approaches to implementing OOP in C. Since C doesn’t give you any language constructs to implement this out of the box, it’s up to you to do it in a consistent and understandable manner. Since there is no definite way to do it, let me just give you an example of how I would translate a Python file, and you can decide how you implement it from there:

    --------------
    class Parent:
        def __init__(self, param1: str, param2: int):
            self.__param1 = param1
            self.__param2 = param2
        def __private_method(self):
            print("private method")
        def public_method(self):
            print("public method")
        @staticmethod
        def static_method():
            print("static method")
        @property
        def param1(self):
            return self.__param1
    
    class Child(Parent):
        def __init__(self):
            super().__init__("param1", 2)
    --------------
    

    I would split the C code for this into header and source files:

    (header.h)

    --------------
    #pragma once
    
    /// Parent Class ///
    typedef struct Parent_obj {
        char* param1
        unsigned int param1_len
        int param2
    } Parent_obj_t;
    void Parent_init(Parent_obj_t* self, char* param1, unsigned int param1_len, int param2);
    void Parent_public_method(Parent_obj_t* self);
    void Parent_static_method();
    void Parent_param1(Parent_obj_t* self, char* out, unsigned int max_len); // property method with upper bound string length
    void Parent_del(Parent_obj_t* self); // destruct object (similar to __del__() in python)
    
    /// Child Class ///
    typedef struct Child_obj {
        Parent_hidden_state_t* super
        char* param
        unsigned int param_len
    } Child_obj_t
    void Child_init(Child_obj_t* self, Parent_obj_t* super);
    void Child_del(Child_obj_t* self);
    --------------
    

    (source.c)

    --------------
    #include "header.h"
    
    /// Parent Class ///
    // private methods
    void Parent_private_method(Parent_obj_t* self){...} // not visible in the header file
    // public methods
    void Parent_init(Parent_obj_t* self, char* param1, unsigned int param1_len, int param2){...}
    void Parent_public_method(Parent_obj_t* self){...}
    void Parent_static_method(){...}
    void Parent_param1(Parent_obj_t* self, char* out, unsigned int max_len){...}
    void Parent_del(Parent_obj_t* self){...}
    
    /// Child Class ///
    // public methods
    void Child_init(Child_obj_t* self, Parent_obj_t* super){...}
    void Child_del(Child_obj_t* self){...}
    --------------
    

    Modules and namespaces can be modeled using folders and prefixing your structs and functions.