Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Beoran
Pages: 1 ... 5 6 [7] 8 9 ... 11

61
Pixel Art / Re: [WIP] (Nudity) Female character base 3/4 top down view
« on: September 15, 2008, 12:25:38 pm »
Yes, well, Helm, when I said "Phantasy Star 4 style" I was talking the general skill level, not the exact detail. ^_^;;; also, I hope to either evolve to a level close to what you see in the first reference image I posted, but that's probably for later.  Especially because my game will have 32x64 sprites as compared to the much smaller (16x32?) Phantasy Star 4 sprites. The reasons I want to do the sprites in 3/4 view is because this is something that kind of irks me in top down games: the walls, surroundings, plants, etc are all in 3/4 but the sprites are not. Still, I love top-down games regardless. ^_^

So here are my two main questions, and I hope they don' t sound silly to you. You say there's a good reason for going flat over 3/4 for sprites, because it increases the expressiveness of the sprite? But why is that?  I really don't see how a flat sprite is better than one with a fake perspective? Or is this for educational reasons? And I'm also wondering why you are making the head more square? I guess PS4 does it because of low resolution, but should I do the same? Does it offer better possibilities with the hair or other facial expressions?

But, I do see where you are going with the contraposito, by creating "assymmetry in a balanced" way the sprite looks more "alive" and human. I can easily see how a weapon, like a sword or spear would fit perfectly in the hand, and look as if it could be used to strike. Such a contraposito is definitely something I'd consider for the main character, as opposed to a mere base which I would use foremost for testing and for plain NPC's. By the way. I also plan to have correct assymetry for right-facing and left facing sprites, at least for how the weapon is rendered. No such nonsense like the sprite facing right and having the weapon in the right hand, and then facing left and having the weapon in the left hand. At the very least, I'll render the weapon behind the sprite when facing left in the case of a right-handed character.

Anyway, thanks, this is really interesting. ^_^

62
Pixel Art / Re: [WIP] (Nudity) Female character base 3/4 top down view
« on: September 14, 2008, 07:04:42 pm »
Well, again, I think you have a very good point there. And I thank you for wanting to help me in this way. I think I will go the middle way, that is, start out with utilitarian art, but then improve it gradually myself as I go, or perhaps with help of others if they meet my vision.

Just by hanging around in this forum, reading the advice, and looking at what others are doing, I've been improving my art skills slowly. I'm sure that they will develop more over time, although I do plan to give developing the game play itself priority.

As for how you could help me, well, as you see, I'm starting with the essentials. In conventional art lessoons, one usually begins with learning how to draw and use lines before one goes on to paint and shading. I feel it's the same for pixel art. so to start, I want to get the shape and lines right, and make it to a "Phantasy Star 4" level of artwork, before I go on to the next level.

That's why I'm not shading too much yet, nor worrying too much about what colors to use. Greatly enhanced edits like Ryona's are nice to see, and I can learn a few things from them. But I feel that I can learn more from improvements to the shape and lines like those of Lotekk. Like that, I can take it one step at the time. If you look from where I started in this thread to where I am now, you can see I've already progressed somewhat, and no doubt, with the help of all of you I will continue to improve. So, thanks to all of you. :)

63
Hey Atnas, here is an improved version of your program, it uses objects and functions. I hope it's not too difficult for you , but if it is, please tell me and I'll explain whatever part you don't understand. As you should understand, now, you can add easily more phases to the game.

Code: [Select]
#
# Improved version Latin game, using classes and object too. 
#

class Player
  attr_accessor :health
  attr_accessor :maxhealth
  attr_accessor :level
  attr_accessor :strength
end 

class Phase
  attr_accessor :text
  attr_accessor :question
  attr_accessor :first
  attr_accessor :second
  attr_accessor :correct
  attr_accessor :correcttext
  attr_accessor :levelup
  attr_accessor :damage
  attr_accessor :damagetext
end

def choice(question,first, second) 
  puts question
  # show question and ask one time.
  puts first + " (1), " + second + " (2)." 
  line    = gets
  answer  = line.to_i
  # keep asking if it's not 1 or 2
  while answer !=  1 and answer != 2
    puts "Please type 1 or 2 only, followed by an enter."
    puts first + " (1), " + second + " (2)." 
    line    = gets
    answer  = line.to_i
  end
  return answer
end

