Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Beta, Just Die Already!

  1. #11

    Beta, Just Die Already!

    Wow, that's pretty critical errors right there. And I think I just figured out what was going on, too. Try the patch now, please, and let me know if that fixed it. (Note, the full download is updated as well.)

    I thought of the radar suggestion, but right at the moment I'm not sure how I would write it into operation. I am well aware that the game is not very optimized, it runs at an average of 105 for me to 85 depending on what apps I have running. The primary part I can optimize is the drawing phase, since I do some dynamic things with colors that I really don't need to do.

    A bit of evasion advice: Don't thrust while turning. Because the missiles ONLY react to your VELOCITY, not your facing, you can make a rapid direction change without them hitting you. Reds do avoid this problem a little, but then again they're the tougher ones.

    The difficulty in making the missiles collide and explode is in both the spawning code, they'd collide instantly, as well as the missiles aren't really smart enough to avoid each other. Velocity is changed by facing, not true thrust, and I think changing the thrust direction for every missile that is too close might be a bit frantic for the reactions. Not sure though. Explosions are easier, but with the way I've coded them, maybe it isn't such a good idea. (Although I just had an idea on how to do it before the missiles get smashed by the garbage collection routine.)

    I also really am not a good graphic artist, so the ship is a placeholder until I decide either to remake it or unless someone volunteers. Frankly I cannot draw a space freighter worth beans. :?

  2. #12

    Beta, Just Die Already!

    This is a code snippet from IronStrike, which draws the units on my radar...

    Very simple, isn't it?

    Code:
     
       for i := 0 to ISUnits.Count-1 do
       begin
         ISUnit := ISUnits[i];
         if ISUnit^.Life > 0 then
           if Distance&#40;Player.PosX, Player.PosY, ISUnit^.PosX, ISUnit^.PosY&#41; < 450 then
           begin
             if ISUnit^.Faction = Player.Faction then
               RectColor &#58;= $4400FF00
             else
               RectColor &#58;= $440000FF;
             MyCanvas.FillRect&#40;Bounds&#40;&#40;RadarMiddleX + trunc&#40;ISUnit^.PosX - Player.PosX&#41; div 10&#41;,
                                      RadarMiddleY - &#40;trunc&#40;ISUnit^.PosY - Player.PosY&#41; div 10&#41;,
                                       3,3&#41;, RectColor, fxAdd&#41;;
           end;
       end;
    Just cycle through all your rockets, decide which color you want to have the dots on the radar (in your case kind of missiles) and draw them.

    In my case I scan all units (friends and foes) which are within the radius of 450 gameunits from players position.
    Then I calculate the position (Unit.PosX - Player.PosX, same with PosY) and add the value to the middle of my radar. The values are divided by 10 to make the 90 pixel big radar show 900 game units...

    I think you can use this nearly the same way.

    Hope this helps to get a radar soon

    Greetings,
    Dirk

    PS: I am at work right now and can't test your new upload. I will do it when I am home again.
    <a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&amp;utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>

  3. #13

    Beta, Just Die Already!

    I'm going to do it non-standard though. I won't tell you how, because I think it'll look cool. Can't do much about it today, I have a dentist appointment, but I'll work upon it later or tomorrow.

    I hope I fixed it. I referenced the canvas and images prior to their initialization which seemed to work on my PC, but I figured that it'd be safer if they just were in the right spot, you know? :roll:

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •