Author Topic: The Case of Joseph Curwen  (Read 10822 times)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4310
    • View Profile
    • Portfolio
The Case of Joseph Curwen
« on: 2014-Nov-19 »
A quick (8h) implementation of a future game I plan to create, here in a very simple form.
Did it for AI class as an example of rule based system...but adding a pinch of fun.

The code is probably a winner on the awards of the worst-fast-rogue-savage code written ever by a human been but heck, it does resolve the proposal.
That must matter me thinks. ::)

Have fun.

how to play the mess?
.rogue style + action points
.4 turns for player, move with arrows, space trigger and untrigger the gun (6 chamber), triggering cost no ap.
.when triggered, shot with arrow on that direction
.if head shot, kill zombie, otherwise it pushes him back if an empty space
.you must scavenge all tombs (T) and leave map through entrance.
.tomb can replenish 1 health or full ammo.
.2 turns for zombies

F1 change views (standard ascii, array info, gfx)

not quite balenced, but no time to anything, I must finish Msc semester in the usual last time hurry. ;)
The code is on the zip as a TXT, try not to laugh too hard hehe. :booze:
Some game design on the pdf in portuguese br.

more on this latter...


edit: ahhhh such is the power of the powers in GLBASIC! :)
« Last Edit: 2014-Nov-19 by erico »

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4310
    • View Profile
    • Portfolio
Re: The Case of Joseph Curwen
« Reply #1 on: 2014-Nov-19 »
ops...why not add a screen shot? :whip:

botter not for the constant debug info on the right. :whistle:

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4158
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: The Case of Joseph Curwen
« Reply #2 on: 2014-Nov-19 »
Looks like the odds are stacked against you in that screenie erico! :P

I'll give this a try later. Cheers :)
I came. I saw. I played.

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1544
    • View Profile
Re: The Case of Joseph Curwen
« Reply #3 on: 2014-Nov-19 »
Alrighty!  =D

It's not easy as I was only able to obtain x3 "T"s.   :sick:

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4158
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: The Case of Joseph Curwen
« Reply #4 on: 2014-Nov-19 »
I managed 4 or 5 :)

I expected it to be "proper" turn based (more like AquaVenture). Are all Rogue-Likes "move 4 places and then wait for enemies to move"? That threw me at first.
I came. I saw. I played.

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1715
    • View Profile
Re: The Case of Joseph Curwen
« Reply #5 on: 2014-Nov-19 »
Cool!!
Look forward to this!

Have started on a rogue-like from ages ago but never got round to it.

Looks nice!
Ian, normally enemies move every time player moves but maybe they are 4x slower than the player :)

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4310
    • View Profile
    • Portfolio
Re: The Case of Joseph Curwen
« Reply #6 on: 2014-Nov-19 »
...
I expected it to be "proper" turn based (more like AquaVenture). Are all Rogue-Likes "move 4 places and then wait for enemies to move"? That threw me at first.

Yep, I guess it is more like an X-Com thing for the player. The zombies though, move like a proper rogue, each one takes a turn then each one takes another turn so to spend 2 action points.

This was all really badly-quickly implemented, I used a lot of SLEEP command, which responds differently per computer.
I´m sure to make it a proper game at some point in january/february. 

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4310
    • View Profile
    • Portfolio
Re: The Case of Joseph Curwen
« Reply #7 on: 2014-Nov-19 »
Here the source code, add the MEDIA from last download to this and you have it working.

It is really a huge mess of code, but I hope this can help teach people 2 things:
-how not to code a game.
-how GLB can get you there even if a messy code. :P

You can design your own map at the DATA at the end.
Also, the rules that move the zombies are 3 stage based on distance from the player:
-FAR total random movement.
-MID 80% chance of moving towards player, 20% chance of random movement.
-CLOSE move towards player.

It is, of course, a flawed system when you consider a closed space level, like houses and so on. The zombies also see through obstacles.
I can win the game easily on the open level, it is just a matter of crowd control, your 4 steps puts you on a great advantage.
Ya, gather some zombies following you and you create a bubble space between CLOSE and FAR distance, you can exploit this.
Level 2 is harder, specially if the tomb is located on a more closed space, like the top left part. It is still manageable when you know what to expect from the engine.

edit: There is also a dirty trick in the way I edited the font graphics to use it as sprites...
Code: (glbasic) [Select]
// --------------------------------- //
// Project: LD - O Caso de Joseph Curwen
// Start: Monday, November 17, 2014
// IDE Version: 12.243

//--- BOOT
LIMITFPS 60
SETSCREEN 800,600,0
SETCURRENTDIR("Media")
LOADFONT "f1.bmp",1
LOADFONT "f0.bmp",2
SETFONT 1
LOADSOUND "click 01.wav",1,1 ;//energia tumba
LOADSOUND "click 02.wav",2,1 ;//exit fuga
LOADSOUND "click 03.wav",3,1 ;//bullets tumba
LOADSOUND "click 05.wav",5,1 ;//hit zumbi
LOADSOUND "click 06.wav",6,1 ;//tiro
LOADSOUND "click 09.wav",9,2 ;//hit
LOADSOUND "click 10.wav",10,1 ;//exit morte
LOADSOUND "click 11.wav",11,1 ;//hit zumbi head shooooot
LOADSOUND "click 12.wav",12,1 ;//gatilho

//--- VARIABLES
GLOBAL db // debug on off
GLOBAL c // DECLARE X COUNTER VARIABLE
GLOBAL d // DECLARE Y COUNTER VARIABLE
GLOBAL m[] // DECLARE BOARD VARIABLE
DIM m[32][32] // DIMENSION BOARD VARIABLE
GLOBAL t // General timer
GLOBAL tx, ty // localizador geracao de tumbas
GLOBAL px,py,pe,pb // PLAYER x,y,energia,balas
GLOBAL rd // round player/zombie
GLOBAL tr // turn (4 player 2 zumbi)
GLOBAL kc // key control so move com >25
GLOBAL tc // tumba count (10)
GLOBAL zx[],zy[] // xy xumbixs
DIM zx[50]
DIM zy[50]
GLOBAL zc // zombie count max 50
zc=49 // total-1
GLOBAL zdx,zdy // distancia player
GLOBAL zd // dado para movimentacao (0-3)
GLOBAL s // 0 normal 1 shoot
GLOBAL bx,by, bg // bullet x y gasta
GLOBAL h$
GLOBAL map
INPUT h$,10,10
IF h$="0"
map=0
ELSE
map=1
ENDIF
//--- LOAD MAP
IF map=0 THEN RESTORE MAPA1 // load board
IF map=1 THEN RESTORE MAPA2
FOR d=0 TO 31 // generate board data into array
FOR c=0 TO 31
READ m[c][d]
NEXT
NEXT

//--- GERAR TUMBAS
tc=10 // tumba count 10
FOR t=0 TO 9
tx=RND(31) ; ty=RND(31)
IF m[tx][ty]=0
m[tx][ty]=4
ELSE
t=t-1
ENDIF
NEXT

//--- GERAR PLAYER
px=RND(1)+15 // xy player
py=31
pe=5
pb=6


//--- GERAR ZUMBIS
FOR c=0 TO zc
zx[c]=RND(31) // limite no mapa y perto player
zy[c]=RND(24)
IF m[zx[c]][zy[c]]<>0 // verifica bloco livre
c=c-1
ENDIF
IF m[zx[c]][zy[c]]=0 // marca zumbi no mapa
m[zx[c]][zy[c]]=8
ENDIF
NEXT



// MAINLOOP--------------------------[start]
WHILE TRUE
bx=px ; by=py
//--- PLAYER---------------------------------------------------------------------------------------
IF rd=0

//--- movimento
kc=kc+1
IF kc>10 AND tr<5 // checar kc
IF KEY(200)=1 AND s=0
py=py-1
IF py<0 THEN py=0 // out of bound
kc=0 // zera key count timer
tr=tr+1 // +turn
IF m[px][py]=1 OR m[px][py]=8 // limita zumbi e parede
py=py+1
ENDIF
ENDIF
IF KEY(208)=1 AND s=0
py=py+1
IF py>31 THEN py=31 // out of bound
kc=0 // zera key count timer
tr=tr+1 // +turn
IF m[px][py]=1 OR m[px][py]=8 // limita zumbi e parede
py=py-1
ENDIF
ENDIF
IF KEY(205)=1 AND s=0
px=px+1
IF px>31 THEN px=31 // out of bound
kc=0 // zera key count timer
tr=tr+1 // +turn
IF m[px][py]=1 OR m[px][py]=8 // limita zumbi e parede
px=px-1
ENDIF
ENDIF
IF KEY(203)=1 AND s=0
px=px-1
IF px<0 THEN px=0 // out of bound
kc=0 // zera key count timer
tr=tr+1 // +turn
IF m[px][py]=1 OR m[px][py]=8 // limita zumbi e parede
px=px+1
ENDIF
ENDIF
IF KEY(28)=1 AND s=0 // movimento pass
kc=0
tr=tr+1
ENDIF
//--- SHOOT!!!!!!!!!!!!!!
IF KEY(57)=1 AND s=0 AND pb>0 // trigger
kc=0
s=1
bx=px
by=py
PLAYSOUND (12,0,1)
ENDIF
IF s=1 AND kc>10
IF KEY(200)
PLAYSOUND (6,0,1)
pb=pb-1
FOR d=0 TO 32
by=by-1
FOR c=0 TO zc
IF m[bx][by]=1 OR m[bx][by]=3 OR m[bx][by]=4 //ricochete
bg=1
bx=px
by=py
ENDIF
IF bx=zx[c] AND by=zy[c] AND bg=0 //zombie collision hit
m[zx[c]][zy[c]]=0
zy[c]=zy[c]-1
PLAYSOUND (5,0,1)
IF m[zx[c]][zy[c]]<>0 //limite
zy[c]=zy[c]+1
ENDIF
IF RND(4)=0 //head shot
zx[c]=0;zy[c]=0
PLAYSOUND (11,0,1)
ELSE
m[zx[c]][zy[c]]=8 //update map zombie data
ENDIF
bg=1
ENDIF
NEXT
SLEEP 15
NEXT
s=0
kc=0
bg=0
tr=tr+1
ENDIF
IF KEY(208)
PLAYSOUND (6,0,1)
pb=pb-1
FOR d=0 TO 32
by=by+1
FOR c=0 TO zc
IF m[bx][by]=1 OR m[bx][by]=3 OR m[bx][by]=4 //ricochete
bg=1
bx=px
by=py
ENDIF
IF bx=zx[c] AND by=zy[c] AND bg=0 //zombie collision hit
m[zx[c]][zy[c]]=0
zy[c]=zy[c]+1
PLAYSOUND (5,0,1)
IF m[zx[c]][zy[c]]<>0 //limite
zy[c]=zy[c]-1
ENDIF
IF RND(4)=0 //head shot
zx[c]=0;zy[c]=0
PLAYSOUND (11,0,1)
ELSE
m[zx[c]][zy[c]]=8 //update map zombie data
ENDIF
bg=1
ENDIF
NEXT
SLEEP 15
NEXT
s=0
kc=0
bg=0
tr=tr+1
ENDIF
IF KEY(205)
PLAYSOUND (6,0,1)
pb=pb-1
FOR d=0 TO 32
bx=bx+1
FOR c=0 TO zc
IF m[bx][by]=1 OR m[bx][by]=3 OR m[bx][by]=4 //ricochete
bg=1
bx=px
by=py
ENDIF
IF bx=zx[c] AND by=zy[c] AND bg=0 //zombie collision hit
m[zx[c]][zy[c]]=0
zx[c]=zx[c]+1
PLAYSOUND (5,0,1)
IF m[zx[c]][zy[c]]<>0 //limite
zx[c]=zx[c]-1
ENDIF
IF RND(4)=0 //head shot
zx[c]=0;zy[c]=0
PLAYSOUND (11,0,1)
ELSE
m[zx[c]][zy[c]]=8 //update map zombie data
ENDIF
bg=1
ENDIF
NEXT
SLEEP 15
NEXT
s=0
kc=0
bg=0
tr=tr+1
ENDIF
IF KEY(203)
PLAYSOUND (6,0,1)
pb=pb-1
FOR d=0 TO 32
bx=bx-1
FOR c=0 TO zc
IF m[bx][by]=1 OR m[bx][by]=3 OR m[bx][by]=4 //ricochete
bg=1
bx=px
by=py
ENDIF
IF bx=zx[c] AND by=zy[c] AND bg=0 //zombie collision hit
m[zx[c]][zy[c]]=0
zx[c]=zx[c]-1
PLAYSOUND (5,0,1)
IF m[zx[c]][zy[c]]<>0 //limite
zx[c]=zx[c]+1
ENDIF
IF RND(4)=0 //head shot
zx[c]=0;zy[c]=0
PLAYSOUND (11,0,1)
ELSE
m[zx[c]][zy[c]]=8 //update map zombie data
ENDIF
bg=1
ENDIF
NEXT
SLEEP 15
NEXT
s=0
kc=0
bg=0
tr=tr+1
ENDIF
IF KEY(57)=1 // destrigger
kc=0
s=0
PLAYSOUND (12,0,1)
ENDIF
ENDIF
//--- SHOOT!!!!!!!!!!!!!! END
ENDIF

//--- tumba collect
IF m[px][py]=4
IF RND(1)=0 // energy
pe=pe+1
IF pe>5 THEN pe=5
PLAYSOUND (1,0,1)
ELSE
pb=6 // bullets
PLAYSOUND (3,0,1)
ENDIF
m[px][py]=0
tc=tc-1 //tc tumba coletada
ENDIF

//--- FINISH PLAYER ROUND
IF tr=5
tr=0
rd=1
kc=0
ENDIF
IF tr=4
SLEEP 15 //delay falso thinking
tr=5
kc=0
ENDIF

ENDIF
//--- PLAYER END--------------------------------------------------------------------------------

//--- ZUMBI-------------------------------------------------------------------------------------
IF rd=1
tr=tr+1 // avanca turn (max 2)
FOR c=0 TO zc
zdx=zx[c]-px // gera variavel de distancia
zdy=zy[c]-py
IF zdx<0 THEN zdx=zdx*-1 // transforma variavel em positivo
IF zdy<0 THEN zdy=zdy*-1

IF zdx>12 AND zx[c]<>0 AND zy[c]<>0 OR zdy>12 AND zx[c]<>0 AND zy[c]<>0 // FAR distancia mov------------------->
m[zx[c]][zy[c]]=0 // clear map current zombie data
zd=RND(3) //dado
IF zd=0
zx[c]=zx[c]-1
IF m[zx[c]][zy[c]]<>0 //limite
zx[c]=zx[c]+1
ENDIF
ENDIF
IF zd=1
zx[c]=zx[c]+1
IF m[zx[c]][zy[c]]<>0 //limite
zx[c]=zx[c]-1
ENDIF
ENDIF
IF zd=2
zy[c]=zy[c]-1
IF m[zx[c]][zy[c]]<>0 //limite
zy[c]=zy[c]+1
ENDIF
ENDIF
IF zd=3
zy[c]=zy[c]+1
IF m[zx[c]][zy[c]]<>0 //limite
zy[c]=zy[c]-1
ENDIF
ENDIF
ENDIF
IF (zdx>7 AND zdx<13 AND zdy<13 AND zx[c]<>0 AND zy[c]<>0) OR (zdy>7 AND zdy<13 AND zdx<13 AND zx[c]<>0 AND zy[c]<>0) // MID distancia mov------------------->
m[zx[c]][zy[c]]=0 // clear map current zombie data
zd=RND(5) //dado
IF zd<5
zd=RND(1) //redado direcao corte diagonal
IF zx[c]<px AND zd=0
zx[c]=zx[c]+1
IF m[zx[c]][zy[c]]<>0 //limite
zx[c]=zx[c]-1
ENDIF
ENDIF
IF zx[c]>px AND zd=0
zx[c]=zx[c]-1
IF m[zx[c]][zy[c]]<>0 //limite
zx[c]=zx[c]+1
ENDIF
ENDIF

IF zy[c]<py AND zd=1
zy[c]=zy[c]+1
IF m[zx[c]][zy[c]]<>0 //limite
zy[c]=zy[c]-1
ENDIF
ENDIF
IF zy[c]>py AND zd=1
zy[c]=zy[c]-1
IF m[zx[c]][zy[c]]<>0 //limite
zy[c]=zy[c]+1
ENDIF
ENDIF
ENDIF
IF zd>4
zd=RND(3) //RE dado
IF zd=0
zx[c]=zx[c]-1
IF m[zx[c]][zy[c]]<>0 //limite
zx[c]=zx[c]+1
ENDIF
ENDIF
IF zd=1
zx[c]=zx[c]+1
IF m[zx[c]][zy[c]]<>0 //limite
zx[c]=zx[c]-1
ENDIF
ENDIF
IF zd=2
zy[c]=zy[c]-1
IF m[zx[c]][zy[c]]<>0 //limite
zy[c]=zy[c]+1
ENDIF
ENDIF
IF zd=3
zy[c]=zy[c]+1
IF m[zx[c]][zy[c]]<>0 //limite
zy[c]=zy[c]-1
ENDIF
ENDIF
ENDIF
ENDIF
IF zdx<8 AND zdy<8 AND zx[c]<>0 AND zy[c]<>0 // CLOSE distancia mov------------------->
m[zx[c]][zy[c]]=0 // clear map current zombie data
zd=RND(3) //dado
IF zd<6
IF zx[c]<px AND zd<3
zx[c]=zx[c]+1
IF zx[c]=px AND zy[c]=py ;//collision player
pe=pe-1
PLAYSOUND (9,0,1)
zx[c]=zx[c]-1
ENDIF
IF m[zx[c]][zy[c]]<>0 //limite
zx[c]=zx[c]-1
ENDIF
ENDIF
IF zx[c]>px AND zd<3
zx[c]=zx[c]-1
IF zx[c]=px AND zy[c]=py ;//collision player
pe=pe-1
PLAYSOUND (9,0,1)
zx[c]=zx[c]+1
ENDIF
IF m[zx[c]][zy[c]]<>0 //limite
zx[c]=zx[c]+1
ENDIF
ENDIF
IF zy[c]<py AND (zd>2 AND zd<6)
zy[c]=zy[c]+1
IF zx[c]=px AND zy[c]=py ;//collision player
pe=pe-1
PLAYSOUND (9,0,1)
zy[c]=zy[c]-1
ENDIF
IF m[zx[c]][zy[c]]<>0 //limite
zy[c]=zy[c]-1
ENDIF
ENDIF
IF zy[c]>py AND (zd>2 AND zd<6)
zy[c]=zy[c]-1
IF zx[c]=px AND zy[c]=py ;//collision player
pe=pe-1
PLAYSOUND (9,0,1)
zy[c]=zy[c]+1
ENDIF
IF m[zx[c]][zy[c]]<>0 //limite
zy[c]=zy[c]+1
ENDIF
ENDIF
ENDIF
ENDIF
IF zx[c]<>0 AND zy[c]<>0 THEN m[zx[c]][zy[c]]=8 //update map zombie data
SLEEP 5 //delay falso thinking
NEXT
//--- FINISH zomie ROUND
IF tr=2
tr=0
rd=0
kc=0
ENDIF
ENDIF
//--- ZUMBI END---------------------------------------------------------------------------------

IF KEY(59)=1 // turn debug on/off
db=db+1
IF db=3 THEN db=0
kc=0
SLEEP 200
ENDIF


//--- DISPLAY
IF db=1
FOR d=0 TO 31 // DRAW MAP / TABULEIRO debug 1
FOR c=0 TO 31
SETFONT 1
IF c=px AND d=py
PRINT "2",px*14,py*14
ELSE
PRINT m[c][d],c*14,d*14
ENDIF
NEXT
NEXT
PRINT "2",px*14,py*14
ENDIF
IF db=0
FOR d=0 TO 31 // DRAW MAP / TABULEIRO debug 0
FOR c=0 TO 31
SETFONT 1
IF m[c][d]=0 THEN PRINT ".",c*14,d*14
IF m[c][d]=1 THEN PRINT "X",c*14,d*14
IF m[c][d]=3 THEN PRINT ",",c*14,d*14
IF m[c][d]=4 THEN PRINT "T",c*14,d*14
IF m[c][d]=8 THEN PRINT "z",c*14,d*14
PRINT "@",px*14,py*14
NEXT
NEXT
ENDIF
IF db=2
FOR d=0 TO 31 // DRAW MAP / TABULEIRO debug 0
FOR c=0 TO 31
SETFONT 2
IF m[c][d]=0 THEN PRINT ".",c*10,d*14
IF m[c][d]=1 THEN PRINT "X",c*10,d*14
IF m[c][d]=3 THEN PRINT ",",c*10,d*14
IF m[c][d]=4 THEN PRINT "T",c*10,d*14
IF m[c][d]=8 THEN PRINT "z",c*10,d*14
PRINT "@",px*10,py*14
NEXT
NEXT
ENDIF

