Well I have no real progress, Im having trouble with this sprite issue, Right now I have player input, and a loop which constantly updates the positions. But that isnt working because sprites dont have a command to just position them somewhere on the x y grid so if theres any plugins to fix that, then tell me, otherwise I may need to use image commands. Here is just what it looks like if you just paste my horrible temp images to the screen.
Also, If anyone wants to help
rem ----------------------|
rem |---By Darkzombies----|
rem |---Pre-Alpha-0.1-----|
rem ----------------------|
rem --------
rem | DATA |
rem --------
gosub types
wait 0500
scrwid = screen width()
scrheight = screen height()
loadimages()
UpdateEntities()
player.movespeed = 5 `Change this if you need to.
player.x = scrwid-sprite width(player.id)
player.y = scrheight-sprite height(player.id)
sync on : sync rate 50
#constant upk upkey()
#constant downk downkey()
#constant rightk rightkey()
#constant leftk leftkey()
#constant true 1
#constant false 0
#constant savedir1 "data\save01.dat"
#constant savedir2 "data\save02.dat"
#constant savedir3 "data\save03.dat"
rem ---------
rem | TYPES |
rem ---------
types:
type entity
x as integer
y as integer
anim as integer
direction as integer
att as integer `Inidividual attack/defence level
def as integer
movespeed as integer
id as integer
endtype
type terrain
x as integer
y as integer
direction as integer
anim as integer
id as integer
endtype
global player as entity
global dim knight(troops) as entity
global dim civilian(civs) as entity
return
wait key
rem -------------
rem | FUNCTIONS |
rem -------------
function easy() `Just sets up the variables for easy difficulty.
troops = 7
maxtroops = 7
civs = 7
maxcivs = 7
houses = 3
entroops = 5
maxentroops = 5
gold = 5000
seiges = 1
defences = 1
endfunction
function normal()
troops = 5
maxtroops = 5
civs = 5
maxcivs = 5
houses = 2
entroops = 6
maxentroops = 6
gold = 4000
seiges = 0
defences = 0
endfunction
function hard()
troops = 3
maxtroops = 3
civs = 3
maxcivs = 3
houses = 1
entroops = 7
maxentroops = 7
gold = 3000
seiges = 0
defences = 0
endfunction
function playerinput() `THESE WILL BE EXECUTED IN THE GAME LOOP, MAYBE A FUNCTION LOOP!
do
if upk = 1
player.direction = 0 `Face up.
repeat
player.y = player.y + player.movespeed
until upk = 0
endif
if downk = 1
player.direction = 1 `Face down.
repeat
player.y = player.y - player.movespeed
until downk = 0
endif
if rightk = 1
player.direction = 2 `Face right
repeat
player.x = player.x + player.movespeed
until rightk = 0
endif
if leftk = 1
player.direction = 3 `Face left.
repeat
player.x = player.x - player.movespeed
until leftk = 0
endif
loop
endfunction player
function loadimages()
player.id = 1
load image "media\knight.png", 1
load image "media\peasant.png", 2
load image "media\Bc.png", 3
load image "media\Bg.png", 4
load image "media\Bd.png", 5
sprite player.id, 0, 0, 1
endfunction
function UpdateEntities()
do
player.x = sprite x(player.id)
player.y = sprite y(player.id)
delete sprite player.id
sprite player.id, player.x, player.y, 1
loop
endfunction
"Insert funny coding-related joke here"