-  [WT]  [PS]  [Home] [Manage]

[Return]
Posting mode: Reply
  1.   (reply to 4745)
  2. (for post and file deletion)
/pr/ - Programming
  • Supported file types are: C, CSS, DOC, DOCX, GIF, H, JAVA, JPG, PDF, PNG, SVG, SWF, TXT, WEBM
  • Maximum file size allowed is 10000 KB.
  • Images greater than 200x200 pixels will be thumbnailed.
  • Currently 388 unique user posts. View catalog

  • Blotter updated: 2011-01-12 Show/Hide Show All

There's a new /777/ up, it's /gardening/ Check it out. Suggest new /777/s here.

Movies & TV 24/7 via Channel7: Web Player, .m3u file. Music via Radio7: Web Player, .m3u file.

WebM is now available sitewide! Please check this thread for more info.

Any help is appreciated! Neckbearded Basement Dweller 15/06/05(Fri)10:56 No. 4745
4745

File 143349458999.jpg - (40.12KB , 500x428 , 1433312565948.jpg )

Hello 7chan, I don't come here ever but I need help from someone familiar with python. I know nothing of programming and I need to modify a game in a variety of ways. Most of the modifications I'm able to figure out on my own, they're as simple as changing a few variables. However I've hit a dead end, and I need to make one more change.

The game is called space fortress and was a DARPA project to test various aspects of learning, reaction time, and gaming. It's a very simple 2D shooting game, nothing complicated. Here's a link for anyone who's interested in it:

https://www.dropbox.com/sh/p6wvyw7jd7vyjlr/AAAuKD6Vlfvsp4Ned0qUls0Va?dl=0

What I need to do is create a wind effect that constantly blows the ship downwards by 0.4 pixels per game tick. That will require adding lines of code that I have no idea where to begin at. If you can't do it yourself I'd appreciate it if you told me how extensive of a modification this would be. I assume it's a simple command to have the ship always move in one direction, -0.4 on the y axis to be exact, but again I'm not a programmer. So any help would be appreciated.


>>
Nattajerk 15/06/05(Fri)18:42 No. 4746

oh this looks like fun, I'm at work now but I'll check around later. is this wind going to be constant? are you just simulating gravity? or is this wind going to be selective, only active when you're in a certain area or tile?

if the latter you can add an "in wind" state, which will move the ship.


>>
Neckbearded Basement Dweller 15/06/05(Fri)22:01 No. 4747

Yeah the goal is for it to be constant. There's already a line for initial movement but that's not what I need. No other qualifiers, it should be active all the time, so the player has to work against (or with) the "wind" at all times.


>>
Neckbearded Basement Dweller 15/06/06(Sat)11:29 No. 4749

Yes that makes sense. Would adding 'self.position.y -= 0.4'to the compute method under ship.py do that? That's a suggestion I got from a different board.


>>
Neckbearded Basement Dweller 15/06/07(Sun)05:38 No. 4750
4750

File 143364830511.png - (227.25KB , 1920x1080 , Untitled.png )

I was told this would work. But my lack of programming knowledge makes it difficult for me to troubleshoot what I'm doing wrong. I'm not a programming student.


>>
Neckbearded Basement Dweller 15/06/08(Mon)00:58 No. 4751

So I added 'self.position.y += 0.4'in ship.py under computer and it works!

Thanks for taking the time to read this thread.



[Return] [Entire Thread] [Last 50 posts]


Delete post []
Password  
Report post
Reason