Page 1 of 3

Doing a better game engine - some thoughts on ice blocks

Posted: Tue Mar 09, 2010 7:08 pm
by Sivak
Hey all. Well, I want to get back into it and do up a new game engine, but this time I want to have some more elements come into play.

The main thing I'm wondering about is some acceleration and deceleration when it comes to moving across various terrains. What I want to have would be your typical solid tile, but also ice blocks and sludge (water that's hard to move in).

For the ice, I wanted to try and copy the physics of it taking some time to get to speed while walking, but if you were to jump and land and be moving forward, you are already at speed. When you let go of the button, there'd be some deceleration as you slide forward. Again, jumping could cancel this. It seems like it'd just be having some var count to some number until it reaches a max, but the real trick would come if you turned around. On normal ground, you'd just be immediatley moving in the opposite direction with no deceleration happening. With ice, you'd slide, decelerate, then accelerate in the opposite direction. It seems like ice will need a few exceptions....

I don't know. Has anyone tried doing ice mechanics before and could tell me if I'm not seeing something that could be easier?

The sludge is another one that'll be fun, but we'll save that for later. 8)

Posted: Tue Mar 09, 2010 7:26 pm
by Banshaku
I will just think out loud but I guess other people may say the same thing.

Instead of adding a velocity factor when I go right and removing when I go left, I would always add the velocity factor. The only difference is the velocity must be positive when going right and negative when going left.

When I would be on ice, if the player change direction (from right to left), instead of resetting the velocity to 0, I would add negative velocity to the current value. This way, even though the player would be facing left, he would still be moving right for a certain amount of time.

Maybe there is some easier way. Like I said, I'm just think out loud now. That was more fun to think about that then my current task at work at the moment (shhh... don't say anybody ;))

Posted: Tue Mar 09, 2010 8:25 pm
by Dwedit
Having no acceleration is the only reason you can play Battle Kid with a keyboard.

Posted: Tue Mar 09, 2010 9:57 pm
by Robert
 

Posted: Tue Mar 09, 2010 10:50 pm
by Banshaku
Please keep on topic.

Posted: Tue Mar 09, 2010 11:11 pm
by Robert

Posted: Tue Mar 09, 2010 11:17 pm
by Banshaku
Don't worry, I was not targeting you specifically ;) It just he asked about how to program something and most message were not related to it. This is what I meant to stay on topic, which is to answer the question with the information that he's looking for.

Posted: Wed Mar 10, 2010 12:39 am
by Bregalad
Well I don't recommend anyone to answer his questions, because he'll sell products using your ideas and make money on our backs again. Just my personal recommendation tough.

Posted: Wed Mar 10, 2010 1:45 am
by Jeroen
^^Or you could help out your fellow man and stop acting like a pretentious person who can't actually complete a game of his own so takes it out on other people . (In other words if you don't have anything nice to say....don't post at all)

Posted: Wed Mar 10, 2010 1:59 am
by tokumaru
Jeroen wrote:Or you could help out your fellow man and stop acting like a prentious person who can't actually complete a game of his own so takes it out on other people
I don't think Bregalad is talking out of frustration for not completing his game, as I seem to remember he has no intention of selling it (at least not exclusively).

To some extent I think he has a point, it's like a person gives me the recipe for some cookies and then I try to sell the cookies I made back to that person. It's not right.

The situation is not exactly like that though, because Sivak has to modify the recipes quite a lot before coming up with a product, and even though it's in a sort of mercenary kind of way he's still contributing to the homebrew scene. He's helping to expand a market we all (NES developers) hope to get a piece of eventually, so while we can't come up with our own games, at least Sivak is keeping the market warm.

I guess this is how I see it, so I don't think it's so bad that he's making money out of knowledge he gets for free (I'm still not a big fan of that, but it doesn't outrage me anymore).

Posted: Wed Mar 10, 2010 2:05 am
by Jeroen
Mmmmm if this gets out of hand we might need split. Let's try not to get things too heated. Stil first of all like you said A.) Sivak has to "modify" the recipe alot. The knowledge is only a very very small part of the whole deal. It's like learning someone how to cook (use pans that kind of stuff) and then bitch if he sells cookies. B.) He HAS released games he discontinued in the past. C.) the fact that no one bitched about the same issues when bunnyboy released "glider" makes me think the only reason people are angry about this is the fact that they just wanted to play battlekid....for free.

Posted: Wed Mar 10, 2010 2:10 am
by ReaperSMS
Coming from the old school PC gamedev side of things, free info is for whatever use someone can make of it.

For ice, it's been done a number of ways. The usual NES approach has been something like what you described, where jumping could kill your forward momentum, landing while moving would keep you going with an exceedingly low deceleration, and manual acceleration (walking/running) was cat down by a hefty amount from usual amount.

Basically, for your usual platformer, the set of variables in play:

Current velocity
Max velocity
Ice walk/run acceleration
Normal walk/run acceleration
Normal decel
Ice decel
Jump walk/run acceleration

Accel affects current velocity depending on direction and ground/ice/air status.
Velocity is capped at +/- max
Net accel = cur accel +/- decel, depending on directions, etc

Posted: Wed Mar 10, 2010 2:32 am
by Robert

Posted: Wed Mar 10, 2010 2:36 am
by tokumaru
Jeroen wrote:Mmmmm if this gets out of hand we might need split. Let's try not to get things too heated.
I agree to not getting things too heated, but even then I believe a split is in order.
Stil first of all like you said A.) Sivak has to "modify" the recipe alot. The knowledge is only a very very small part of the whole deal.
Sure, I'm not taking credit away from Sivak by any means. Having started out asking questions here (and at the mailing list before that) myself I know that whatever is said here is by no means ready to be put in a game, all of it are just ideas that have to be worked on.
It's like learning someone how to cook (use pans that kind of stuff) and then bitch if he sells cookies.
It's still bad if you try to sell something to someone who gave you something for free, even if the two somethings are not directly related, because it shows a lack of gratitude (you are not being as kind to the person who helped as he/she was to you). I don't know how Sivak would get around that though, it's not like he can go through the threads looking for the people who helped him and giving them ROMs.
B.) He HAS released games he discontinued in the past.
This is a good thing. Although I don't remember him ever announcing such releases here, there are many more posts about the commercially active ones. Please correct me if there are such posts and it's just me that can't remember.
C.) the fact that no one bitched about the same issues when bunnyboy released "glider" makes me think the only reason people are angry about this is the fact that they just wanted to play battlekid....for free.
I don't know if I speak for everyone here, but IMO opinion Battle Kid is the first game in a long time to show some evolution in the level of homebrew complexity, so it's only natural that it gathers more attention than the old and overdone minigame/puzzle games.

We still have a long way to go, after all Battle Kid is still a single screen at a time game, it only happens to have a LOT of screens. =)

But yeah, I'm still not sure what to think about this whole issue. Sivak's contributions to the community are indirect. He's helping to keep the general interest in homebrew alive, but he isn't showing much gratitude to his fellow developers who helped him get to where he's now.

Like I said, this is a difficult issue. I think it's hard to say what is right or wrong here, because of the weird way the retro scene works. We're used to getting things for free, as all those awesome games from the 80's and 90's are just one click away. But when it comes to new content, it's hard for experienced people to find the time to make games, so it's only natural that they seek for a form of compensation.

I for example have had so much work the last few weeks that I couldn't touch my personal projects at all. But I have to make money in order to live, so I'll either work on other stuff and have no time for homebrewing or I'll charge for my games. That is, I must charge for my time, so if people want games from me they'll have to pay for that time, or there will be no games. It's complicated.

Posted: Wed Mar 10, 2010 2:40 am
by Jeroen
http://nintendoage.com/forum/messagevie ... adid=30325 Here's sivak talking about releasing his games. (there's a few other threads where he's done it in the past)