Results 1 to 10 of 17

Thread: Online torpedo game

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Its first version is almost finished =)

    Okay I have got rid of all of the major bugs. The game is now theoritically playable. What is left to be done:
    1) The ships are yet just random squares they don't form a ship this should really not be a problem I just write an organising procedure and there it is.
    2) Graphics. Now I always use simple sprites for testing(red square, gray square etc...) but a game should really not have graphs like that
    3) Sounds. Should not be a problem either.
    4) A menu system with some kind of in-game menu with nice functions. Any good games have these why won't I put them in mine? I think it won't be hard altough it could be a bit tricky. Especially the in-game part.
    5) This is the most interesting part: make it work online. I think I will save this for later... I'm just not skilled enough for that yet.

    Now as you can see most of the remaining parts of the game takes more time than skill to get them done. And that's what I hate in designing games(I have like a dozens of game maker games all done with complicated calculations, AI and stuff like that but I was way too lazy to do the health-life counts, animations, spirtes, musics, backgrounds, level-designs and all the easy stuff...). Someone said I could lose interest if I made the game too hard to design for my skills. Well actually I usually lose interest at these parts of the game. When the hard parts are done and just time-work is what's left. Anyways I will finish this I've decided it. I just messed up too many hours and nerves on it not to do so However this is my very first game written in Pascal and still I got many help from you guys here(for which I am very grateful) I think I could be proud of myself. I really also solved things by myself I wouldn't have imagined I could a few weeks ago. Also this one simple game at least doubled my programming skills. It gave me some insight into OOP and SDL too. It's been a useful week.

  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Sounds great, I expect a screenshot and a link/attachment copy of your finished first version for us to try.

    It makes a huge difference when you take smaller steps to learn the basics at the beginning. By posting your projects you can also let others see how it's coming along as well. Some errors or bugs can get pointed out and we can give tips on optimizing and polishing up any glitches or bugs we run into. Plus it helps to show activity in the area of programming here too.

    If you need further help with graphics (I recommend starting with the BMP bitmap graphics format before you go off and try getting PNG and all kinds of other formats involved) sound or anything else, just ask, we like helping others. (Just try to post in the related forum categories ) As for the 'time consuming stuff', we all go through that too. I personally get some joy out of looking at the project running where you don't see much of anything in my game window/screen, but after plugging away at it for a couple of hours I give it a run and wow what a difference you see after. That's what has always kept me going making games for all these years.

    Though lately I mostly write about game development and manage sites and edit magazines.

    Nice job! Keep up the good work and it'll be completed in no time.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3
    I will load it up somewhere and give links As soon as it is finished. I will then accept opinions, suggestions and bug reports. I realised however I will also need a better AI. Since the squares where ships are located is totally random shooting at random places is yet okay but after the organisation, shipparts will be adjecent to each other so the AI will take that into concideration and count differently if it made a hit. For now the shooting procedure is like this:
    Code:
    Procedure TAI.RandomShot;
    
    var c1,c2,i:integer;
        neednewshot:longint;
    begin
           Repeat
                 neednewshot:=0;
                 c1:=random(10);
                  c2:=random(10)+1;
                  for i:=1 to n do {n is a global integer variable it stores how many squares have the ai shot at.}
    
                          begin
               if alreadyshot[i]=c1*10+c2 then neednewshot:=neednewshot+1; {alreadyshot is an array of bytes of the object type TAI which stores at what squares tha ai has already shot at to make sure it won't shoot there again}
    
          end; //This is in begin-end because I might add some additional factors later.
           Until neednewshot=0;
           alreadyshot[n]:=c1*10+c2;
           n:=n+1;
    
           if fleet[c1+1][c2]=3 then
           begin
                 hits:=true;
         misses:=false; //These two are variables of the object type TAI
                 fleet[c1+1][c2]:=1; {global 10x10 matrix variable it stores the shipplaces of the player}
         playershipcount:=playershipcount-1;
                 ReDrawBoard_Playerships('hit',c1+1,c2);
                 if playershipcount=0 then defeated;
       end
           else
           begin
                 hits:=false;
         misses:=true;
                 fleet[c1+1][c2]:=2;
                 ReDrawBoard_Playerships('nothit',c1+1,c2);
           end;
    end;
    {ReDrawBoard_Playerships(hit:string,x,y:byte) is a procedure to draw either a red(hit) or gray(miss) square at the shot coordinates.}
    Now my plans are to make a procedure TAI.AccurateShot(x,y:byte); so inside the TAI.AITurn procedure there will be a check. Until a hit is made the TAI.RandomShot will be called. If the AI hits it will shoot at adjecent squares to that coordinate(x,y) until there aren't any adjecent squares left to be shot near any hit squares. Then the TAI.RandomShot will be called again etc. This isn't as easy as I thought I think however I will be able to do it. But for now I'm packing because I'm going home. Have a nice weekend everyone!

Tags for this Thread

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
  •