Scorched Earth Remake

BlitzPlus Forums/BlitzPlus Programming/Scorched Earth Remake

Moore(Posted 2004) [#1]
Well, I've made a functioning, updated version of Scorched Earth an old game that presented a 2D terrain with small artillery pieces that fired back and forth at each other. WELL, when a shell impacts the ground it produces a particle effect sending dirt flying in the, Problem: some times the dirt just sits there, mid air, until the other player fires and his shell lands. If anyone would like to take a look at the code I'd be glad to email it or post it.


Skitchy(Posted 2004) [#2]
Is that game the same as 'Scorched Tanks' on the Amiga? Damn that game was good.

- I assume your particles have a 'life' value, and when it reaches a certain number ie. 0 they are deleted. Make sure you're freeing them properly.
- Use
If life<=0
instead of
If life=0
- *Always* update the particles, not just when the shell lands. It sounds like you're only updating at certain times or game states because the particles disappear when another shell comes down.

That's about all I can think of without seeing the code :)


John Blackledge(Posted 2004) [#3]
Hang on. I've already seen a 3D version of Scorched Earth by the original author on a magazine CD (2 yrs ago?). Perhaps you should check with him first?


Moore(Posted 2004) [#4]
Hmmm... Well the particles don't have a life variable per say basicly its:

check.particle = first particle
while check <> null
for p.particle = each particle
if p\y > 450 then ;if its gone of the bottom of the screen
delete p;
else
p\y = p\y + gravity
endif
next
check.particle = first particle
wend

I know all the particles are deleted because it does exscapes this while loop and continue to the next players turn.

I'm just gonna have to step through the draw cycle ans see exactly where this "dirt" is.

John,
A 3D version huh?, I'm just playing around with the 2D version right now, I actually have code for it but its not very well commented and does't have particle effects in it.
I'm also adding characters, a story(sorta), settings, and hopefully network play. It should be fun.

Can any one point to a good netplay tutorial?

Thanks All! :)


Skitchy(Posted 2004) [#5]
You don't need the 2 nested loops.
The 'Each' command automatically starts from the first instance of a type and moves toward the last with each 'Next'.
Also, you have to actually free the sprite/image/whatever you're using for your particle before you free the type instance.

So, just use :
for p.particle = each particle
if p\y > 450
freeimage(p\your_particle_image_field)
delete p

else
p\y = p\y + gravity
endif
next


Moore(Posted 2004) [#6]
Oh well there is no image to free, p.particle just has x, y and color then I use rect() to draw them to the screen.


Skitchy(Posted 2004) [#7]
Ah, well in that case I expect you're drawing over the *old* particle position each frame??? Just do one last draw at the particle position with your backdrop color before you free the particle.

It would be WAY easier to use a 1 pixel image though.


wedoe(Posted 2004) [#8]
I've seen quite a few remakes of this classic, they all have in
common however, that they are not very good remakes at all.
So if you can do this proper, recreating the great gameplay of
the old classic, then you defenately have a buyer in me :)


Moore(Posted 2004) [#9]
wedoe, so your a real fan huh? Wanna help. I plan to make it opensource freeware, as its will hopefully be my first, complete project, so I'm not all protective about the code. Plus I could use as much help as possible. Interested?


Who was John Galt?(Posted 2004) [#10]
Pocket tanks deluxe is excellent - that's like Scorched Earth, isn't it ?


Regular K(Posted 2004) [#11]
Scorched Earth rocks!

I play at my grandma's sometimes on her old Windows 3.1, but I only get to about once a year and since shes got a newer computer I don't that will be happening any more.


wedoe(Posted 2004) [#12]
@Moore:
You can always ask if you need help, but I can't promise
anything as I'm under a pile of work right now, but still
don't hesitate to ask, I'd be more than happy to betatest.


Moore(Posted 2004) [#13]
Cool guys, Thanks for the interest. I'm setting up a web page for it. http://www.geocities.com/NRMStudios/aa.html should be the address when I'm done. There you'll be able to dl the excutable and resources. It should be up in a couple of hours.


Regular K(Posted 2004) [#14]
http://www.100webspace.com is a really good host! I suggest you go and put the website their.