Create an Evolving World Part 1: The Environment

Поделиться
HTML-код
  • Опубликовано: 18 дек 2024

Комментарии • 19

  • @nahuelcesattilaluce1257
    @nahuelcesattilaluce1257 3 месяца назад

    discovering your channel made my friday night! cheers from Argentina!

    • @programmingchaos8957
      @programmingchaos8957  3 месяца назад +1

      I'm glad you're enjoying it! And it's always fun to get contacted by people from around the world. Let me know if any thing cool evolves :)

  • @gondolaone7748
    @gondolaone7748 11 месяцев назад +1

    I've been watching a lot of this stuff lately and this is just what I was looking for, thanks!

    • @programmingchaos8957
      @programmingchaos8957  11 месяцев назад

      I'm glad you found it then. I'll have the other videos in the series posted in a couple of days.

  • @Gentle_Ego
    @Gentle_Ego 11 месяцев назад +1

    I love your videos content, and I really hope for your 'BOOM' on RUclips. Also I would love to see how this project goes on

    • @programmingchaos8957
      @programmingchaos8957  11 месяцев назад +1

      Thank you, I'm very glad you're enjoying them. Honestly, the channel is already doing better than I would have expected - but who knows, maybe it will take off. I've already recorded the rest of the project, just need to do a little more editing. I'll post the videos in a couple of days.

    • @Gentle_Ego
      @Gentle_Ego 11 месяцев назад +1

      @@programmingchaos8957 I'm dying of curiosity as to how this magnificent and exciting project will continue👍

  • @per1sher
    @per1sher 11 месяцев назад

    Great video. I'm looking forward to the next installment...

    • @programmingchaos8957
      @programmingchaos8957  11 месяцев назад

      Thanks! The other videos are recorded and mostly edited. I'll post them in a day or two.

  • @JohnMitchellCalif
    @JohnMitchellCalif 11 месяцев назад

    super interesting! Subscribed

    • @programmingchaos8957
      @programmingchaos8957  11 месяцев назад

      Fantastic to hear it! I hope you like the rest of the series as well.

  • @omnipotentdogs2466
    @omnipotentdogs2466 11 месяцев назад

    Awesome video!

    • @programmingchaos8957
      @programmingchaos8957  11 месяцев назад

      Thanks! I'll post the next two in the next couple of days.

  • @Gentle_Ego
    @Gentle_Ego 10 месяцев назад

    I am trying to do this project and I am retaking a look at all the 3 videos, but I have a problem with the zoom, in fact I can zoom in but the zoom out simply doesn't work. Here's the code and thanks for the help:
    int cellScale = 4;
    int mapWidth, mapHeight;
    int gridWidth, gridHeight;
    map theMap;
    float zoom, cameraX, cameraY;
    void setup(){
    size(800,800,P3D);
    mapWidth = 1*width;
    mapHeight = 1*height;
    gridWidth = mapWidth/cellScale;
    gridHeight = mapHeight/cellScale;
    theMap = new map();
    cameraX = width/2.0;
    cameraY = height/2.0;
    zoom = (height/2.0) / tan(PI*30.0/180.0);

    }
    void draw(){
    theMap.display();
    keyInput();
    }
    void keyInput(){
    if(keyPressed){
    if(keyCode == LEFT){
    cameraX-=5;
    }
    if(keyCode == RIGHT){
    cameraX+=5;
    }
    if(keyCode == UP){
    cameraY-=5;
    }
    if(keyCode == DOWN){
    cameraY+=5;
    }
    camera(cameraX, cameraY, zoom,
    cameraX, cameraY, 0,
    0,1,0);
    }
    }
    void mouseWheel(MouseEvent event){
    float e = event.getCount();
    zoom += 10*e;
    camera(cameraX, cameraY, zoom,
    cameraX, cameraY, 0,
    0,1,0);
    }

    • @programmingchaos8957
      @programmingchaos8957  10 месяцев назад +1

      That's very odd. I just pasted your code into a new project and it worked fine. I would try printing the value of e inside the mouseWheel() function. It should be positive when you zoom out and negative when you zoom in. Possibly your scroll wheel returns different values(?) Although using the scroll wheel is nice, you could always replace it with keys, e.g. when i is pressed add 10 to zoom and when k is pressed subtract 10.

    • @Gentle_Ego
      @Gentle_Ego 10 месяцев назад +1

      @@programmingchaos8957 Thank you for the advice, I tried changing the zoom values with other keys, but everytime I try to zoom out it doesn't work. It could also be for a my computer problem or maybe it's a bug with processing. I try to reinstall Processing and hope. Thanks for your time and help! 👍

    • @programmingchaos8957
      @programmingchaos8957  10 месяцев назад +1

      @@Gentle_Ego Did you try printing the value of e in the zoom function? If e is positive it should be changing the position of the camera. I'm baffled.

    • @Gentle_Ego
      @Gentle_Ego 10 месяцев назад +1

      @@programmingchaos8957 I have finally fixed it! The problem was that I didn't remember to put background(0) in the main code 😂😅. Tysm for the help and the availability

    • @programmingchaos8957
      @programmingchaos8957  10 месяцев назад +1

      I've done that a few (i.e. many) times :)