|
Post by johnno56 on Feb 1, 2019 20:11:56 GMT -6
Tbird, Bounding Box was the first one I tried even though some of the sprites were roundish... The detection system was efficient. Too efficient. The bullet would hit the enemy and almost instantly an explosion was registered and the sprite placed back in the same spot. Even though the sprite was "told" to relocate "off screen" after being hit. The current circular 'distance' routine had no such difficulties. The bullet hits; The sprite is moved off screen; an explosion occurs and the game continues. My theory is: The computer calculates addition and subtraction faster that it does with multiplication, division and 'power' calculations. Just a guess as I could not find any errors in both collision detection systems. Bounding box seems to be more 'tolerant' at detecting at higher speeds than circular. As a result there seems to be a higher degree of "but that shot hit!"... I will post my current version. Please excuse all the 'junk'. I'm still learning RC and tend to 'do things' the way I am used to. As such, there are probably more efficient methods of coding using RC, that what I have done. I am experimenting with "4 colours" and have chosen to go "dark". (open to suggestions...) Concerns: I have attempted to use an 'active' variable when displaying the bullet, that part seems to work, but at times the bullet continues "unseen" and can intersect the next target above... There is still MUCH to do... Implement enemy 'shoot back'. Routine in place but not finished. Better start and finish screens. Current in place to get things moving... Possible enemy shielding on the final stage (level 3) - Levels determined by the score - speed increase with each stage. Possible choice of weapons - each differing degree of damage. (this would logically assume a health or damage system is needed) - At the moment 1 hit = death As such, lives gained or lost by player... 'Play Again' All the 'extra' stuff, from "shielding' onwards are a wish list and most I have absolutely no idea how to do... lol Would you be so kind, assuming you have the time to spare, as to check out - the mess that I call coding - and point out any errors or inefficiencies? I am detecting a huge amount of pressure to complete this project in time. As such, I fear that I may be making either fundamental or perhaps some right royal stuff ups... J ufo3.zip (77.5 KB)
|
|
|
Post by tbird on Feb 1, 2019 23:39:38 GMT -6
I will have a good look through in the morning but don't expect too much, I don't pretend to know all that much either lol.
|
|
|
Post by johnno56 on Feb 2, 2019 0:35:58 GMT -6
In the meantime I have been working on the enemy return fire. It's pretty much random at the moment.
If the enemy is on screen and a specific random number is selected then the top enemy will fire. If the shot hits the 'ground' the shot is rendered inactive and is capable of firing again. I have figured out the appropriate collision detection (bounding box) and I was surprised to see it actually worked properly. The game just ends at the moment. Haven't developed an 'end game' for the player yet...
I've been sitting at this keyboard for most of the day. It's 5:30pm and time for a change of interest until tomorrow... Have a good night.
J
|
|
|
Post by kennn on Feb 2, 2019 3:05:01 GMT -6
In the meantime I am experimenting with "4 colours" and have chosen to go "dark". (open to suggestions...) It is a quite good idea. The game will generate a tense atmosphere! Many gamers like this kind of atmosphere. You are hardworking. In this contest you are obtaining valuable game programming experience. I like the wish list designed by you! It is an optimal wish list. The finished entry may suprise us, yeah.
|
|
|
Post by kennn on Feb 2, 2019 3:06:12 GMT -6
I will have a good look through in the morning but don't expect too much, I don't pretend to know all that much either lol. Maybe other expert users will come to help although not many expert users in this forum. There are only four expert users of RC Basic in this forum. johnno56, Tbird, sdlbasic and n00b.
|
|
|
Post by johnno56 on Feb 2, 2019 4:04:51 GMT -6
Umm.. Three... But thanks anyway... lol
A few more minor changes... I have reproduced the Amstrad boot screen to "get the ball rolling" and if the player dies, that screen will pop up, then exit the game.
That's the first two "off the list"... Start and Finish screens and shooting back. (although random, is basically done. I can "tweak" it some more, so that it will "appear" not to be so random and perhaps to fire either more often or fire faster... diabolical...)
I think weapons and a health / damage system will need some research.
I had thought about background music, but machines back then used "midi-type" music, which sounded awful... I may have something tucked away in storage that might just do the trick... I don't want to over do it... after all, we need to hear the game, not reach for the speaker volume controls... lol
|
|
|
Post by tbird on Feb 2, 2019 8:42:22 GMT -6
I had a look through.......it's pretty good IMO, it's quite organized. It's easy to understand, your doing all your positions before drawing......I think your worrying a bit too much, it looks good and no major issues. The only thing I changed was where you reset the bullet values. You register a hit, but then wait for next loop to tell the update bullet function about it. sub updateUfo1() if level = 1 then ufo1Speed = 3 elseif level = 2 then ufo1Speed = 5 elseif level >= 3 then ufo1Speed = 7 end if collideUfo1 '(pbulletx,pbulletx+8,pbullety,pbullety+8,ufo1x,ufo1x+32,ufo1y,ufo1y+32) if hitufo1 = false then ufo1x = ufo1x + ufo1Speed if ufo1x > xmax then ufo1x = -24 end if if ufo1x < -24 then ufo1x = xmax end if drawImage(ufo1, ufo1x, ufo1y) end if if hitufo1 = true then playSound(expBig,2,0) drawImage(ufo1,40,-32) drawImage_blit(boom,ufo1x,ufo1y,frame1*32,0,32,32) frame1 = frame1 + 1 shoot = 0 pbulletx = 0 'Reset values here for immediate change pbullety = 0 'wait(10) if frame1 = 16 then frame1 = 0 score = score + 1 ufo1x = 0 - rand(200) hitufo1 = false end if
end if
end sub
That way the bullet stops immediately after it hits the ufo.
No complaints, the bullet seems to shoot a bit of center of the player. Also the level renders odd for me the bottom is off to the left and there is only stars in the top left corner.
|
|
|
Post by tbird on Feb 2, 2019 8:48:31 GMT -6
Ok I just zoomed into the background image 2X and that fixed it.
|
|
|
Post by johnno56 on Feb 2, 2019 13:42:22 GMT -6
Here is the next version. Minor changes only. TBird's mod - Only one ufo at a time - well there goes my edge... lol Clearer comments - Getting too messy The "Blue" background was too bright - replaced with the actual colour - contest website palette was not accurate - for the blue... lol Please ignore the "boxes" that appear around the player and the enemy bullet. Working on tweaking the randomness of the firing. The boxes are to indicate when the enemy will shoot - and no. I will NOT be leaving that feature in the game... lol I still have to work on a suitable player destruction sequence... That's it for now... I need more coffee... Quick question. I think that back in the mid to late 80's, some games, made use of - what we would call - a crude particle system. Can anyone remember any games that used 'particles'? If so, that might make a cool 'ending' for the player... Moo Ha Ha..... J ufo4.zip (74.54 KB) (Yes. It's about 3K smaller... No. It's NOT clever coding - got rid of 'old' images... lol)
|
|
|
Post by johnno56 on Feb 2, 2019 14:34:31 GMT -6
Just a quick update:
The tweaking of the enemy's firing sequence was easier that I first figured. It's still random but, it will wait until its almost overhead and then... well, you can guess the rest.. So, just in case you would figure on guessing the 'sequence' of ufo movement, do not stand in one spot for too long... Moo Ha Ha.... UFO4 has mot 'yet' been modified... UFO5 'will" be... Moo Ha Ha...
|
|
|
Post by tbird on Feb 2, 2019 19:08:20 GMT -6
Looking forward to it!
|
|
|
Post by kennn on Feb 3, 2019 3:02:53 GMT -6
johnno56 wrote:
Oh...really don't know. If your entry has particle effects, it will be amusing!
The words on this screen look like words of a retro game. Quite good!
This kind of system is essential, yeah!
Now this game is stable and traditional!
It may start to be very charming soon.
|
|
|
Post by johnno56 on Feb 3, 2019 4:27:27 GMT -6
This is version 5. Have not found a simple enough particle system yet. However, I did find an open source image on OpenGameArt, that will serve a an exploding player until then. Enemy shooting has been modified to 'quite accurate' and fires *almost* every time it passes overhead. I still have a few niggling concerns about collision detection. It may have been fatigue, but I could have sworn that a bullet passed through a barrier. It was only once but.... Not sure about a 'midi music' track... I think the "pew pew" player shots could be quite enough... lol Anyway. Let me know if you find any problems or have any suggested improvements. Best to find out these things while there is still time... J ufo5.zip (147.25 KB)
|
|
|
Post by tbird on Feb 3, 2019 9:23:23 GMT -6
That is looking sweet. Whether you believe me or not but you are doing a great job. The boot screen is awesome!
|
|
|
Post by johnno56 on Feb 3, 2019 14:11:55 GMT -6
Minor update in last link. Game ended but no how it was supposed to do. All fixed. Small sound effect added...
ps: Found another glitch. Reason for player bullet 'passing through' the large barrier: When I copied the small barrier to make the routine for the large barrier, I did not modify the 'collide' parameters to cope with the wider barrier. Although the large barrier is being displayed, the collide routine, was set for the smaller barrier. The game has been corrected and the version 5 link has been update.
|
|