Author Topic: QB64 Game Jam  (Read 21345 times)

0 Members and 1 Guest are viewing this topic.

Offline Aurel

  • Forum Regular
  • Posts: 167
    • View Profile
Re: QB64 Game Jam
« Reply #30 on: February 02, 2021, 03:33:57 am »
for @Dav

if you are interested ...there is no need to be in "bytecode " that you can produce .exe
you need binder
look here ....
http://www.jose.it-berater.org/smfforum/index.php?topic=5733.msg24307;topicseen#msg24307

I think that something similar can be made in QB64 without to much troubles
//////////////////////////////////////////////////////////////////
https://aurelsoft.ucoz.com
https://www.facebook.com/groups/470369984111370
//////////////////////////////////////////////////////////////////

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: QB64 Game Jam
« Reply #31 on: February 02, 2021, 06:19:55 am »
Hi @Aureal.  Thanks for the link.  I haven't used OxygenBasic before, but looking at that source code, I *think* that's actually what I'm doing, binding a source to a runtime exe that loads itself.  But I'm saving the exe size in itself too, not an external .cfg file. Perhaps 'my calling this a bytecode compiler is not correct...not sure what to call it actually. A Binder sounds good to me.

BTW, thanks for your nice comment on my IDE in another thread.  I meant to reply thanks over there.

- Dav

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: QB64 Game Jam
« Reply #32 on: February 03, 2021, 09:57:18 am »
I haven't used OxygenBasic too, because I don't want  blonde hair.
Programming isn't difficult, only it's  consuming time and coffee

Offline johannhowitzer

  • Forum Regular
  • Posts: 118
    • View Profile
Re: QB64 Game Jam
« Reply #33 on: February 03, 2021, 04:41:37 pm »
According to the timer on itch.io, it seems the game jam has been pushed back another 12 hours without notice?  What's going on?

Offline Adrian

  • Newbie
  • Posts: 39
    • View Profile
Re: QB64 Game Jam
« Reply #34 on: February 03, 2021, 08:44:58 pm »
Deadline still 10 Feb? Or needs to be pushed back as well

Offline qbkiller101

  • Newbie
  • Posts: 73
    • View Profile
Re: QB64 Game Jam
« Reply #35 on: February 04, 2021, 06:01:32 am »
And the theme is: *drumroll*

Anti-Gravity!

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: QB64 Game Jam
« Reply #36 on: February 04, 2021, 12:42:04 pm »
And the theme is: *drumroll*

Anti-Gravity!

Well I'm all set then. I'll just code Tetras, backwards.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline johannhowitzer

  • Forum Regular
  • Posts: 118
    • View Profile
Re: QB64 Game Jam
« Reply #37 on: February 05, 2021, 04:08:13 am »
I suddenly find myself saddled with two really cool ideas - one for the real theme, and one for the fake theme that someone was suggesting a few days ago, "tic tac toe."  Got in a little over my head, it seems.  Oh well, this will be fun at least!

Offline 40wattstudio

  • Newbie
  • Posts: 82
    • View Profile
    • 40wattstudio
Re: QB64 Game Jam
« Reply #38 on: February 06, 2021, 03:56:11 pm »
Looking forward to the end results of this Game Jam! I would have signed up too but I'm split between work and another QB64 project right now.

Offline 191Brian

  • Newbie
  • Posts: 91
    • View Profile
    • My Itch page
Re: QB64 Game Jam
« Reply #39 on: February 09, 2021, 04:16:26 pm »
Hi All

I have had an idea for the Game Jam, a hover board control game -
Hover Board Balls
idea of the game is to control a hover board keeping it on screen
controls are "a" fires the left had hover jet "d" fires right hover jet
when the board tilts the hover jets also push it in that direction
balls fall from above
the balls are supposed to fall on to the board pushing it down where on
the board it lands

I am not sure how to do the ball board collision and make the balls  push down (add gravity) on the board then roll
off the board in the direction it is tilled and at speed based on the pitch of the board angle.

Any one interested in helping?

Here is what I have so far.  [ You are not allowed to view this attachment ]  

Brian ...
Brian ...

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: QB64 Game Jam
« Reply #40 on: February 09, 2021, 04:32:25 pm »
Brian,

Not sure if this will help.

These functions I use work with RCBasic but should not be difficult to convert

This one is for detecting the collision between two circles:
Requires the x and y coords of each circle and the radius of each circle.

function collide(circ1x, circ1y, circ2x, circ2y, r1, r2)
   '   Calculate difference between centres
   distX = circ1x - circ2x
   distY = circ1y - circ2y
   '   Get distance using Pythagoras
   dist = sqrt((distX * distX) + (distY * distY))
   if dist <= (r1 + r2) then
      collision = 1
   else
      collision = 0
   end if
   return collision
end function

This one detects the collision between a circle and rectangle:
Requires the x and y coord of the circle and it's radius. The x and y coords of the rectangle together with its width and height.

function collide(cx,cy,radius,rx,ry,rw,rh)
   distX = abs(cx - rx - rw / 2)
   distY = abs(cy - ry - rh / 2)
   
   if distX > (rw / 2 + radius) then
      return false
   end if
   if distY > (rh / 2 + radius) then
      return false
   end if
   
   if distX <= rw / 2 then
      return true
   end if
   if distY < rh / 2 then
      return true
   end if

   dx = distX - rw / 2
   dy = distY - rh / 2

   return (dx * dx + dy * dy <= (radius * radius))
end function

I hope this helps....

J
Logic is the beginning of wisdom.

Offline johannhowitzer

  • Forum Regular
  • Posts: 118
    • View Profile
Re: QB64 Game Jam
« Reply #41 on: February 11, 2021, 04:52:26 am »
I'm going a bit loopy trying to deal with the can of worms that is my core mechanics for this game.  When someone says "antigravity," it might not be a good idea to add magnetism to that...

On the bright side, my game can handle sideways gravity too, if I want it to.
« Last Edit: February 11, 2021, 05:32:46 am by johannhowitzer »

Offline johannhowitzer

  • Forum Regular
  • Posts: 118
    • View Profile
Re: QB64 Game Jam
« Reply #42 on: February 11, 2021, 06:25:52 am »
Wow, this is bizarre.

Code: QB64: [Select]
  1. for n = 1 to node_count
  2.    if n > 1000 or node(n).parent > 1000 or p > 1000 then
  3.       print n, node(n).parent, p: _display: sleep
  4.    end if
  5.    if node(n).i = i and node(node(n).parent).i = node(p).i then exit sub
  6.  

I dim'd node(1000) in the header.  Somehow I'm getting a subscript out of range on line 5, and I'm never seeing anything printed to the screen by line 3.  Which means n, node(n).parent, and p are all <= 1000, thus valid subscripts for node()...

Think I'm giving up for tonight, this seems like a hard logical impossibility and I'm up around 2500 lines of code already.  This bug was uncovered by my fixing an infinite loop bug caused by recursively creating infinite back and forth nodes.
« Last Edit: February 11, 2021, 06:27:38 am by johannhowitzer »

FellippeHeitor

  • Guest
Re: QB64 Game Jam
« Reply #43 on: February 11, 2021, 06:27:17 am »
if you ever REDIM that array, make sure to repeat AS type.

Offline johannhowitzer

  • Forum Regular
  • Posts: 118
    • View Profile
Re: QB64 Game Jam
« Reply #44 on: February 11, 2021, 06:28:41 am »
I don't have a single redim in my code.  I generally don't use redim at all, though that's probably not ideal practice.

EDIT: During convo on Discord, I found the problem.  The first node in every search tree has a parent value of -1 to prevent being deleted when my "missing parent" cleanup runs.  So I just changed this duplicate check loop to start iterating at 2 instead of 1.  Only node(1).parent is manually set to -1, and node removal only collapses values to lower subscripts, so that -1 parent value can't ever escape node(1).  I've made this mistake before, in my main game project!
« Last Edit: February 11, 2021, 06:45:16 am by johannhowitzer »