# Damage the player if he gives a wrong answer
def player_damage(player, damage, message) 
  puts message
  player.health -= damage
  if damage > 0
    puts "You suffered #{damage} points of damage."
    puts "Curent health: #{player.health} / #{player.maxhealth} ."
  end
  if player .health < 0
    puts "Oh my, looks like you didn't survive that one!"
    return false
  end
    return true
end

# Level up the player if he gives a right answer
def player_levelup(player)
  puts 'You gained a level! Your strength increases by 1!'
  player.strength += 1
  puts "Current Strength: #{player.strength}"
end

# Play one phase
def phase_play(phase, player)
  while (player.health > 0)
    puts phase.text
    answer    =   choice(phase.question, phase.first, phase.second)
    if answer ==  phase.correct   
      puts phase.correcttext     
      # Show text for correct answer
      # Correct answer, level up player if wwe have to
      if phase.levelup 
        player_levelup(player)
      end 
      return true
    end
    player_damage(player, phase.damage, phase.damagetext)
  end 
  return false
end

# Plays all phases
def phase_playall(player, phases)
  for phase in phases do
    alive = phase_play(phase, player)
    if not alive
      return false
    end
  end   
  return true
end

# Initialize player object
player            = Player.new
player.health     = 5
player.maxhealth  = 5
player.strength   = 1
# Initialize game object


phase1             = Phase.new
phase1.text        = "You climb into the dungeon."
phase1.question    = "It is dark. Light your torch?"
phase1.first       = 'Yes'
phase1.second      = 'No'
phase1.correct     = 1
phase1.correcttext = "You can see the passage continues, but you cannot see the end."
phase1.damagetext  = "You are attacked by hungy a grue!"
phase1.damage      = 5
phase1.levelup     = false


phase2             = Phase.new
phase2.text        = ""
phase2.question    = "Will you go forward?"
phase2.first       = 'Yes'
phase2.second      = 'No'
phase2.correct     = 1
phase2.correcttext = "You find yourself face to face with a sphinx.\nHe will eat you if you do not answer him correctly."
phase2.damagetext  = "What, you want to keep standing here forever?"
phase2.damage      = 0
phase2.levelup     = false

phase3             = Phase.new
phase3.text        = "Rawr, rawr! I am a sphinx!"
phase3.question    = "What is the object of the preposition in this sentence?\nTiti ex Roma.\n"
phase3.first       = 'Titi'
phase3.second      = 'Roma'
phase3.correct     = 1
phase3.correcttext = "You attack the sphinx! \n He mews miserably as his entrails leak from his shuddering carcass."
phase3.damagetext  = "No, you idiot! Sphinx attacks you, knocking you back in the process!\nYou land with a thud!!!"
phase3.damage      = 2
phase3.levelup     = true



phase4             = Phase.new
phase4.text        = "The passage continues. You reach another sphinx.\n"
phase4.question    = "What are the genetive case feminine endings?\n"
phase4.first       = "am, as"
phase4.second      = "ae, arum"
phase4.correct     = 2
phase4.correcttext = "You attack the sphinx! \n He mews miserably as his entrails leak from his shuddering carcass."
phase4.damagetext  = "No, you idiot! Sphinx attacks you, knocking you back in the process!\nYou land with a thud!!!"
phase4.damage      = 2
phase4.levelup     = true


puts "Latin text adventure (press enter to continue)\n"
gets

phases = [ phase1, phase2, phase3, phase4 ]

won = phase_playall(player, phases)
if won
  puts "Congratulations, you won the game!"
else
  puts "Game Over!"
end

64
Well, finally, here it is, the next installment with the beginning of Classes.

Code: [Select]
require 'rubygems'
require 'sdl'
# Load the libraries we need.

# We make a new type of object, or a class, that will be used to
# group all information about the player together
class Player
  attr_accessor :x # the player has an x position
  attr_accessor :y # the player has a y position
  attr_accessor :w # the player has a width
  attr_accessor :h # the player has a height 
  attr_accessor :vx # the player has a horizontal speed
  attr_accessor :vy # the player has a vertical speed
  attr_accessor :color # the player has a color
end

# We make a new type of object, or a class, that will be used to
# group all information about the game together
class Game
  attr_accessor :screen # the game has a screen
  attr_accessor :done   # The game is done or not done.
  attr_accessor :color  # the game has a background color 
end


