Difference between revisions of "Complete Roguelike Tutorial, using Python+libtcod, problems"

From RogueBasin
Jump to navigation Jump to search
m
m (Problem with program)
 
(6 intermediate revisions by one other user not shown)
Line 10: Line 10:
If any of the following helps you, please edit the page and add a note about what exactly your problem was.  This will allow us to fold back the information into the tutorial to make it clearer and prevent others from having the difficulties you had.
If any of the following helps you, please edit the page and add a note about what exactly your problem was.  This will allow us to fold back the information into the tutorial to make it clearer and prevent others from having the difficulties you had.


== libtcodpy cannot be found ==
Hello! I'm following the tut and finished the first section, but when i run my code the page insta-closes... i checked all the warnings you guys gave (python and libtcod both 64x, python version 2.x, etc), any toughts?


Your project directory, whatever it is called, should contain the following files:
There are no known problems.
 
<center>
[[File:Libtcodpy-directory.png]]
</center>
 
Note:
<ul>
<li>You may have chosen a different name for your tutorial code file, than <code>firstrl.py</code>.</li>
<li>The file sizes may differ from what the version of libtcod that the tutorial is based around, but if you provide a screenshot of this same information yourself, this is valuable information to give us - as it allows us to have a hint at which version of libtcod you are using.</li>
<li>The <code>savegame</code> file is generated, and you will not have that until later in the tutorial.</li>
<li>The <code>libtcodpy</code> directory is the one that comes from the libtcod release you downloaded.</li>
</ul>
 
 
=== Where do you execute Python? ===
 
 
Python locates files, like <code>libtcodpy</code>, based on both what directory you are executing the Python within, and where your tutorial code is located.  In the screenshot above, you will note that <code>firstrl.py</code> is located in the same directory as both <code>libtcodpy</code> and the dlls <code>SDL2.dll libtcod.dll libtcod-gui.dll</code>.
 
The safest way to execute Python, if you this is all new to you, is explicitly within the directory the <code>firstrl.py</code> file is located.
 
<center>
[[File:Libtcodpy-command.png]]
</center>
 
Note:
<ul>
<li>The current directory is that of the tutorial code and libtcod dependencies, in my case <code>C:\Users\rmtew\Documents\xxx\project</code>.  I know that Python when executed, should be able to find these files.</li>
<li>The full path of the Python executable <code>c:\Python27\python.exe</code> is given, so that I know that Python 2.7 32-bit is executed.</li>
</ul>


<center><h1>'''Problems Solved'''</h1></center>
<center><h1>'''Problems Solved'''</h1></center>

Latest revision as of 01:16, 9 April 2018

This is part of a series of tutorials; the main page can be found here.


Problems

If any of the following helps you, please edit the page and add a note about what exactly your problem was. This will allow us to fold back the information into the tutorial to make it clearer and prevent others from having the difficulties you had.

Hello! I'm following the tut and finished the first section, but when i run my code the page insta-closes... i checked all the warnings you guys gave (python and libtcod both 64x, python version 2.x, etc), any toughts?

There are no known problems.

Problems Solved

Please add copy the section below, and fill it out. Thanks!

YOUR NAME HERE

YOUR NOTE ON WHAT YOU DID DIFFERENTLY THAT REQUIRED YOU TO COME TO THIS PAGE, AND WHAT ON THIS PAGE HELPED YOU.