Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Group Sprite Loading with Positions Setting

Author
Message
Goply
16
Years of Service
User Offline
Joined: 16th Jan 2008
Location:
Posted: 28th Jan 2008 06:34 Edited at: 28th Jan 2008 07:49
Ok here is what I'm trying to do, I have a group of 5x5 ships (Dark Invanders playing with the code) they are moving from one side of the screen to the other and I have disabled a lot of the game, anyway I am trying to replace the Y position on the group of ships to have them at the bottom of my screen and the code currently shares the same area for performing these 2 tasks...
The Y rows of ships and the Y position that the group is set at.
So what I need to do is somehow get them both working at the same time.
This is what I have so far.
"" "" = ""Highlights the area of code that is shared""
Code below allows 5x5 group to be displayed at (0,0)

Ok now if I take that "" "" area and change the ""dbSpriteY ( iSprite ) "" to "" 600 "" without the "" in code of course...
We get this code below which allows a row of 5 ships at (0,600) and we lose the 4 rows that are suppose to be drawn below the first row.

I am thinking that I need to try to draw the group of ships first and then position them on the screen second and get the two groups of code away from each other.
So I'm basicly stuck atm on trying to code both of those things. If anyone could help that would be apprisheated.
Thanks Goply.
Profit
18
Years of Service
User Offline
Joined: 19th Feb 2006
Location: United States
Posted: 29th Jan 2008 03:43 Edited at: 29th Jan 2008 03:46
You can try something like this:

Did I understand your problem correctly?


Thanks BiggAdd!
common people are walking in line.

Login to post a reply

Server time is: 2024-05-17 08:21:20
Your offset time is: 2024-05-17 08:21:20