-

Was this tutorial helpful?

  • Yes
  • No

0 voters

Tutorial are getting better and better thanks!

I second that, this is extremely helpful. Thanks a lot! :slight_smile:

Well, tbh: haven’t had time to look into it, but of course… any help is appreciated… maybe we can translate these tuts later on too :smiley:

Regards, Bigfoot29

why dont you go to the “manual” section and click the wiki and post your tutorials

Hi. Always appreciate your tutorials – but I can’t get this one to work. When I run the .bat file, a blank Panda graphics window appears for a split second and then disappears.

The follow appears in the console window:
DirectStart: Starting the game.
Warning: DirectNotify: category ‘Interval’ already exists
Know pipe types:
wglGraphicsPipe
(3 aux display modules not yet loaded.)

I have the new Panda 1.1 and demos that come with it work fine. Does Ping work only under Panda 1.05?

Additional info: Athlon 2600, GeForce 4Ti, 512MB RAM, Windows XP

Thanks for any help.
–Mike

Yeah, looks like the new version is the issue.

For example, instead of: from direct.gui.DirectGUI import *
It has to be: from direct.gui.DirectGui import *
(Yes, the capitalization matters)

Instead of: DirectSliderBar
It’s just: DirectSlider

And collision handling has changed.

For those interested, migrating to 1.1 is discussed here:
discourse.panda3d.org/viewtopic.php?t=894

–Mike

Hmmm… nice tut. but tbh some things were still a bit complex for a tut… example:

def mPingComputerPlayerCalcFinalScore( self, missed)
   if missed:

I GUESS, missed is getting either true or false from somewhere… of course this is only YOUR work, but you are already abstracting at a level that might be hard for real newbies (like me) to get into it.


self.acceptOnce("arrow_up", self.mPingHumanPlayerMoveUpdate, [ 1 ] ) 

Why do you use self.acceptOnce instead of self.accept? Why do you use the [brackets]? How does this whole code sentence work?
Why do you need the next line?

self.acceptOnce("arrow_up-up", self.mPingHumanPlayerMovePause )

What does the str command in

OnscreenText( str(self.mPingComputerPlayerScore), style...)

? After I have had the same problem I know why… somebody who rarely does do program might have serious problems… g

The problems mentioned above are even more weird when I see that you described other things in very detail and multiple times instead of using simple variables and shortened code (thus making it impossible to follow)

Another 2 issues I have had: When the ball hits the edge of the paddle you can get a high amount of points… have had up to 20 in a single “hit” - p0wnz0r :smiley: - the second one: the save-ability does not work… you need to create the data/saves directory :slight_smile:

However, a nice tut if you already got the basics and can think as a programmer. If you still need to learn that, some steps you did in the tut are hard to get or completely off-limits to some really stupid ppl like me :wink:

Regards, Bigfoot29

Hi! Thanks for the swift answer!

With my question I meant: why not say


if missed == TRUE

? :slight_smile: But as said… its your piece of code - your style you use it. I also dislike the += and ++ and that kind of stuff. I want clear code. But I guess thats MY very personal point of view. Sorry to bother you with that…

Next things are clear (were clear or are it now)

As for the directory stuff: yup… you need to define to add the empty dirs as well :slight_smile: thanks for the additional stuff.

Well, my point was not that I was terribly frustrated by this. But I was wondering why you declare some things very much in detail (for example the whole counter drawing could be done by one subroutine - but this would have BEEN much harder to understand than the version you use now) and leave some of the essencial things (for me) in a cryptic way :wink:

However, I need to admit that I did not read your previous tuts for now. I just wanted to take a look in the recent work to get an overview over the educational level of the tuts of yours. My previous post just threw the question marks in that appeared when running and watching the source code. I am not going to say “hey, you write real bad tuts! Do it better or let it be!” - how could I? The tut is great in several ways - except those bumpy stones along the road :wink:
At least it are working examples that users can take a look at… something that is missing in the docs, where I (as a learner) expect to find working examples (the Tasks one is great). But some of them are just a short declaration of how what works. Bad examples: Fog or some of the GUI elements. You don’t know what to import to get it running, neither do you know how to end the objects/methods. some can be removed using remove(), some need to be called using destroy() but especcially the destroy() does not work for all GUI objects (1.0.5) A normally real good example is Text Node. Nice examples, but again there is the missing point: How to call it? I mean: what needs to be imported?

According to the negative examples from above your tut is a real good one - because people can test the things right away while reading the stuff on the first screen and typing right away in the second one…

This does not mean that the manual stuff is BAD, its just lacking the touch to just test each chapter right away while creating a small application that does nothing else than show the functions (and how they work) mentioned in the Chapters.

Regards, Bigfoot29

Here is a patch of this file for Panda3D 1.1 http://mitglied.lycos.de/taincadsim/ping_main.py.pch

use it with


apply_patch ping_main.py.pch ping_main.py

Hope it comes helpfull

Hello, please upload at new the ping.zip file, because is not found on top link…

thanks and regards

Cannot download from that link. IPKnightly, would you give a new link? thanks a lot.

404

Can’t download, hope a new link.

Please don’t, actually.

I’m about to create an entire section of the website just for tutorials. Not sure how I’m going to do it just yet, so give me some time to think about it. Maybe a wiki, maybe another forum, something like that. Not sure yet. I’m going to remove the tutorials from the manual, and turn the manual into a pure reference work.