Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411283 Posts in 69325 Topics- by 58380 Members - Latest Member: bob1029

March 29, 2024, 12:59:57 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)TutorialsRequest a Tutorial
Pages: 1 ... 22 23 [24] 25 26 27
Print
Author Topic: Request a Tutorial  (Read 182021 times)
kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #460 on: November 28, 2012, 10:47:50 AM »

I'd like to know just how do you make slopes in a platformer game (I use Java BTW). Almost no one seems to know how to do it, and the few members of the "in" crowd that do are cryptic about it whenever anyone asks them. Also, yes, Google got me nothing...

Why not just try and implement it yourself?
Slopes shouldn't be that hard.

Step 1.

Check if:
playerX+playerWidth > slopeX AND playerX < slopeX+slopeWidth

Step 2. (Continue of previous statement was true)

Check if:
playerY+playerHeight >= slopeY AND playerY < slopeY+slopeHeight

Step 3. (Continue of previous statement was true)

Set playerY position to:
playerX-slopeX+slopeY-playerHeight



Should do the trick, since you can use linear function here, where x = y, which makes a perfect slope. (which basically is a square divided by two)
The given example is for slope facing like that: /
To make it work for \ slope, change this:

Quote
Set playerY position to:
playerX-slopeX+slopeY-playerHeight

into this:

Quote
Set playerY position to:
slopeX-playerX+slopeY-playerHeight


Should work.


Or did you mean slopes with different angle than 45 degrees aswell?
Logged

moi
Level 10
*****


DILF SANTA


View Profile WWW
« Reply #461 on: November 28, 2012, 11:24:22 AM »

it's a linear function, very simple, just store some values somewhere in the tile (ystart,proportion of climb) and adjust the player Y position constantly.
You might have to code a bit of stuff to prevent the player from falling through the slope though
Logged

subsystems   subsystems   subsystems
Tuba
Level 10
*****



View Profile WWW
« Reply #462 on: November 29, 2012, 09:14:04 AM »

A Database for games tutorial.

I'm used to making single player offline games and suddenly I had to make a social facebook game for a job. "Should be easy I thought", but it turned out to be a lot more complex than I first though. Everyday I notice that I missed some small detail and that the way I organized my tables is not the best one.

I'm sure there are other people used only to programing offline games passing through similar problems in this day and age where everything must be connected. Sad
Logged

rottendevice
Level 0
**


View Profile
« Reply #463 on: November 30, 2012, 10:41:24 AM »

Hello.

I'd like to request a tutorial for handling multiple animations in a 2D sprite-based game.

Specifically, like having a character with a standing animation, then a standing-to-walking animation, then a walking animation. An example of this is in Castlevania: Dawn of Sorrow (at that specific timestamp).
Logged
Impossible Realms
Level 2
**

Lurks in Pre-Alpha


View Profile
« Reply #464 on: December 03, 2012, 04:48:49 PM »

I'd like to know just how do you make slopes in a platformer game (I use Java BTW). Almost no one seems to know how to do it, and the few members of the "in" crowd that do are cryptic about it whenever anyone asks them. Also, yes, Google got me nothing...

Why not just try and implement it yourself?
Slopes shouldn't be that hard.

Step 1.

Check if:
playerX+playerWidth > slopeX AND playerX < slopeX+slopeWidth

Step 2. (Continue of previous statement was true)

Check if:
playerY+playerHeight >= slopeY AND playerY < slopeY+slopeHeight

Step 3. (Continue of previous statement was true)

Set playerY position to:
playerX-slopeX+slopeY-playerHeight



Should do the trick, since you can use linear function here, where x = y, which makes a perfect slope. (which basically is a square divided by two)
The given example is for slope facing like that: /
To make it work for \ slope, change this:

Quote
Set playerY position to:
playerX-slopeX+slopeY-playerHeight

into this:

Quote
Set playerY position to:
slopeX-playerX+slopeY-playerHeight


Should work.


