AGK2 vs Pure Basic

Started by Pfaber11, April 28, 2019, 13:41:05

Previous topic - Next topic

Pfaber11

I think it's a case of the grass is always greener . really not enjoying my time with pure basic so far and will probably ditch it shortly . Nothing I try seems to work. I actually got on way better with blitz3d where everything I typed more or less worked . I think what I need is a faster computer maybe . But yes you're right why swap when I Know quite a bit of AGK. By no means mastered it though . Right that's it gonna free up some space on my hard drive . The pure basic is going back.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

I think what I'm after is a computer language which compiles to machine code is current and I get along with . unfortunately pure basic is not it . AGK2 comes close but I would like the machine code . On this computer as it is I'm lucky to get 30 frames per second But I realise that's down to the computer. I'm looking for the holy grail eg AGK2  with machine code. Nothing out there seems to fit the bill at the moment. A nice universal language.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

GaborD

#62
Why are you so set on the machine code compiling? I have argued this before, sorry for bringing it up again, but for usual games it barely makes a difference, your bottleneck is almost always rendering and not the execution of the game code itself.
The engine is doing all the heavy lifting (object management, input handling, playing sounds, scene management, 3D transformations, pushing data to the GPU, etc) and it already runs in machine code.

Machine code compiling only improves the execution speed of your own bit of game logic code, which is generally a tiny tiny fraction of the overall performance.
That used to be different in the older do it all yourself days where you were blitting stuff manually and whatnot. Nowadays, you barely do anything in the game code, you are essentially just scripting the engine, which already runs in optimized code for the platform. (well, hopefully haha).

Caveat: Are you doing heavy simulations? Then it's understandable and you can forget what I said. In that case tier2 or running them on the GPU might indeed be necessary.

Sorry for sounding nitpicky, just trying to understand why you seem unhappy with the performance aspect of a quite performant engine. The only one that was as performant as AGK in my tests was NB, assuming you tweak them both a bit. Nothing else ever came close for me.

In the end, most modern engines are similar and use fully shader based rendering, if you find something that suits your workflows and feels good syntax-wise, I would say stick with it, that's worth much more than a few percent performance here or there.


plenatus

@pfaber: what are your hardware specs?

RemiD

#64
@Pfaber>>
consider what Gabor said... seeing his renders, he must have done many many experiments and measuring procedures / rendering speeds.

imo, choose a language / engine and stick with it until your understanding becomes so good that when you think about a new game / tool to make, the language is not an issue anymore, you just have to mix reusable procedures / systems (that you have created in the past) and a few new procedures specific to your project, and the progress is fast !!! 8)

about rendering time, often it is because you render carelessely everything, so take a look at hidden surfaces determination and culling... or for your level, simplify your meshes / textures... (=less surfaces, less vertices and triangles, less texels)

Pfaber11

Yes gonna stick with AGK for the time being until as you say I think of a program and know how to accomplish the desired result straight away. More or less.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

Hi coder9 my system specs are 1.6 ghz duel processor 4 gigs ram 32gb storage and HD400 graphics. Nothing to get excited about . I have a desktop but my son has taken it over and it is now described as his computer. I really didn't think this machine would handle 3d graphics at all but runs my programs at about the same speed as my phone . Definitely playable.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

GaborD

Really good challenge to develop 3D games for that hardware.
Blitz / Max / AGK should all be up to it, you just need to optimize the heck out of things, which is the fun part anyway.

Pfaber11

yes my games might not be that great but they're not bad . They are designed to run at 30 fps although I only get about 20 on my laptop but even so they're playable. Gonna be a while until I get a new one and intend to buy new when I do as mine's in use constantly .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

Good morning .  Ran into a problem when putting an Image or text on the screen in PB. Basically the transparency isn't working and I have a black rectangle around my image . I'm gonna post some code here so you can see where I'm at . I'll include the plane.png file as well . Anybody know how to sort this . I'm on day three of learning PB and think I'm doing ok so far . Maybe I should be using sprites or something . InitSprite()
UsePNGImageDecoder()
InitKeyboard()
OpenWindow(0,0,0,1366,768,"Paul's program! Press Return To Exit!")
OpenWindowedScreen(WindowID(0),0,0,1366,768)
SetWindowColor(0,#Black)
ClearScreen(#Black)
x = -179
y = 400
pf = LoadImage(1,"plane.png")

  Loopy:
 
 
  StartDrawing(WindowOutput(0))
  DrawText(10,10,"hello world")

  DrawImage(pf,x,y)
  x=x+10
  If x >= 1366
    x= -179
    EndIf
    StopDrawing()
    FlipBuffers()
  WindowEvent()
  ExamineKeyboard()
  If  KeyboardPushed(#PB_Key_Return)
    End
  EndIf
  If  KeyboardPushed(#PB_Key_W)
    y=y-10
  EndIf
 
   If  KeyboardPushed(#PB_Key_S)
    y=y+10
  EndIf
Goto loopy

HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

#70
As you can see the transparency works fine on the page above but when I put it into my program it loses it's transparency . Hope I'm not being a pain In  the arse . Thanks for reading . Happy coding .
Sorry for posting this here thought I was in the other forum. !!!
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Steve Elliott

I don't currently have Pure BASIC installed any longer, but a quick look through some old code and I noticed this line with an alpha blending flag:


Name = LoadSprite( #Any, File, #PB_Sprite_AlphaBlending )
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Pfaber11

Thanks Steve gonna try it out .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

#73
Steve you are magic it worked . Really feel like I'm making progress now . collisions next . What did you think of PB steve ?
What I've decided is to learn a few new things a day . I was overwhelmed with PB at first but am getting into it now and it's only going to get easier(I hope) the more I learn . Anyway thanks for your input .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Steve Elliott

You're welcome, glad it worked for you!

What I liked about Pure BASIC is it's very fast and produces a small exe.  You can produce application software with it (Windows, menus and such) as well as games.  What I didn't like was the very wordy syntax, like DisplayTransparentSprite(), old fashioned syntax with having to use StartDrawing and StopDrawing blocks and it's Windows only.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb