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 - Cobalt

Pages: 1 [2] 3 4 ... 59
16
QB64 Discussion / Re: Nintendo Switch or Wii or 32k Atari 2600 support?
« on: February 20, 2022, 06:38:31 pm »
I'm just curious how impossible it would be to get QB64 to compile applications for these platforms?

Completely.

Most consoles have their own hardware architecture with custom assembly code for it. The only hope would be that the console ran on a C++ compatible architecture. And even that would leave a butt load of problems.

It would be simpler and quicker just to learn the base assembly and compile it for the console.

17
QB64 Discussion / Re: Why is my END IF tabbed(spaced) wrong?
« on: February 15, 2022, 01:20:19 pm »
That line confused the indenter.

  [ You are not allowed to view this attachment ]  

18
QB64 Discussion / Why is my END IF tabbed(spaced) wrong?
« on: February 15, 2022, 12:30:44 pm »
Everything else being spaced correctly why not this END IF? Both auto spacing and auto Indent is on. Can not recall ever seeing this before.
Pulled out just the code displaying the situation, and added the type and dims so there would be no errors stopping the auto format and it still happens. Through out the rest of the code all the other END IFs are spaced correctly, this is the only one.

Code: QB64: [Select]
  1. TYPE Offset_data
  2.     X AS INTEGER
  3.     Y AS INTEGER
  4.     Xs AS _BYTE
  5.     Ys AS _BYTE
  6.  
  7. DIM SHARED Layer(32) AS LONG, Sprites(64) AS Offset_data
  8. DIM SHARED DungeonMaps(9, 7, 3) AS _BYTE
  9. Game.Scale = 1
  10.  
  11. SUB Draw_Mini_Map
  12.     FOR y%% = 0 TO 3: FOR x%% = 0 TO 7
  13.         IF DungeonMaps(Link.Dungeon, x%%, y%%) THEN
  14.             _PUTIMAGE (16 + 8 * x%%, 16 + 8 * y%%)-STEP(Sprites(39 + DungeonMaps(Link.Dungeon, x%%, y%%)).Xs * Game.Scale, Sprites(39 + DungeonMaps(Link.Dungeon, x%%, y%%)).Ys * Game.Scale), Layer(9), Layer(1), (Sprites(39 + DungeonMaps(Link.Dungeon, x%%, y%%)).X, Sprites(39 + DungeonMaps(Link.Dungeon, x%%, y%%)).Y)-STEP(Sprites(39 + DungeonMaps(Link.Dungeon, x%%, y%%)).Xs * Game.Scale, Sprites(39 + DungeonMaps(Link.Dungeon, x%%, y%%)).Ys * Game.Scale)
  15.             END IF
  16.     NEXT x%%, y%%
  17.     _PUTIMAGE (14 + Link.World_X * 4, 16 + Link.World_Y * 4)-STEP(2, 2), Layer(9), Layer(1), (618, 126)-STEP(2, 2) 'Map location beacon
  18.  

  [ You are not allowed to view this attachment ]  

19
QB64 Discussion / Re: Just a Code Sample: EXIT SUB
« on: February 14, 2022, 10:58:19 am »
There was one big advantage to declaring a SUB up top: The actual Sub could then go anywhere in the code!

Declare Sub foo

CLS
PRINT "Hello";
foo
SUB foo
   COLOR 4 'Red color
END SUB
PRINT " World!"
END

Not exactly.
if you tried typing that in the QB45 IDE verbatim, you would receive an error;
  [ You are not allowed to view this attachment ]  

20
QB64 Discussion / Re: Possible issue with Select Case
« on: February 07, 2022, 05:41:27 pm »
I honestly don't think it works in such a manner.  I think the range has to be lowest to highest, for it to work.

CASE 11 TO 16   rather than 16 TO 11. 

Try reversing those limits and see if it fixes the issue.

Looks like your right, though why it cares?
perhaps I have gotten to used to be able to go high to low in things like LINE and _PUTIMAGE?
and it doesn't care if I CASE 16,15,14,13,12,11.
but what ever, found why there was an issue and resolved,
Thanks Steve.

21
QB64 Discussion / Possible issue with Select Case
« on: February 07, 2022, 04:52:48 pm »
Ran across this today, could some of you other guys test and confirm the issue?