Or did you mean slopes with different angle than 45 degrees aswell?

That actually didn't seem to work properly. Sometimes the player passes through the slopes, and when the player doesn't, the vertical movement is really jerky, moving up an entire tile at a time. Do you think that my tiles extending the rectangle class has something to do with it?
Logged
SolarLune
Level 10
*****


It's been eons


View Profile WWW
« Reply #465 on: December 03, 2012, 05:04:43 PM »

Hello.

I'd like to request a tutorial for handling multiple animations in a 2D sprite-based game.

Specifically, like having a character with a standing animation, then a standing-to-walking animation, then a walking animation. An example of this is in Castlevania: Dawn of Sorrow (at that specific timestamp).

It depends on what language you're using, but generally, you would create a dictionary, or similarly-styled datatype that would consist of, at least, a list or array of frames, and access them via the name of the animation, like:

Code:

self.animdict = {
    'walk':[0, 0, 1, 2, 3],
    'stand':[1, 0, 1, 2, 3],
}

self.currentanim = 'walk'

Logged

Fosterocalypse
Level 0
**


View Profile
« Reply #466 on: December 07, 2012, 07:06:54 PM »

I'd like a tutorial on general basics or best practices for artwork for video games. I know this is a very broad way of asking the question so I'll give some background on my scenario because I know i can't be the only programmer that has thought this or hit this wall.
I've been designing a side scrolling adventure/arcade style game using XNA & C#. I was going to contract some comic book artists to do the artwork but i'm not sure what to tell them besides I want the files saved in *.png format.
So my best practices 101 list would include
- Backgrounds (size) # of pixels x # of pixels etc
- Sprites (size) # of pixels x # of pixels etc
- Scanning hand drawn stuff and converting it to usable assets (animations, background, etc)

and so on.

And if there is already a thread on this I would greatly appreciate a point in the right direction or recommendation. I've already a few that have answered some of my questions but i still feel like i'm stuck here. It's one thing to do tutorials/walkthroughs using someone else's assets they've created but my next logical step is creating and using my own.

thanks and cheers its friday  Toast Right
Logged
Impossible Realms
Level 2
**

Lurks in Pre-Alpha


View Profile
« Reply #467 on: December 11, 2012, 08:22:16 PM »

Hi, I figured out 45 degree angle slopes, but now I can't figure out other slopes. I know I have to move the x more than the y or vise versa (what I'm trying right now is to move one pixel y for every 2 x), but I can't for the life of me figure out what formula I should use to do this.

The one I use for the 45 degree angles is as follows:
tiley=slopex-x+slopey;
Logged
antoniodamala
Guest
« Reply #468 on: December 15, 2012, 06:15:56 AM »

(By code or drag & drop)In Game maker: How to pickup itens and put them in a limited inventory? How to make you change an item in the map by one of your inventory? how to use a item in something and have a result?

Sorry, i'm quite a newb in GM. Thanks in advance.  Coffee
Logged
Impossible Realms
Level 2
**

Lurks in Pre-Alpha


View Profile
« Reply #469 on: December 28, 2012, 05:01:27 PM »

Anyone know a tutorial for making Android games, preferably with specifics for different screen sizes and technical limits to watch out for(I already know the base of Android, I just need help with getting what I code in Java ported to android...)? I have a game I made not too long ago that I'd like to port to mobile and expand.