# We make a new type of object, or a class, that will be used to
# group all information about the grass together
class Grass
  attr_accessor :x # the grass has an x position
  attr_accessor :y # the grass has a y position
  attr_accessor :w # the grass has a width
  attr_accessor :h # the grass has a height
  attr_accessor :color # the grass has a color
end

# Define a function to handle the input
def handle_input(input, player, game)
  intype= input.class
  # Intype now contains what class, that is what kind of input we got
  if intype == SDL::Event::Quit
    # Clicked the close window icon.
    game.done = true
    # Now, it's over.
  elsif intype == SDL::Event::KeyDown
    # Someone pressed a key.
    key = input.sym
    # We get 'te "sum", that is the key sumbol for this input
    if key == SDL::Key::ESCAPE
      # If someone presses the escape key, we're also done.
      game.done = true
    elsif key == SDL::Key::LEFT
      player.vx = -1
      # Pressing left arrow key, so the player should move to the left
      # For that, we make the speed of the player negative
    elsif key == SDL::Key::RIGHT
      player.vx = 1
      # Pressing right arrow key, so the player should move to the right
      # For that, we make the speed of the player positive
    end 
  elsif intype == SDL::Event::KeyUp
    # A key was released
    key = input.sym
    # Get what key was released
    if key == SDL::Key::LEFT
      # If the left key was released, the player should stop moving.
      player.vx = 0
    elsif key == SDL::Key::RIGHT
      # If the right key was released, the player should also stop moving.
      player.vx = 0
    end
  end 
  # Here, we don't need a result. 
end 


# A function to calculate the new player position
def update_player(player)
  player.x = player.x + player.vx
  # Set the new position of the player based upon the
  # speed of the player
end

# A procedure to draw the screen
def draw_screen(game, player, grass)
  screen = game.screen
  # Store the game screen temporarily in a variable for ease of use. 
  screen.fill_rect(0, 0, screen.w, screen.h, game.color)
  # Draw the sky on the background.
  screen.fill_rect(grass.x, grass.y, grass.w, grass.h, grass.color)
  # Draw the grassy floor
  screen.fill_rect(player.x, player.y, player.w, player.h, player.color)
  # Draw the player as a square
  screen.flip
  # And display the screen.
end


game    = Game.new
player  = Player.new
grass   = Grass.new

game.screen = SDL::Screen.open(640, 480, 0, 0)
# Open the screen, like usually, and store it in the game.
game.done   = false
# The game is not done.
game.color  = game.screen.map_rgb(0, 255, 255)
# Set the game's background color.

grass.h     = 40
grass.w     = game.screen.w
grass.x     = 0
grass.y     = game.screen.h - grass.h
grass.color = game.screen.map_rgb(0  ,255,0)
# Set the grass's attributes.

player.w      = 40
player.h      = 40
player.vx     = 0
player.x      = game.screen.w  / 2
player.y      = game.screen.h - player.h - grass.h
player.color  = game.screen.map_rgb(255,255,0)
# Set up the player's attributes.

while not game.done
# Keep doing the next lines while done is not true
  input          = SDL::Event.poll
  # We ask SDL to get the input event that is occuring
  handle_input(input, player, game)
  # Process the input in our own function
  update_player(player)
  # Update the player's position based upon the player's speed.
  draw_screen(game, player, grass)
  # Display the screen.
end
# End of the while "loop". Everything from while to this end
# will be reprated until the variable done becomes true

What is new about this? Well, remember that in the previous tutorial we had a lot of parameters that were passed from one function to another. To help with that, we make use of objects and classes to group all related data together. What's an object? Well, its a piece of data that contains different elements grouped together, and which you can access by name.  What is a class? Well, you can understand a class as being like a cookie cutter, or a template, which you can use to determine what the layout of an object created from that class will be.

So, that's why we first describe the class Player as having certain attributes. Attributes of a class or object are properties of that object in which you can store data. Basically, in ruby, there are two kinds of attributes, namely accessors, and readers. With an accessor, you can look up the data inside an object, and also change it. In Ruby, you define an acessor using attr_accessor.  With a reader, you can only look up the data and not change it. In Ruby, toy define a reader using attr_reader. So, by saying attr_accessor :color inside the Player class, we say that a player will have a color that can be changed at will.