//debug info
SETFONT 1
PRINT "PLAYER",476,0
PRINT "PX = "+px,476,28
PRINT "PY = "+py,476,42
PRINT "PE = "+pe,476,56
PRINT "PB = "+pb,476,70
PRINT "S  = "+s,476,98
PRINT "BX = "+bx,476,112
PRINT "BY = "+by,476,126

PRINT "SYSTEM",588,0
PRINT "RD = "+rd,588,28
PRINT "TR = "+tr,588,42
PRINT "TC = "+tc,588,56
PRINT "DB = "+db,588,70
PRINT "KC = "+kc,588,84



//--- END GAME / DEAD / VICTORY
IF m[px][py]=3 // exit VICTORY
IF tc=0
PRINT "CLASSE A! VOCE ROUBOU E FUGIU DE BOA! PARABENS",14,476
PLAYSOUND (2,0,1)
SHOWSCREEN
SLEEP 1000
KEYWAIT
END
ENDIF
ENDIF
IF pe<=0 // exit DEAD
PRINT "DANCOU!",196,476
PLAYSOUND (10,0,1)
SHOWSCREEN
SLEEP 1000
KEYWAIT
END
ENDIF

SHOWSCREEN

WEND
// MAINLOOP--------------------------[end]



// MAP DATA
STARTDATA MAPA1:

DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1
DATA 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1
DATA 1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
DATA 1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1
DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1

ENDDATA
« Last Edit: 2014-Nov-19 by erico »

Offline MrPlow

  • Prof. Inline
  • *****
  • Posts: 1715
    • View Profile
Re: The Case of Joseph Curwen
« Reply #8 on: 2014-Nov-19 »
If you think that's messy - you should see my code!
lol!

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4310
    • View Profile
    • Portfolio
Re: The Case of Joseph Curwen
« Reply #9 on: 2014-Nov-19 »
hehe, still, it is a lot of fun to do stuff this way, feels like being at the edge of at totally loose code control.
Bugs can be really hard to spot, you get tempted into hacking a solution that makes it even harder further down the road.

For example, on the game, the zombies move in a certain ´speed´ dictated by a SLEEP 15 command.
For some unknown cosmic reason, after you collect a tomb or shoot, they more then double that speed for the rest of the game execution.

I can´t figure why, I think there may be some sort of bug with the SLEEP command called so many times inside loops of for next.
I can´t be sure, I would have to make a snipet to confirm this.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4158
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: The Case of Joseph Curwen
« Reply #10 on: 2014-Nov-19 »
Do you not use FUNCTIONs or TYPEs erico? They can make your code much easier to read and debug.
I came. I saw. I played.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4310
    • View Profile
    • Portfolio
Re: The Case of Joseph Curwen
« Reply #11 on: 2014-Nov-19 »
While I now understand their concept, I need a calm project to practice them and gain confidence on their use. :good:

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 311
    • View Profile
Re: The Case of Joseph Curwen
« Reply #12 on: 2014-Nov-19 »
Do you not use FUNCTIONs or TYPEs erico? They can make your code much easier to read and debug.

I second that!

Thats a good start for a rogue like, altough I wasn´t able to get any T  :'(
I first needed to get used to the 4 turns in a row system and the gun triggering.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4310
    • View Profile
    • Portfolio
Re: The Case of Joseph Curwen
« Reply #13 on: 2014-Nov-20 »
Prime idea is that this will be more like x-com, like a tatics game. (finalfantasy tatics, ogre battle).
I guess I used the term rogue in a wrong way here.

Thank you all for giving a go. :)

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4158
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: The Case of Joseph Curwen
« Reply #14 on: 2014-Nov-20 »
TBS - Turn Based Strategy is a particular fave genre of mine, so looking forward to seeing more :)
I came. I saw. I played.