You should get a beep, if not then there seems to be a problem with CASE # TO #

Found in current stable version, tested in latest DB(well a week old or so) same issue for me in both.

And YES the TO keyword is allowed and used in this manner. (see image)

Code: QB64: [Select]
  1. x%% = 15
  2.  CASE 16 TO 11 'full smoke
  3.   '    _PUTIMAGE (Objects(i%%).X, Objects(i%%).Y)-STEP(15, 15), Layer(7), Layer(10), (239 + 17 * 0, 1)-STEP(15, 15)
  4.   BEEP
  5.  CASE 10 TO 5 '2\3 smoke
  6.   '    _PUTIMAGE (Objects(i%%).X, Objects(i%%).Y)-STEP(15, 15), Layer(7), Layer(10), (239 + 17 * 1, 1)-STEP(15, 15)
  7.  CASE 4 TO 1 '1\3 smoke
  8.   '    _PUTIMAGE (Objects(i%%).X, Objects(i%%).Y)-STEP(15, 15), Layer(7), Layer(10), (239 + 17 * 2, 1)-STEP(15, 15)
  9.  CASE 0 'display object
  10.   Result%% = TRUE
  11.  

  [ You are not allowed to view this attachment ]  

22
QB64 Discussion / Re: Help with animated sprites
« on: February 01, 2022, 12:38:15 pm »
Maybe so, but I had to refrain from using RotoZoom ;-))

I am already accused of showing off :)
HA! I can't imagine why. XD

But yeah I think even your rotozoom takes a hit in the speed too, but then you are manipulating stuff which always takes time.
Unless its like a one off event in your program it might be better, performance-wise to pre-render the sprites at the final sizes and stuff. That's kind of what I was getting at.

Your Roto Zoom is pretty good though, A lot of times I just remake my sprite sheets at the correct size or even at run time pre-render the sprites on special image layers.

23
Programs / Re: Split Versus Tokenize
« on: February 01, 2022, 12:28:25 pm »
LOL

I will bet if we really need a speed bump for some app, we might have to resort to this stuff?

At that point its time to go to a non-translated language. If speed is needed to that point better start learning machine code and using ASM.

24
QB64 Discussion / Re: Help with animated sprites
« on: February 01, 2022, 11:45:51 am »
One thing to keep in mind when scaling sprites with _PUTIMAGE is that your program will take a performance hit. Scaling with putimage, for what ever reason, is roughly 10.5x-11x slower than just a normal run. So depending on how many times your using it you could find a speed issue showing up. Especially if your one of those misbegotten weirdos that think you need 120fps for your program.

Just something to keep in mind.

25
QB64 Discussion / Re: Why is an empty include file "not found"?
« on: January 27, 2022, 03:44:11 pm »
Try with the latest Dev build then, which is what I have. If it's an interaction with your OS then I won't be able to assess it immediately.
shoot, I uploaded the wrong image with the last post, same with the latest DB(just downloaded before I made the last post)
Happens on Win 10 as well.
  [ You are not allowed to view this attachment ]  

26
QB64 Discussion / Re: Why is an empty include file "not found"?
« on: January 27, 2022, 02:27:51 pm »
Well thats not it, with a clean IDE up no other code but what you have in your example and the error still arises.

  [ You are not allowed to view this attachment ]  

27
QB64 Discussion / Re: Why is an empty include file "not found"?
« on: January 27, 2022, 02:19:49 pm »
Oh. Let me play with it a little.. wonder if you need "Certain kind of" code before the include?  I'll try some variations..

28
QB64 Discussion / Re: Why is an empty include file "not found"?
« on: January 27, 2022, 01:45:08 pm »
Ah, gotcha.

29
QB64 Discussion / Re: Why is an empty include file "not found"?
« on: January 27, 2022, 01:37:29 pm »
Nope, it seems to append whatever line to the error.

Just hates an empty file for some reason.

Why should it care though?
 

30
QB64 Discussion / Why is an empty include file "not found"?
« on: January 27, 2022, 01:27:26 pm »
Was prepping my program to chuck some finalized SUBs into an include file and pre-made the include file and added the include line and it gave the error that the file was not found.

Whats the deal?

  [ You are not allowed to view this attachment ]  

Pages: 1 [2] 3 4 ... 59