Author Topic: Race Car Game  (Read 15683 times)

0 Members and 1 Guest are viewing this topic.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Race Car Game
« Reply #45 on: July 17, 2019, 03:48:16 pm »
It's great we are on the same page about this. Also, no worries on the whole "stern" thing. I took that as you have a clear understanding of how you want your project to be, and that's admirable. It would be easier to communicate intent better in person than over a forum, but until they come up with teleporters, we're stuck with this method.

Anyway, I posted the version I modified here: https://www.tapatalk.com/groups/qbasic/viewtopic.php?f=754391&t=39525

Please have a look, and if there is anything you would like changed, let me know; I'd be happy to do so.

Pete

Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Race Car Game
« Reply #46 on: July 17, 2019, 04:10:59 pm »
The oil slick looks great! I'll keep mine though just for the retro early-80's feel hehe. I just tried your version and it runs great! Well except for 1 thing which you may try to change. That's the fact that the mouse doesn't work when the pointer is off of the window. The only fix to that that I know of is to change the game to _FULLSCREEN and the game would be the entire screen. That way you also wouldn't have to worry about changing coordinate variables because it just makes the coordinates larger. If you do this, make sure and add something like "Esc to quit anytime." at the front welcome page and somewhere on top of the game display window, if there's room to fit it, or maybe on line 2 or 3 or something so people can stop the game since there will be no X to close the program at _FULLSCREEN. And while you are there at the front welcome page, feel free to add "Modifications by Pete" somewhere under my Ken G. name. But other than that, I like the feel to the game, it runs really well. 
« Last Edit: July 17, 2019, 04:13:24 pm by SierraKen »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Race Car Game
« Reply #47 on: July 17, 2019, 04:36:18 pm »
Yes, about the mouse. I know and you can't even keep that under control with _MOUSEMOVE when it reaches the edges. I wish that could be corrected in QB64, or we had a way to keep the mouse in the program window only. The only other way I know of is to hide the mouse pointer completely, not just like I hid it in the program window, but hide it also on the desktop, using a Windows API call. Unfortunately, that would make it a Windows only app. No Mac or Linux usr could try it. :(.

In regards to the name modification, you mean something like this?

Code: QB64: [Select]
  1. DEFINT A-R
  2. 'I've wanted to make this game since I was a kid when I owned a little hand-held race car game where you steered the little wheel"
  3. 'to avoid the other cars. That toy broke when I was a kid so I've wanted a similar one on the computer. :)
  4. 'Enjoy!
  5. '
  6. 'Version 3 was made on July 16, 2019 by Ken G.
  7. 'Modifications made by Pete on July 17, 2019.
  8. 'Freeware only.
  9. '
  10. 'Thanks to the QB64.org forum guys for the help!
  11. _TITLE "RACE CAR"
  12. SCREEN _NEWIMAGE(640, 480, 32)
  13.  
  14. begin:
  15. PRINT "                               R  A  C  E    C  A  R"
  16. PRINT "                                       V. 3"
  17. PRINT "                     By Ken  G. with Modifications by Pete"
  18. PRINT "                 Use the mouse moving it l/r to steer your car"
  19. PRINT "                 around the other cars and go as far as you"
  20. PRINT "                 can without hitting them, as well as the round"
  21. PRINT "                 oil slicks. You get an extra car every 3000 points."
  22. PRINT "                 Click the left or right mouse buttons to move"
  23. PRINT "                 your race car faster or slower."
  24. PRINT "                 You get 5 cars."
  25. PRINT "                 Every time you hit a street edge, you"
  26. PRINT "                 lose 200 points."
  27. PRINT "                 Every time you hit an oil slick your car"
  28. PRINT "                 moves a random direction."
  29. PRINT "                 Every time you hit another car you lose a car."
  30. PRINT "                 To reset the Top Ten score sheet, delete the file"
  31. PRINT "                 named toptenracers.txt and play a full game."
  32. INPUT "                 Press Enter to play! ", a$

Let me know if you had something else in mind. Like I said, until we make teleporters...

Hey, if you ever make a YouTube video, let me know, I'll embed the video, too.

Oh, I almost forgot, I changed the instructions in my modified version to indicate it uses the mouse.

Pete
« Last Edit: July 17, 2019, 04:38:10 pm by Pete »
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Race Car Game
« Reply #48 on: July 17, 2019, 04:40:33 pm »
Name looks perfect. Not sure about doing a YouTube video yet. I bookmarked that forum, will take a look at it more sometime.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Race Car Game
« Reply #49 on: July 17, 2019, 05:12:59 pm »
Great! Also, you are welcome to join the QB Forum, if you like. I only give new members posting rights to the community forum, but I'd make an exception in your case, and provide you with full posting / editing abilities. The reason for the limitations, it's an old forum, which I took control of a little over 10 years ago, when QB was abandoned and our previous forum owner passed. By archiving most of it, I can better preserve it and not have spammers to deal with. Rob (Galleon) actually started his QB64 project and posted updates in a special sub-forum, which I asked the previous forum owner to add. The Big Programs Forum and the Programs I am Proud forum would be places I recommend you have a look at. Also, check out TheBOB's sub-forum, he is a professional graphics artist. He also has his own samples folder in the QB64 download zip file. No worries either if you don't want to join. It's not like I'm giving away free decoder rings with every membership!

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Race Car Game
« Reply #50 on: July 17, 2019, 05:15:14 pm »
Nice modification, Pete!

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Race Car Game
« Reply #51 on: July 17, 2019, 05:30:12 pm »
Thanks Pete, I'll think about it. I put a lot of time in this forum right now and I don't know if I want to give time for other forums. But I am curious, is this also your forum?

http://www.petesqbsite.com/phpBB3/index.php?sid=94dd1676bc2f20d929ef10cf97860345

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Race Car Game
« Reply #52 on: July 17, 2019, 05:58:53 pm »
That's the "other" Pete. Actually, Pete Berg's been at it, at least forum-wise, more years than me! The QB64 folder also contains samples from his site. Clippy, who contributed most of the QB64 wiki entries now moderates that site, but surprise, Pete Berg returned a few months back, joined The QBasic Forum at Tapatalk, but so far, has not been too active in the community.

There are times I wished I'd encouraged people at Rob's (Galleon's) [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there] forum to post their projects in the QBasic / QB64 sub-forum. That's the one I said Mac, our former forum owner, and I opened for Rob. Rob opened his own [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there] forum when our N54 QBasic forum got hacked. Fortunately, the people at Network54 were able to restore the forum in a couple of weeks time. I always thought, at some point, Rob should and would have his own forum. I don't think either of us anticipated it would happen the way it did, and now, ironically enough, Rob closed down his forum a short time ago, and while the QBasic Forum posts still remain online, nearly everything that was posted to [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there] is now gone. Anyway, just some QB history.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Race Car Game
« Reply #53 on: July 17, 2019, 09:23:22 pm »
That's interesting Pete, thanks!

Offline Ashish

  • Forum Resident
  • Posts: 630
  • Never Give Up!
    • View Profile
Re: Race Car Game
« Reply #54 on: July 19, 2019, 09:18:20 am »
Good Job!
if (Me.success) {Me.improve()} else {Me.tryAgain()}


My Projects - https://github.com/AshishKingdom?tab=repositories
OpenGL tutorials - https://ashishkingdom.github.io/OpenGL-Tutorials

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Race Car Game
« Reply #55 on: July 19, 2019, 01:34:33 pm »
Thanks Ashish!

I been trying to think of something else to make, but nothing so far, unless I want to finish that Tunnels game I started, although I don't know how good I can make that one.