[R Games] scoRched (beta version 0.11)

#1
Hi Guys,

Please find attached a new R game, a clone one of my favorite old DOS games by Wendell Hickens, Scorched Earth.

Please help with beta testing. In this beta version 0.1, I have built a very simple game with


  • No wind
  • Stupid AI
  • flat world
I will implement improvements on these features in the future. Please give any suggestions you may have on how to improve the game. This game runs without any packages.

How to play?
Copy & paste the code into R or use source(), then type "scoRched()" and follow the instructions provided in the graphics. You can only choose 1 game yet (please help me improve these, or add suggestions for your own). Any suggestions on interface improvements are welcome but I want to keep this base package!

Credit goes to Dason for showing us great new ways of procrastination in R.

This has been tested on Linux (PCLOS, e17,R 2.13.0). Works normally.

Test WIN 7 VM; speed of animations seems too high. Anybody else experiencing instant projectiles?

As for copyright ect, the code is free for everyone to use and abuse - just give credit where credit is due (like towards Wendell Hickens).

Download the code here:

Version 0.11
Fixed instant projectile trajectories, now customizable fps via scoRched(fps = X ); increased fps will slow down animations
View attachment 1467

Version 0.10
View attachment 1466

Requests for next release:
Sound (trinker)
randomized start positions (trinker)
 

trinker

ggplot2orBust
#2
Re: [R Games] scoRched (beta version 0.1)

Thanks for another fun way to procrastinate. I'm dodging qualitative micro coding right now.

Test WIN 7 VM; speed of animations seems too high. Anybody else experiencing instant projectiles?
Yes instant projectile on win7. The game still works. It reminds me of gorilla basic I used to play in high school. I like it. Any chance of hit and miss sounds in future versions. Nothing more satisfying than an explosion sound as your oponent disinigrates.
 

Dason

Ambassador to the humans
#3
Re: [R Games] scoRched (beta version 0.1)

It looks like you could add a very short Sys.sleep in while you're doing the trajectory animation to slow it down to non-instant.
 
#4
Re: [R Games] scoRched (beta version 0.1)

Yea, I'm already using Sys.sleep extensively. However to me this reveals a problem in my OS (slow loops or graphical plotter), something more serious.

Anyway what else would you guys like to see implemented? Weapons choice? Missile Shields? Nukes? Non Earth gravity? Airstrikes? Ammo? Buy Menu?

I am now thinking about my A.I. handler.

Anyway here is version 0.11 (see post # 1) with improved trajectory animation (customizable for your system).

Sound can be implemented pretty easily, I'll choose some nice ones from http://www.freesound.org
Look for it in the next release.

Dason, when do you think we have enough for a package?
 

trinker

ggplot2orBust
#5
I'd love to see a games package :)

Sorry TheEcologist but it still moves pretty fast (not as instant but almost). For the oponent turn it moves instantly.
I'm running windows 7 homepremium, 64 bit OS. I'm running [R] version 2.14 (beta version) {maybe this is pertinent}

I'd like the opponent triangle randomized (change position) after each game? Not sure if this is possible but between you and Dason's heads I'm sure you can come up with a way.
 
#6
Hi trinker, randomization of location is very possible! Eventually I would prefer the user to choose a location, and then the AI also chooses.

Have you fooled around with the fps option? for instance scoRched(fps=1000) will make it go very slow on my win 7 vm (as this forces very fine scaled animations (1000 per second - likely too much to handle).
Anyway the animations speed could still use some improvements. I'll think on an overall more intelligent way to do it. [yea I know fps is not the correct term]

On the AI, it will get smart in version 0.2. It will use a 1-dim optimization algorithm remembering wind speed, angle, power and its effect on distance to target. Also I will add an option for special weapons with limited ammo but more mass (thus heavier) and bigger explosions. Your base will also have limited power, so you can't shoot very heavy ammo every turn (power will slowly replenish every turn).