Also, how do I create my music files where I can have certain instruments turn on or off depending on the state of the game, like in NSMBWii or M&L BiS? (I'm writing some music right now that has this sort of gimmick...)

Also, @antoniodamala I'm a little rusty with Game Maker, considering I haven't used it in over a year, but I might be able to help you. What version of Game Maker are you using, and how are you currently doing your inventory?
Logged
SolarLune
Level 10
*****


It's been eons


View Profile WWW
« Reply #470 on: January 18, 2013, 07:12:01 AM »


Also, how do I create my music files where I can have certain instruments turn on or off depending on the state of the game, like in NSMBWii or M&L BiS? (I'm writing some music right now that has this sort of gimmick...)


I would think that you would just make a song complete, then split it up into separate tracks. Play them all at the same time, but mute the ones you don't need, and then bring them up when you need them.
Logged

Armageddon
Level 6
*



View Profile
« Reply #471 on: January 27, 2013, 01:24:51 AM »

A Unity Top-Down/Isometric Point-'n-Click tutorial. Hold left click to continue walking towards mouse, click left mouse once and it will trace where the cursor is in the world and spawn a particle/animated-model on the world and tilt it if it's on terrain. Needs pathfinding probably and could also be useful as a starting point for making a Point and Click adventure game. And the camera should be able to rotate around thee player but can't look up or down, and can zoom in. Crazy

Also making your own player entity and parenting the camera to him, since the Unity default ones are bad and bloated.
Logged

AAaAaAah
Level 0
**



View Profile
« Reply #472 on: January 28, 2013, 06:30:54 AM »

Anyone know of any in depth 2d platformers in flash?
Logged
Indiana-Jonas
Level 0
***



View Profile WWW
« Reply #473 on: February 28, 2013, 07:23:28 AM »

I would like a tutorial on how to make a player object cling to an in GameMaker. (like in Spelunky)
I looked into the source-code but couldn't really figure it out.
Logged

Ant
Guest
« Reply #474 on: February 28, 2013, 07:44:38 AM »

Are you talking about ledge grabbing? It's pretty simple, check to see if the player is pressing the grab button, then use something like place_meeting or collision rectangle to first check to see if the player is next to a wall and that there is no wall above that to see if there's a gap, for example:

Code:
if place_meeting(x-1,y,Wall) and !place_meeting(x-1,y-20,Wall)
Logged
Indiana-Jonas
Level 0
***



View Profile WWW
« Reply #475 on: February 28, 2013, 08:49:59 AM »

Are you talking about ledge grabbing? It's pretty simple, check to see if the player is pressing the grab button, then use something like place_meeting or collision rectangle to first check to see if the player is next to a wall and that there is no wall above that to see if there's a gap, for example:

Code:
if place_meeting(x-1,y,Wall) and !place_meeting(x-1,y-20,Wall)

Hm..

I think I get it, still a tutorial would be nice though. Seeing a collection of example codes like HP, jump, duck, shoot actions for platform games would be real handy. Like novice level.
Logged

Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #476 on: March 04, 2013, 12:09:08 PM »

How to stitch together sprites in GML to build a single sprite. For example, legs and torso of a person being separate sprite because the torso does multiple animations such as shooting, reloading, and the legs need to just be runnin' legs.
Logged

Whiteclaws
Level 10
*****


#include <funny.h>


View Profile
« Reply #477 on: April 06, 2013, 05:31:14 PM »

How can I make pancakes ( I burned my house last time I tried ... )
Logged
Rat Casket
Level 10
*****


i can do what i want


View Profile WWW
« Reply #478 on: April 06, 2013, 05:39:00 PM »

How can I make pancakes ( I burned my house last time I tried ... )

Lower heat, lightly oil the pan, and flip them when they start to bubble a little bit. Should be about 30 seconds or so. If they don't bubble within 30ish seconds then turn your heat up sightly.
Logged

Whiteclaws
Level 10
*****


#include <funny.h>


View Profile
« Reply #479 on: April 06, 2013, 05:43:04 PM »

How can I make pancakes ( I burned my house last time I tried ... )

Lower heat, lightly oil the pan, and flip them when they start to bubble a little bit. Should be about 30 seconds or so. If they don't bubble within 30ish seconds then turn your heat up sightly.

A pic of the expected result ?

I tried you methods and mines are a bit "flambées"

P.S: Burned my house another time , tho ...
Logged
Pages: 1 ... 22 23 [24] 25 26 27
Print
Jump to:  

Theme orange-lt created by panic