You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#11
Re: Castle of Doom
Posted on: 2010/3/28 21:51
PVB Elite
Joined 2008/12/28
Slovenia
633 Posts
Highscore Top ScoreHighscore Top ScoreCoderContributor10+ Game RatingsLong Time User (10 Years) App CoderPVBCC 2010 EntryPVBCC 2013 Entry
The correct way would be (I believe) to another while() loop around the existing one like this:


while(1) {
while(
1)
  {
  
// your code here
  // once the character enters a door:
  
break;
  }
level++;
}
Top

#12
Re: Castle of Doom
Posted on: 2010/3/28 23:56
PVB Elite
Joined 2008/4/26
USA
937 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I had to make some more changes to the code because I added an enemy, and apparently it doesn't like it when I add another world, the previous code goes berzerk and so I have to modify it. I think I'm done with worlds for now, and the game has three rooms now, with an enemy on level 3, and if you'll look at my code, there is not one single goto.

Attach file:


vb cd.VB Size: 256.00 KB; Hits: 125
c cd.c Size: 5.99 KB; Hits: 150
Top

#13
Re: Castle of Doom
Posted on: 2010/3/30 2:53
PVB Elite
Joined 2008/4/26
USA
937 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
OK, since I added another enemy in room 4, the code I had for enemy collision wasn't working, so now I need to come up with a new one. What is a good way to have collision detection?

Attach file:


c cd.c Size: 8.04 KB; Hits: 153
vb cd.VB Size: 256.00 KB; Hits: 134
Top

#14
Re: Castle of Doom
Posted on: 2010/3/31 0:10
PVB Elite
Joined 2008/4/26
USA
937 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I think everything is fixed. If not, please tell me.

Attach file:


vb cd.VB Size: 256.00 KB; Hits: 125
c cd.c Size: 8.52 KB; Hits: 150
Top

#15
Re: Castle of Doom
Posted on: 2010/3/31 22:28
PVB Elite
Joined 2008/12/28
Slovenia
633 Posts
Highscore Top ScoreHighscore Top ScoreCoderContributor10+ Game RatingsLong Time User (10 Years) App CoderPVBCC 2010 EntryPVBCC 2013 Entry
Looks great. But the collision detection against walls moves you far too away from the wall.

BTW, is the gravity code based on my code? Just askin'.
Top

#16
Re: Castle of Doom
Posted on: 2010/3/31 22:52
PVB Elite
Joined 2008/4/26
USA
937 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
No, I programmed that part myself. It's basically what I use in batari Basic (an Atari 2600 programming language) for jumps when I have a character like Mario that needs to.
Top

#17
Re: Castle of Doom
Posted on: 2010/4/2 5:47
PVB Elite
Joined 2008/4/26
USA
937 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
Added another room (room 5). You start at room 4.

Attach file:


vb cd.VB Size: 256.00 KB; Hits: 123
c cd.c Size: 8.77 KB; Hits: 168
Top

#18
Re: Castle of Doom
Posted on: 2010/4/14 8:01
PVB Elite
Joined 2008/4/26
USA
937 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
OK, I'm having trouble again. What I'm doing in room 8 is having an elevator go up and down. I'm doing this by taking the world and creating a new one, moving it ahead by 328 pixels, creating a ledge that moves up and down at the right side of the screen. The only trouble is, the guy doesn't recognize the ledge and keeps falling even though he's reached the bottom of the moving ledge. How do I make the code recognize the guy is on the ledge so he can stop falling?

Attach file:


vb cd.VB Size: 256.00 KB; Hits: 119
c cd.c Size: 10.00 KB; Hits: 152
Top

#19
Re: Castle of Doom
Posted on: 2010/4/27 7:53
PVB Elite
Joined 2008/4/26
USA
937 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (11 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I ditched the elevator in room 8 because I couldn't get it working. So here's the latest ROM.

Attach file:


vb cd.VB Size: 256.00 KB; Hits: 132
c cd.c Size: 9.77 KB; Hits: 155
Top

#20
Re: Castle of Doom
Posted on: 2010/4/27 14:24
VUE(xpert)
Joined 2010/2/15
Netherlands
250 Posts
Long Time User (9 Years)
I think you definitely need to work on the movement and jumping.

I mean, the character jumps ONLY, and very slowly, when you hold the jump button. It should much rather just start jumping a certain fixed height, then slowly fall back down. You know, jumping physics. Even if you don't do the whole gravity thing, you could still make sure there's some sort of variable that remembers how long you've been jumping, to set a minimum jumping height.

Then, the jumping stops when you touch a wall. He falls back down. This should probably be fixed, too.

Also, the movement speed of your character is constant, so why bounce him back as heavily as you do in the game? You should be able to know exactly how many pixels your character is going to move to the left or right. So take preemptive measures and do a "will he be stuck inside the wall next frame?" check to decide whether he should move into that direction at all.


Movement is VERY important in platformers as a bad movement system will have the player fighting against the controls instead of the game designer's intended challenges. And that will make them stop playing much sooner than you want them to.


Note that I'm not an expert in VB coding, but I DO have a lot of experience trying to make a proper platform system that works as I want it to (and without bugs/stuttering movement). I wish you much luck getting the platforming system to work right. :)
Top

 Top   Previous Topic   Next Topic


Register To Post