Now, to create an object from a class, we simply use the new method of that class. Like that, a class is also acting a bit like a special kind of module. By saying player = Player.new, we create a new object that has all the attributes that we described in the class Player. Thats' why we can do things like player.vx = 0 , we are setting the x direction speed attribute of the player to zero.  Like that, th player object contains all data about the player grouped together neatly. This is a big advantage over using loose variables, since in any big program, you'll have many different variables, and it becomes quite messy when you have to keep track of them individually. With classes and objects, you can group related variables together in a neat package, keeping things more structured and  neat.

65
Pixel Art / Re: [WIP] (Nudity) Female character base 3/4 top down view
« on: September 13, 2008, 09:44:38 pm »
Well, Helm, I can see your point, and largely, I can agree with it. I think that you are right that for mass appeal, you need art with a certain charm. However, my point is mostly about strategy in planning this project.

If I was making a commercial game, I certainly would hire an artist. But that's not the case. The game will be free and open source so I have to do it differently. Basically, I have three options:
First option would be to for me spend a few more years on developing my art skills to comparable levels as yours, probably making my game a six year project. I don't think it's unrealistic to say that I need two years to make it from my level to your level, and that's probably even too optimistic.
Second option is that I find artists who are willing to work for free on such a project from the beginning. My experience in the past has been that it is not so easy to find artists willing to do this, for understandable reasons.
Finally, I can go for the utilitarian art, focus on developing compelling game play in stead, and then hope that the game will attract artists, like you people, who will hopefully be willing to help me out with improving the art.

I think I will go for this final approach, as this will result in something that is playable that much sooner. Also, I plan to make the game different enough from usual conventions. Other famous open source games like Battle for Wesnoth took the same approach, I hope this is the most viable approach.

Of course, I'm open to all and any suggestions, here. :)

66
Pixel Art / Re: [WIP] (Nudity) Female character base 3/4 top down view
« on: September 13, 2008, 04:58:13 pm »
Helm, again a lovely edit, which is way beyond me. I do agree that assymmetry is more natural and beautiful, however, it's as JJ Naas says, I'm planning to do at least 5 costumes (times 30 for all animation frames), so symmetry does make things a lot easier for me there. I'm not planning a small game but more like a 4 year project, I think. ^_^;

As for the nipples, I care about general anatomical correctness, because I plan to have some optional nude scenes in my game. Not that I want to include fan service, it's just something I don't want to exclude as a possibility. So call me European. ^_^


67
Pixel Art / Re: [WIP] (Nudity) Female character base 3/4 top down view
« on: September 13, 2008, 01:17:04 pm »
Wow, guys and girls, you're going way over my skill level there.  :P One question though, why do you all don't draw the nipples?

The problem is, this is all for sprites for the Action RPG I'm programming, and it would take me, at my current skill level, too much time to draw in the style you are using. And it's a free and open source game so I can't hire any of you guys, I'm afraid. And I'll need about 30 to 50 frames of animation for each base, and also a male base, different hair styles and clothes, etc. So I guess I have to make do with "frumpy" programmer's art. :p

Anyway, here's my last edit, not shaded and shaded, of course, where' I'm trying to take in the essence of the improvements you guys have made.



68
Atnas, I think you could also clean it up considerably by using several procedures/functions. But today I'm too lazy to fix up yours, so sorry for that. :p

69
First of all, Sorry to stall my tutorial, I wasted a week on getting the collision detection right. But I have it now, I just need to comment it and post it here if I can get off my lazy butt. :p

As for tips on ruby, there are plenty of sites; just like this one:
http://www.rubytips.org/
Found like this:
http://www.google.com/search?q=ruby+programming+tips

70
Pixel Art / Re: [WIP] (Nudity) Female character base 3/4 top down view
« on: September 10, 2008, 09:14:25 pm »


Ok, LoTekk, the head was indeed too conical, and I accepted your fix for that.

The breasts however, I think I finally found a better solution for them, using only 2 colors.  As you can see in this reference: http://www.superstock.com/stock-photos-images/1804R-2823 , actually, a woman with not too big breasts doesn't have a cleavage in the middle, but rather, the breasts spread out with mosts of the curves visible around the arms the arms, but with the nipples clearly visible.

And I shortened the legs lower to get closer to the 3/4 view I'm looking for. I also made the belly a bit tighter, for a more female effect.

And also, Quake, the sprite is finally symmetrical. I also tried to remove the middle line of pixels and compress the sprite like that, but it looked too sharp, and removed the cuteness of the character, so I solved it like you see above..

Edit: forgot image tag.

Pages: 1 ... 5 6 [7] 8 9 ... 11