|
Post by tbird on Mar 13, 2020 9:00:11 GMT -6
Sorry for not re-posting I had to leave and was going to post the code whether I figured out the problem or not....anyways here it is I applied the fix I mentioned in RC you can't access the last element of the array.
|
|
|
Post by johnno56 on Mar 13, 2020 12:22:22 GMT -6
I don't know why I didn't remember the array limitations! It was coffee's fault!! Coffee, in itself, is not wrong but probably its absence was the causal effect... That's it!! I didn't remember the array solution because I hadn't had my coffee!! Yeah. That sounds totally logical... Now, what was your name again? lol
In regards to artwork... Have you ever used Gimp before? Reason: I work from a tutorial and each image is different... I know I have it tucked away on a hard drive somewhere. When I find it, would you like a copy? Crumbs. If I can do it then it should be a 'walk in the park' for you!
Your skeleton has been set to 800x600. Did you want to keep that size for the whole project? Sometimes the 'intro' is smaller than the actual 'game' size. Using a graphical background will make the basic "vector-like" asteroids and player look a bit silly... I have a small collection of public domain images that could be used... If you have any preferences as to the types of images 'speak not or forever hold your peace'... Nah. Always open to suggestions...
It's 5:20 am and I have to head out to do our market shopping... Oh well... I'll pick this up again in a few hours...
J
|
|
|
Post by tbird on Mar 13, 2020 13:53:23 GMT -6
Walk in the park he says...haha sorry it's funny....your artistic skills are far superior if you are making any part of this I thank you lol. As for the resolution it was just off hand no specific use case. PD images are great, still be curious if anyone would like to make some graphics for it...hint hint aurel. I will volunteer to make the asteroids, big ones and small ones, maybe some variations of each. All custom would be cool! Tonight I will have a wee bit of time and going to make the bit for big asteroids on death become little asteroids! I look forward to your backgrounds, different one for each level??
|
|
|
Post by johnno56 on Mar 13, 2020 16:59:24 GMT -6
Oh, different ones you say... Oh, levels you say... The rules, if not mistaken and will be para-phrased, says 'Rule #10. Games must be of a complete status and not merely a demo." I wonder how many levels are needed before it's no longer a demo? lol I have no idea how to code levels... lol I suppose, if I knew how many levels there would be, I would know how many backgrounds to make... Ballpark. 5 to 10 backgrounds? I had an idea to slowly parallax a planet against a field of stars... I know. I know. Because of the proximity of a planet, stars would not be seen, due to the brightness of the planet... But hey. It's a game. Not an Astronomy lesson after all... lol Parallax in the sense that the planet will appear to move slowly, in the opposite direction of the ship, against a field of relatively fixed stars... so the theory goes... I've done parallax's before but not on that scale... could be fun. Could be headache... anyway, back to backgrounds. How many would you like?
|
|
|
Post by johnno56 on Mar 13, 2020 17:15:36 GMT -6
Here is a sample of ship movement. Wrap around, rotation, shooting, no friction. Thought about something like this for our project.
xmax = 800 ymax = 800 title$ = "Rotate Ship?"
WindowOpen(1,title$,0,0,xmax,ymax,0) CanvasOpen(1,xmax,ymax,0,0,xmax,ymax,0)
Dim TimeDelay Dim dt Dim shipSpeed Dim shipAngle Dim turnSpeed
nBullets = 200 Dim bulletX[nBullets] Dim bulletY[nBullets] Dim bulletDX[nBullets] Dim bulletDY[nbullets] Dim bulletLive[nBullets]
pi = 3.141592654
arenaWidth = xmax arenaHeight = ymax
shipRadius = 30
bulletRadius = 5 bulletSpeed = 30 fire = false
shipX = arenaWidth / 2 shipY = arenaHeight / 2 shipAngle = 0 shipSpeedX = 0 shipSpeedY = 0
'Update the Delta Time Function updateDelta() dt = (Timer - TimeDelay) * 0.001 TimeDelay = Timer End Function
function atan2(x1,y1) if x1 > 0 then return atan(y1/x1) elseif x1 < 0 and y1 >= 0 then return atan(y1/x1) + pi elseif x1 < 0 and y1 < 0 then return atan(y1/x1) - pi elseif x1 = 0 and y1 > 0 then return pi / 2 elseif x1 = 0 and y1 < 0 then return 0 - pi / 2 elseif x1 = 0 and y1 = 0 then return 0 end if end function sub updateStuff() turnSpeed = 5 if key(k_right) then shipAngle = (shipAngle + turnSpeed * dt) end if if key(k_left) then shipAngle = (shipAngle - turnSpeed * dt) end if if key(k_up) then shipSpeed = 100 shipSpeedX = shipSpeedX + cos(shipAngle) * shipSpeed * dt shipSpeedY = shipSpeedY + sin(shipAngle) * shipSpeed * dt end if
if key(k_space) then fire = true end if shipX = (shipX + shipSpeedX * dt) if shipx - shipRadius > arenaWidth then shipX = 0 - shipRadius end if if shipX + shipRadius < 0 then shipX = arenaWidth + shipRadius end if shipY = (shipY + shipSpeedY * dt) if shipY + shipRadius < 0 then shipY = arenaHeight + shipRadius end if if shipY - shipRadius > arenaHeight then shipY = 0 - shipRadius end if end sub
sub handleBullets() for b = 0 to nBullets - 1 if bulletLive[b] = 0 and fire then bulletX[b] = shipX + int(20 * cos(shipAngle)) bulletY[b] = shipY + int(20 * sin(shipAngle)) bulletDX[b] = int(bulletSpeed * cos(shipAngle)) bulletDY[b] = int(bulletSpeed * sin(shipAngle)) bulletLive[b] = true fire = false end if if bulletLive[b] = true then bulletX[b] = bulletX[b] + bulletDX[b] bulletY[b] = bulletY[b] + bulletDY[b] if bulletX[b] > 0 and bulletX[b] < arenaWidth and bulletY[b] > 0 and bulletY[b] < arenaHeight then setColor(rgb(0, 255, 255)) CircleFill(bulletX[b], bulletY[b], 3) ' ' Collision goes here ' else ' Out of bounds bulletLive[b] = false end if end if next end sub
sub drawStuff() ' Draw ship setColor(rgb(0,0,255)) circleFill(shipX, shipY, shipRadius) ' Draw "gun" shipCircleDistance = 20 setColor(rgb(0,255,255)) circleFill(shipX + cos(shipAngle) * shipCircleDistance, shipY + sin(shipAngle) * shipCircleDistance,5) end sub
do ClearCanvas updateDelta() updateStuff() handleBullets() drawStuff() update() loop until key(k_escape) = 1
It's just a concept. Treat it as such. Add, subtract, delete as you see fit.
J
ps: Before you say that RC already has a rotate function, it was primarily needed to govern the direction of the bullets, and figured I would include the ship as well. But, if anyone has a more efficient method, then please let me know... Whichever method works is ok by me...
|
|
|
Post by kennn on Mar 13, 2020 21:26:11 GMT -6
The game idea of the entry looks good.
By the way, codebang and aurel may come to join the discussion.
( There are 57 days left before the deadline.)
|
|
|
Post by tbird on Mar 14, 2020 0:03:13 GMT -6
johnno56 Looking good, put it together. 10 levels...sure varying amount and speed of asteroids, sounds like fun. @codebang by all means grab a piece and code it, some aspect, and then we can tie it all together. I am just getting home and its midnight and I am going to bed, so no contrib from me today.
|
|
|
Post by johnno56 on Mar 14, 2020 4:34:48 GMT -6
Ok. Slight snag. I found my tutorials for making various kinds of space backgrounds... But they are no longer compatible with the current version of Gimp. It looks like there hasn't been any up to date space tutorials made since 2010..!!! The "Stars" tutorial seems to be ok. Nebula - the kind I like - is too old. Believe it or not there are a few 'newer' nebula tutorials but they are quit plain and look like a coloured smudge. I will attempt to test the planet tutorial... but I have my doubts.... I do not really want to download 'stock' images...
I will continue to research...
|
|
|
Post by kennn on Mar 14, 2020 8:00:16 GMT -6
johnno56, Well done!
tbird, Effective co-operation!
codebang, Thanks!! They may give you clear instructions soon. Please wait.
|
|
|
Post by johnno56 on Mar 14, 2020 20:35:16 GMT -6
No need to apologize. I'm sure we all have time constraints and priorities. Best of luck with your entry... and of course, if you win, you will be totally ostracized by the community here... Nah. Kidding. Your entry will give RC a much needed "boost" towards the promotion of RC... No pressure, right? lol Best of luck!!
|
|
|
Post by johnno56 on Mar 14, 2020 20:43:38 GMT -6
Quick update on "space" graphics. The planet creation still works. In fact, someone wrote a script for Gimp, so that the core planet can be created in only a few keystrokes. Adding texture to the planet can take maybe 15 to 30 minutes. This is a huge time saver. Still no news about nebulae...
The tutorial for the planet covers 4 types: See attached.
I suppose, with the right texture (and the tutorial shows you how to make one), just about any type of planet can be made...
Any favourites?
J
|
|
|
Post by kennn on Mar 15, 2020 1:03:03 GMT -6
codebang,I was thinking of putting my own entry into the contest. You will develop your own entry and leave the dream team? No problem. This is also good because there will be two entries developed with RCBasic! We look forward to your entry. You may have problems with RCBasic since you are not familiar with RCBasic. Noob, johnno56 and tbird are RCBasic experts and they will solve your problems. johnno56,
Your four planets are also good! No problem! (There are 56 days and 17 hours left before the deadline.)
|
|
|
Post by johnno56 on Mar 15, 2020 18:59:12 GMT -6
Sample backgrounds. The "stars" I made using Gimp the others, nebula based, are from OpenGameArt.org and are free to use for all purposes.
All are modified for 800x600 displays...
Does anyone have any spaceships (32x32 preferable) or any ideas for a type of spaceship? Pencil drawings are ok... but NOT crayon... lol Otherwise, "I" will have to draw them and believe me, you don't want to see my stick figure drawings... lol
J
|
|
|
Post by kennn on Mar 16, 2020 3:03:28 GMT -6
Does anyone have any spaceships (32x32 preferable) or any ideas for a type of spaceship? Pencil drawings are ok... but NOT crayon... lol Otherwise, "I" will have to draw them and believe me, you don't want to see my stick figure drawings... lol
J
This is a very simple problem! Do you remember Game Maker 4.3c? There are many free and useful sprites in different folders. Yeah! They should be free and suitable for commercial or free games. In Space folder and Transport folder, you will discover suitable sprites.
|
|
|
Post by johnno56 on Mar 16, 2020 4:01:46 GMT -6
Thanks kennn. I had completely forgotten about GM4.3c
|
|