Author Topic: An old wild west roguelike? Ideas.  (Read 65585 times)

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 805
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: An old wild west roguelike? Ideas.
« Reply #30 on: November 26, 2013, 09:04:42 AM »
That's weird. So, if I understand correctly: Your own script is sitting in the same directory as libtcodpy.py, and contains the line: "import libtcodpy as libtcod". Then, when you try to execute your script you get an error like:
Code: [Select]
Traceback (most recent call last):
  File "foo.py", line 1, in <module>
    import libtcodpy as libtcod
ImportError: No module named libtcodpy

If that's the case, I've no clue what may be causing it. Just to be sure, I tried to follow the first few steps of the tutorial, and here is what I get (on Linux, using ls and cat to display the contents of the folder and the file respectively):
Code: [Select]
simen@coupdepoudre:~/data/rl/libtcod-1.5.2/test$ ls
bla.py  libtcodpy.py  libtcod.so
simen@coupdepoudre:~/data/rl/libtcod-1.5.2/test$ cat bla.py
import libtcodpy as libtcod
print "Hello world."
simen@coupdepoudre:~/data/rl/libtcod-1.5.2/test$ python bla.py
Hello world.
simen@coupdepoudre:~/data/rl/libtcod-1.5.2/test$

As always,
Minotauros
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

Quendus

  • Rogueliker
  • ***
  • Posts: 447
  • Karma: +0/-0
  • $@ \in \{1,W\} \times \{1,H\}$
    • View Profile
    • Klein Roguelikes
Re: An old wild west roguelike? Ideas.
« Reply #31 on: November 26, 2013, 12:58:06 PM »
Greyling didn't run the script in the folder containing libtcodpy.py, but rather started the python executable in the python executable directory (where libtcodpy.py can't be found).

Gr3yling

  • Rogueliker
  • ***
  • Posts: 168
  • Karma: +0/-0
    • View Profile
    • Email
Re: An old wild west roguelike? Ideas.
« Reply #32 on: November 26, 2013, 06:41:41 PM »
Greyling didn't run the script in the folder containing libtcodpy.py, but rather started the python executable in the python executable directory (where libtcodpy.py can't be found).

So, I'm still confused.  What should I have done?

I am still working on learning the python language in the tutorial that I mentioned earlier, but it's not going to cover things like this, is it?  Is there a resource that has beginner level information about this kind of stuff?  Like, what scripts are, and how to use them, that sort of thing?

CrowdedTrousers

  • Newcomer
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: An old wild west roguelike? Ideas.
« Reply #33 on: November 26, 2013, 09:02:05 PM »
So the tutorial is set up for creating a projects folder in which you create a new file called myroguelike.py (or similar). Then in this folder you also add the following files from the libtcod directory, (direct snippet from the RL tute)

Code: [Select]
Now to create your project's folder. Create an empty file with a name of your choice, like firstrl.py. The easiest way to use libtcod is to copy the following files to your project's folder:

    libtcodpy.py
    libtcod-mingw.dll on Windows, libtcod.so on Linux
    SDL.dll on Windows, SDLlib.so on Linux
    A font from the fonts folder. We chose arial10x10.png.

I think the libtcodpy files are not visible from the CLI compiler you're typing that first command in. I think they could be if you copied those files into the Python27 directory, but they're not that useful there either.

So I suggest: create your project folder (under the python27 directory, mine is Python27\Projects\firstrl.py) copy those files and then start your .py file with the import statement. That works for me anyway!

As a side note the python CLI run-time is great for quickly testing (non-libtcodpy) commands to see what effect/value they produce.

Good luck
« Last Edit: November 26, 2013, 09:40:29 PM by CrowdedTrousers »

Gr3yling

  • Rogueliker
  • ***
  • Posts: 168
  • Karma: +0/-0
    • View Profile
    • Email
Re: An old wild west roguelike? Ideas.
« Reply #34 on: November 26, 2013, 11:22:37 PM »
At the very end of the python tutorial I'm using there's a section on file input/output.  I guess I just need to study it so that I can understand the types of things I'm asking questions about.  Thanks for all your help, though.

AgingMinotaur

  • Rogueliker
  • ***
  • Posts: 805
  • Karma: +2/-0
  • Original Discriminating Buffalo Man
    • View Profile
    • Land of Strangers
Re: An old wild west roguelike? Ideas.
« Reply #35 on: November 28, 2013, 10:15:12 AM »
You might have a look at this tutorial, which seems to cover the basics pretty thoroughly.

As CrowderTrousers said, the CLI (that you get from just typing "python" (or what the executable may be called) in a terminal) is good for quick experiments. But you should save your script as a text file, which you can then execute with "python \path\to\file.py". If a copy of the libtcodpy module is located in the same directory as your script, it should be imported normally. Hope that helps.

As always,
Minotauros
This matir, as laborintus, Dedalus hous, hath many halkes and hurnes ... wyndynges and wrynkelynges.

Gr3yling

  • Rogueliker
  • ***
  • Posts: 168
  • Karma: +0/-0
    • View Profile
    • Email
Re: An old wild west roguelike? Ideas.
« Reply #36 on: November 29, 2013, 12:38:42 AM »
You might have a look at this tutorial, which seems to cover the basics pretty thoroughly.

As CrowderTrousers said, the CLI (that you get from just typing "python" (or what the executable may be called) in a terminal) is good for quick experiments. But you should save your script as a text file, which you can then execute with "python \path\to\file.py". If a copy of the libtcodpy module is located in the same directory as your script, it should be imported normally. Hope that helps.

As always,
Minotauros

Thanks again, AgingMinotaur.  I'll check out the link, and I'll try to apply what you are saying.

AlexPT

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: An old wild west roguelike? Ideas.
« Reply #37 on: December 15, 2013, 04:33:16 PM »
I made some sprites. (it's the first time I tried spriting, these are the first sprites I've ever done)
And I'd like to know if they look nice for a roguelike. Also, I revamped the Cowboy a little, and have two versions of sand, but I just don't know what the hell to do with that sword... no matter what I do to it, it just looks bad... :s any ideas??

http://imgur.com/a/3lIVY

Edit: I may also revamp the Colt Revolver, it's handle looks too small. xd
« Last Edit: December 15, 2013, 04:35:48 PM by AlexPT »

malignatius

  • Newcomer
  • Posts: 42
  • Karma: +0/-0
    • View Profile
    • Email
Re: An old wild west roguelike? Ideas.
« Reply #38 on: December 15, 2013, 05:35:05 PM »
They look alright :-) Me, I'd try to add a little padding to all the sprites.  That way it wont look too messy when the sprites are placed next to each other. Also, if possible, keep a consistent angle for all items in the game. Depending on what backgrounds the sprites are going to be placed upon you might consider an outline. 

Vanguard

  • Rogueliker
  • ***
  • Posts: 1112
  • Karma: +0/-0
    • View Profile
Re: An old wild west roguelike? Ideas.
« Reply #39 on: December 16, 2013, 12:17:20 PM »
Some quick tips:

Make sure you pay attention to color contrast.  Most of the the cowboy dude's sprite is a dark, unsaturated brown where it's kind of hard to make out individual lines.  Then you have his extremely bright, saturated skin that draws too much of the viewer's attention.

You can make objects appear larger or smaller through your color choices.  That's why the cowboy dude's arms look thicker than his sleeves do.

Read about anti aliasing in pixel art so you have better control over shape and color.

Try to get as much mileage out of your colors as possible.  If you can make something look good with three colors, don't add a fourth.  Make each shade you use distinct from the rest.

The best advice for learning any visual art is to look at the world around around you.  Look at the way light behaves and how light and shadow affect color.  Use real objects as references when you draw rather than than trying to intuit or remember what things look like.

E:

Here, maybe this will help:



I did a quick re-do of that sword you were working on.  The main thing you should notice about it is how I used darker pixels to smooth out the edges of the blade and make it slowly taper off near the tip.  This works because the darker pixels partially blend in with the black background, giving the appearance of a sort of half pixel.  This particular kind of anti aliasing won't work as well against a brighter background because the darker pixels will stand out rather than blend in.

It's not perfect but maybe it'll give you a better idea of what to do.
« Last Edit: December 16, 2013, 01:23:48 PM by Vanguard »

AlexPT

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: An old wild west roguelike? Ideas.
« Reply #40 on: December 16, 2013, 05:01:00 PM »
@malignatus: Thanks for the tips, however, I'm not sure what padding a sprite is. Care to explain? ^^''

@Vanguard: Thank you for the tips too! Yeah, I noticed that in the cowboy dude, and was actually pondering a darker skin tone, just never got around to it. x.x'
I'd read about AA before, guess I'll go and see images and read about it again. :)
Yes, I actually do both of those last advices. Or at least, I try. xD

That sword looks good!! I think that type of AA you did will work for atleast the UI of the game, I'm planning for it to be a dark-ish brown, I'll try to apply that type of AA with the sword I did, let's see how it turns out. :)
Btw, if you're curious, here's the sword I'm trying to "replicate": http://www.sailorinsaddle.com/media/images/product/display_897_AMERICAN_HORSE_ARTILLERY_SERGEANTS_SWORD_CA_1812_633731221135625000.jpg
(or maybe you already knew this was the sword xD)


Also, I've revamped the cowboy with a darker skin tone:

malignatius

  • Newcomer
  • Posts: 42
  • Karma: +0/-0
    • View Profile
    • Email
Re: An old wild west roguelike? Ideas.
« Reply #41 on: December 16, 2013, 08:56:02 PM »
@malignatus: Thanks for the tips, however, I'm not sure what padding a sprite is. Care to explain? ^^''

To add some margins around the sprites.

AlexPT

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: An old wild west roguelike? Ideas.
« Reply #42 on: December 16, 2013, 09:47:39 PM »
@malignatus: Thanks for the tips, however, I'm not sure what padding a sprite is. Care to explain? ^^''

To add some margins around the sprites.


Oh, I see what it is now, thanks! :)
It does like less clustered, looks kinda nice.

akeley

  • Rogueliker
  • ***
  • Posts: 348
  • Karma: +0/-0
    • View Profile
Re: An old wild west roguelike? Ideas.
« Reply #43 on: December 16, 2013, 11:05:34 PM »
Gosh, I love this horse.

AlexPT

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: An old wild west roguelike? Ideas.
« Reply #44 on: December 17, 2013, 03:08:31 PM »
Thanks, I'm glad you like it!  ;D

Any suggestions and more tips are welcome. ^^