Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - codevsb12

Pages: [1] 2
1
QB64 Discussion / im back, people!
« on: April 19, 2020, 09:55:03 pm »
Gotta say it in a very short amount of words:
coMMAnD nOt IMplemeNtEd
Code: QB64: [Select]
  1. scale! = 64
  2. def fnr! = rnd * scale!
  3.  

2
QB64 Discussion / Re: collision questions and hard work
« on: March 03, 2020, 06:36:13 pm »
aw dang it, i think i don't need all this code to a simple game... glitchy effects... i made the 90 degrees rotation images manually in paint and now i just need to snap an array of spikes in the EDGES of the (framed) screen. that's the only thing i need now. that's it. you'll never see me again by a long time after that so help me.

3
QB64 Discussion / Re: collision questions and hard work
« on: March 02, 2020, 08:11:12 pm »
not that much of a proficiency...
but i suppose (i) is way easier, even for my first game ever on qb64.

funny story: when i tried improve my code to this

Code: QB64: [Select]
  1. SUB rotation (xt, yt, x1, y1, x2, y2, x3, y3, sp)
  2.  
  3.     IF xt < _WIDTH / 2 THEN xt = 10
  4.     IF xt > _WIDTH / 2 THEN xt = _WIDTH - 30
  5.     IF yt < _HEIGHT / 2 THEN yt = (RND * _HEIGHT / 2)
  6.     IF yt > _HEIGHT / 2 THEN yt = _HEIGHT - 30
  7.     IF yt = 10 THEN _MAPTRIANGLE _SEAMLESS(xt, yt)-(xt, yt)-(xt, yt), sp TO(x1, y1)-(x2, y2)-(x3, y3)
  8.     IF yt = _HEIGHT - 30 THEN _MAPTRIANGLE _SEAMLESS(xt, yt)-(xt, yt)-(xt, yt), sp TO(x1, y1)-(x2, y2)-(x3, y3)
  9.  
  10.  

the spike started glitching in a certain way that made me grin

4
QB64 Discussion / Re: collision questions and hard work
« on: March 02, 2020, 07:55:49 pm »
well, no. but actually yes. you guys taught me about how to flip my sprite using _PUTIMAGE.

5
QB64 Discussion / Re: collision questions and hard work
« on: March 02, 2020, 07:30:57 pm »
alright, first: now THIS was trying something
Code: QB64: [Select]
  1. SUB rotation (xt, yt, x1, y1, x2, y2, x3, y3, sp)
  2.  
  3.     IF xt < _WIDTH / 2 THEN xt = 10
  4.     IF xt > _WIDTH / 2 THEN xt = _WIDTH - 30
  5.     IF yt < _HEIGHT / 2 THEN yt = (RND * _HEIGHT / 2)
  6.     IF yt > _HEIGHT / 2 THEN yt = _HEIGHT - 30
  7.     IF yt = 10 THEN _MAPTRIANGLE _SEAMLESS(xt, yt)-(xt, yt)-(xt, yt), sp TO(x1, y1)-(x2, y2)-(x3, y3)
  8.  
  9.  

second: is there any statement  that can replace _maptriangle in case of 90 degrees rotation? cuz i'm sure there is not, even thought its qB A S I C

6
QB64 Discussion / Re: collision questions and hard work
« on: March 01, 2020, 08:22:10 pm »
Code: QB64: [Select]
  1.  
  2. spike& = _LOADIMAGE("spikeup.bmp")
  3.  
  4. xs = (RND * _WIDTH - 10): ys = (RND * _HEIGHT - 10)
  5.  
  6.     _PUTIMAGE (xs, ys), spike&
  7.  
  8.  

after that, simply asked to myself: what now?

7
QB64 Discussion / Re: collision questions and hard work
« on: February 26, 2020, 08:50:40 pm »
that was a good code, and the link's code was amazing! but i meant a image, y'know, a bmp file containing a gray spike on it.

8
QB64 Discussion / Re: collision questions and hard work
« on: February 26, 2020, 07:49:41 pm »
oh, so thats how functions work... anyway

now i need to add the spikes, and make them being generated randomly in the edges of the frame. i've heard of this function called _MAPTRIANGLE and i wondered: hmm... my spike image iis in the form of a triangle, so maybe i can use this statement to rotate it....

am i right?

9
QB64 Discussion / Re: collision questions and hard work
« on: February 23, 2020, 06:10:41 pm »
i would if the ball wasn't drawn with the CIRCLE statement

just take a look:




oh i dont know how to insert pictures in qb64 forums

10
QB64 Discussion / Re: collision questions and hard work
« on: February 23, 2020, 05:37:56 pm »
Yeah sooooo... are you looking to simply detect the collision, or are you interested in the actual dynamics that occur when a tennis ball hits a brick?
i look for simple collision detection. if the player collides with the ball then he wins

11
QB64 Discussion / Re: collision questions and hard work
« on: February 22, 2020, 08:40:38 pm »
uh, no... it's actually a collision between a rectangle AND a circle.

12
QB64 Discussion / collision questions and hard work
« on: February 22, 2020, 07:52:18 pm »
hello again! u guys may know me as the newbie of qb64 forums, but honestly, i worked a lot on my game... sort of...

in resume i cant find a good way to collide in objects.

first, i cant go to the qb64 wiki because there's always this message like "bandwidth limit". second, i've found some collision detection methods in a site, but they doesn't fit in my game.

it took me 2 days to finally ask for help from the experienced ones.

here's the code of my sub.

Code: QB64: [Select]
  1. SUB winner
  2.     IF (xp + sx2 = xb) AND (xp = xb + r * 2) AND (yp + sy2 = yb) AND (yp = yb + r * 2) THEN win = 1
  3.  

13
QB64 Discussion / Re: how to - x axis?
« on: February 21, 2020, 06:30:17 pm »
alright, first, _vince, im a newbie, that's what it says under my name.

and second, the balls not appearing and my player is not moving.

lemme try some things to fix it because i've asked a lot for help this week...

hmm...

i don't see any problem in the code

maybe i don't have the eye of a programmer

gotta try another method, then...
...
nothing?

w? s? d? a? Q????? NO?

oh, i forgot the randomize timer in the beginning...
injustice...

one last try...

yay! now it works!

important note: no defint a-z from now on...

14
QB64 Discussion / Re: how to - x axis?
« on: February 20, 2020, 08:40:50 pm »
ok, lets test it out. btw idk why you made all those things with rgb32 bu- OMG this is way better than i had in mind!

and there's a thing you guys may be confused about. my game is about a player having to collect a bouncing ball before it touches on a spike. i'm now feeling a little bit noob for having to copy paste everything the proes make to me.

15
QB64 Discussion / Re: how to - x axis?
« on: February 20, 2020, 05:55:47 pm »
great

one last thing, there was supposed to be a border around the screen and its not being drawn over when i use the line statement.

same to my circle.

Pages: [1] 2