Post new topic    
Page «  1, 2
Metal Slime
Send private message
 
 PostThu Sep 22, 2011 5:59 pm
Send private message Reply with quote
Alright!

It's great to have some graphics to work with. But first thing's first, let's prototype the script, write out what we'll need to figure out.

Here's my guess, tell me if I'm missing something:
Code:
initialize variables
load sprites
display gui
player movement
player attack
enemy behavior


Think that's a good start. To make things easier, I think we should go with slices since I noticed some great collision detection commands available for them. This will come in handy especially for attack scripting.

(your turn!!)
King Slime
Send private message
 
 PostThu Sep 22, 2011 7:25 pm
Send private message Reply with quote
Quote:
initialize variables
load sprites
display gui
player movement
player attack
enemy behavior


This seems most basic. It could work. Under player attack, various attacks would be held, being used if certain tags are on, which are triggered by equipting a weapon, like a sword, a hammer, a certain wand...
Metal Slime
Send private message
 
 PostFri Sep 23, 2011 1:38 am
Send private message Reply with quote
What size should the hero be? Something larger than 20x20. Thinking either hero or medium enemy sized.

Once you decide, guess there's no place left to go but player movement.
King Slime
Send private message
 
 PostFri Sep 23, 2011 7:27 pm
Send private message Reply with quote
No no no, the hero shall stay walkabout sized. No need to go wasting the perfectly decent sprites I made a while ago.
Metal Slime
Send private message
 
 PostMon Sep 26, 2011 6:26 pm
Send private message Reply with quote
Walkabout sized?! Are you crazy! Fine...

Just declare the variables, run it for the newgame, tell me how it feels, what you think we need to knock out next.

And if you can't get it to compile, let me know too. I believe in you!!

Code:

suspend player
suspend npcs

declare/init variables here

#set main loop:= true
while (main loop) do (

if (key is pressed(key:Up)) then( y_direction := -1 )
if (key is pressed(key:Down)) then( y_direction := 1 )
if (key is pressed(key:Left)) then( x_direction := -1 )
if (key is pressed(key:Right)) then( x_direction := 1 )

#here we calculate the speed based on input
#remember to define 'max speed' up top, maybe like 5 or 6
if (y_direction <> 0) then (
y_speed += 1 * y_direction
if (y_speed > max_speed) then (y_speed := max_speed)
)
else (
y_speed := 0
)

#do the same for x here / copy-paste

#placing the walkabout
put hero (0, hero pixel X(0) + x_speed, hero pixel Y(0) + y_speed )

wait(1)
)


(seeing as we don't need to even DEAL with slices as you're using the walkabout, grumble grumble...)
Display posts from previous:
Page «  1, 2