Jump to content
abaudrand

Lost in coding

Recommended Posts

Hi,

I'm struggling with the joystick control reader. I've opened the example 14_MoveAnimateAndFire.bas that Atarius Maximus created and the SWCHA joystick example by Robert M and decided that maybe the second one could fit for what I'm trying to get.

The plot: You are an archer who have to protect the castle from flying dragons.

For the moment, the AI of the dragon is taken from the tutorial of tinkernut but later, I wish I could randomly alternate between this behaviour and a firing missile one.

 

I wanted to make a sprite for each direction as I would like the player shoot arrow in all 9 directions but the player could only go left-right on the rampart and climb upstair to the tower if you need to escape from a low-flying dragon.

for the moment, I'm a bit lost about where i should include the code in the loop.

The V4 is the last working version and is basically the same as the tutorial of tinkernut besides the background interaction.

The V5 is the big mess where I am.

 

As I'm eager to learn what's wrong in my construction, I'll be glad if someone just give me tips to where I should go and not the final solution.

Regards.

Share this post


Link to post
Share on other sites

I'm trying to take a look at it now.

 

Two things I notice so far, not related to the problem it seems:

 

goto titre --- should say title.

 

One of your drawscreens after the DoneJoy0 is not indented and it needs to be.

 

I tried V4 and it looks cool so far, but the purple enemy on top of green background is hard to see.

Edited by yuppicide

Share this post


Link to post
Share on other sites

Okay I found your problem..

 

look through what you goto.. one of them is missing an end statement. :)

 

GoDown
player0:
%00010000
%00010000
%01111110
%10010001
%10010001
%11111111
%00010000
%00010000

goto DoneJoy0

 

Missing an end after that player0.. plus the two things I mentioned previously.

Edited by yuppicide

Share this post


Link to post
Share on other sites

Thanks Yuppicide, I'm working on it. Guess I was too tired last night to work on programming.

 

I've also put the sprite of the dragon in the wrong place and put it right after the SWCHA reading.

For the color of the dragon, I guess it's because I'm working on PAL palette and its a bright red. But anyway it's a good idea if the colour of the dragon change randomly and is sometimes difficult to see :) As I'm messy, chaos will be the co-author of the game.

 

Yesterday, I've tried the PF0 command as I thought it could continue the rampart in the border but its only a full column of colour. For the moment, I'll let the Playfield as it is.

 

I'll post the seed V6 by the end of week with (I hope) the multi-directionnal animation for the archer. Guess the arrow will give me more headache later.

 

Regards.

Share this post


Link to post
Share on other sites

Ok, fixed the multi-directionnal sprites. I think I will have to misalign a little the position up the tower as for shooting down a dragon, it will make you go back on the rampart... But it could wait for the moment.

 

I'm now scratching my head to handle the missile for a multi-directionnal shooting. I like the idea proposed by atarius maximus but the problem is that the missile is only a dot and if you stop firing, the arrow stop in the middle-air. I'm trying to work out something for the moment but I think the best thing I need is something similar to the shooting of Berzek.

 

I'll post a thread with the game's name once I'll get something playable.

 

Regards.

Share this post


Link to post
Share on other sites

Yeah that PF0 is just for a whole border on the sides. I don't know if there's anything else you can do.. maybe some custom ASM code if someone could shed some light on it.

 

I'll try your new versions when I get home tonight. I'm at work now.

 

If you're using.. oh I see in the new version you've added set tv pal already. :)

 

I had a different idea for something with a castle once, but I like your castle drawing better than mine was.

Share this post


Link to post
Share on other sites

Pretty neat so far. I like that you can go on top of the tower.

 

Need any more help just yell.. a lot of friendly people here.

Edited by yuppicide

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...