Author Topic: Discussion forum for Horizontal Shooter Tutorial  (Read 2090 times)

Offline Steinbock

  • Mr. Drawsprite
  • **
  • Posts: 50
    • View Profile
Discussion forum for Horizontal Shooter Tutorial
« on: March 25, 2009, 05:59:57 pm »
Here you can post your questions and suggestions according to the Horizontal Shooter Tutorial

Offline Enigma

  • Mc. Print
  • *
  • Posts: 13
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #1 on: July 20, 2009, 07:28:45 pm »
Is there any chance that you can give us the map editor so we can play about with the levels and add new things to it?
Russ Hoy

Offline Steinbock

  • Mr. Drawsprite
  • **
  • Posts: 50
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #2 on: July 21, 2009, 10:26:39 am »
Of course!   =D
Original sourcecode is written in Delphi. Please give me a week or two, so i can
rewrite it in GLBASIC. I think this makes more sense.

Offline Enigma

  • Mc. Print
  • *
  • Posts: 13
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #3 on: July 21, 2009, 02:45:33 pm »
That would be awesome, thanks :)
Russ Hoy

Offline Steinbock

  • Mr. Drawsprite
  • **
  • Posts: 50
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #4 on: July 27, 2009, 01:34:52 pm »
Simple tilemap editor is now available.
See "EDIT" in first post topic http://www.glbasic.com/forum/index.php?topic=2950.0

Offline Enigma

  • Mc. Print
  • *
  • Posts: 13
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #5 on: July 27, 2009, 02:44:25 pm »
Thanks for the map editor :) It seems that the code for the editor is not in the zip though.
Russ Hoy

Offline Steinbock

  • Mr. Drawsprite
  • **
  • Posts: 50
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #6 on: July 27, 2009, 03:45:55 pm »
Ok. Should be fixed.  :whistle:

Offline Armoured

  • Mc. Print
  • *
  • Posts: 33
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #7 on: September 27, 2009, 09:12:59 pm »
Hi
Ehm, where is the first part of the tutorial?  :whistle:

Offline Steinbock

  • Mr. Drawsprite
  • **
  • Posts: 50
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #8 on: September 28, 2009, 07:50:01 am »
If you mean an attached "ZIP-code", then there is none.
In the first part it's a small "motivation" to do a little own work.  =D

Offline Armoured

  • Mc. Print
  • *
  • Posts: 33
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #9 on: September 28, 2009, 07:32:17 pm »
Quote
If you mean an attached "ZIP-code", then there is none.
In the first part it's a small "motivation" to do a little own work.

Then you haven't made a "tut Part 1.zip"?
I can download from the first post only the editor

Offline Steinbock

  • Mr. Drawsprite
  • **
  • Posts: 50
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #10 on: September 29, 2009, 07:49:17 am »
That's the whole truth.  :good:

Offline okee

  • Mr. Drawsprite
  • **
  • Posts: 64
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #11 on: February 12, 2010, 02:41:34 pm »
Thanks for that, very useful also nice to see how other people
structure their programs.


okee

Offline Manu Segura

  • Mc. Print
  • *
  • Posts: 24
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #12 on: July 28, 2010, 11:06:34 pm »
Hello all,

Amongst other doubts I have with the tutorial, the most important one that comes to my mind right now is:

Can anyone explain me how the .evt file works, how should I edit it to make things happen in the level?

Thanks in advance for the help!

Offline Steinbock

  • Mr. Drawsprite
  • **
  • Posts: 50
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #13 on: July 29, 2010, 07:57:41 am »
Hello

It is explained in tutorial no. 6:

in level00.gbas the objects manually. But in a completed game are much more required, and it would be very laborious to call every single object separatly. Therefore we read out the datas from a predefined file level00.evt. For this we must expand our existing event-type (TEvent).

Code: [Select]
        IX%             =   0
        ID%[256]
        Pos%[256]
        X%[256]
        Y%[256]

IX is a pointer to the actual listentry, ID is the objectID, Pos is the scrollposition WHEN the object shall appear and X,Y the position WERE the object shall appear.
With
Code: [Select]
    // init events
    OPENFILE(1,"./isdo/level00.evt",TRUE)
    FOR p=0 TO 254
        READUWORD 1,val
        Event.Pos[p]=val
    NEXT
    FOR p=0 TO 254
        READUWORD 1,val
        Event.ID[p]=val
    NEXT
    FOR p=0 TO 254
        READUWORD 1,val
        Event.X[p]=val
    NEXT
    FOR p=0 TO 254
        READUWORD 1,val
        Event.Y[p]=val
    NEXT

in level00.gbas we load these datas into our eventlist. The request when a object shall appear, we do in the subroutine EventHANDLER in library.gbas.
Code: [Select]
//=============================================================================
  SUB EventHANDLER:
//=============================================================================

LOCAL   ix%,typ%

    ix=Event.IX
    IF ScrollX=Event.Pos[ix]
        SELECT Event.ID[ix]
            CASE ID_ENEMY1 TO ID_ENEMY2
                ObjectADD(Event.ID[ix],Event.X[ix],Event.Y[ix])
        ENDSELECT
        INC Event.IX,1
    ENDIF

ENDSUB // EventHANDLER

First we request the current index in the eventlist, then we check the type and add the corresponding object to the scene. The rest goes as if by magic.


Today or tomorrow i will upload a simple eventeditor :)

Offline Manu Segura

  • Mc. Print
  • *
  • Posts: 24
    • View Profile
Re: Discussion forum for Horizontal Shooter Tutorial
« Reply #14 on: July 29, 2010, 04:09:58 pm »
That would be great, thanks Steinbock.