Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 754
» Latest member: diehard70
» Forum threads: 266
» Forum posts: 1,908

Full Statistics

Online Users
There are currently 63 online users.
» 0 Member(s) | 62 Guest(s)
Google

Latest Threads
lag in games.
Forum: Questions and discussions
Last Post: johnno1956
1 hour ago
» Replies: 3
» Views: 34
Another match-3 game
Forum: N7
Last Post: Marcus
01-25-2023, 08:30 PM
» Replies: 3
» Views: 98
NaaLaa or BlitzMax?
Forum: Local pub
Last Post: johnno1956
01-24-2023, 09:45 PM
» Replies: 7
» Views: 355
Just in case...
Forum: Questions and discussions
Last Post: johnno1956
01-09-2023, 09:43 PM
» Replies: 6
» Views: 481
2023
Forum: Local pub
Last Post: hiuwai
01-05-2023, 09:39 AM
» Replies: 5
» Views: 307
ScoreFour (board game)
Forum: N7
Last Post: Rick3137
12-16-2022, 10:17 PM
» Replies: 9
» Views: 738
Tiny Basic interpreter, w...
Forum: N7
Last Post: Marcus
12-11-2022, 01:34 PM
» Replies: 18
» Views: 2,610
NGUI
Forum: N7
Last Post: Marcus
11-26-2022, 08:24 AM
» Replies: 5
» Views: 752
My game MEGA-BOMBER!!
Forum: Local pub
Last Post: Marcus
11-19-2022, 03:41 PM
» Replies: 3
» Views: 611
Database
Forum: Questions and discussions
Last Post: Marcus
11-19-2022, 06:47 AM
» Replies: 4
» Views: 618

 
  lag in games.
Posted by: luigui - 01-25-2023, 05:09 PM - Forum: Questions and discussions - Replies (3)

Good Morning,
I've been following this forum for a long time because I like the naalaa engine, although I've always had a doubt about it and hoped that a new version of the compiler would rectify the problem that's happening to me.
Simply when I run any example, I notice that from time to time there are frame jumps and it is visually appreciated. I don't know if it is because a powerful computer is required to solve such a problem or there is a command that solves this.

I hope that naalaa continues to improve day by day.

All the best.

Print this item

  Another match-3 game
Posted by: Marcus - 01-22-2023, 12:09 PM - Forum: N7 - Replies (3)

I found some nice assets for a Candy Crush-style game on opengameart and implemented the basics. Several games of this kind has been posted before, but I believe non of them uses the swap-pieces-controls?

[Image: match3.jpg]



Attached Files
.zip   match3.zip (Size: 1.3 MB / Downloads: 5)
Print this item

  NaaLaa or BlitzMax?
Posted by: hiuwai - 01-05-2023, 10:53 AM - Forum: Local pub - Replies (7)

Someone's question.
https://itch.io/jam/jam-for-all-basic-di...and-naalaa

If the contestant(bul71) selects to use NaaLaa, it will be very wonderful! Smile

Print this item

  2023
Posted by: johnno1956 - 01-01-2023, 10:53 AM - Forum: Local pub - Replies (5)

HAPPY NEW YEAR, GUYS!!!

I hope that this new year will be an even better one for all of you!!!

J

Print this item

  ScoreFour (board game)
Posted by: Rick3137 - 12-12-2022, 04:37 PM - Forum: N7 - Replies (9)

This is the n7 version of the n6 game of the same name.

 I did not translate. It was more interesting to start from scratch.



Attached Files
.zip   ScoreFour.zip (Size: 507.42 KB / Downloads: 5)
Print this item

  Just in case...
Posted by: johnno1956 - 12-10-2022, 08:28 PM - Forum: Questions and discussions - Replies (6)

I am going to get in early, just in case I may forget, to wish everyone a safe and happy Xmas and New Year...  (insert celebratory sounds and emoji's here...)  All the best!!!  Big Grin

Print this item

  NGUI
Posted by: Marcus - 11-19-2022, 07:01 AM - Forum: N7 - Replies (5)

NED, Tilemap Editor and NGUI Theme Editor were written in n7 using the ngui library. I just added the "widgets" and "containers" that I needed to this library as I created the editors. It may be hard to use if you've never worked with other gui libraries like IUP, Swing or WPF. But the principle is that you use containers to arrange widgets in different ways, you never position anything using exact coordinates. The library responds to window size changes by rearranging and resizing the containers and widgets. You can find the n7 source code of ngui in the N7/lib folder.

Here's a first example that creates some menus and labels.

Code:
' NGUI - Menus
' ------------

#win32

' This library is really large, so including it increases the compile time quite a bit.
include "ngui.n7"

' These will be explained later.
visible fruitLabel, gameLabel

' Create a resizable window.
set window "NGUI - Menus", 640, 480, false, 0
set redraw off

' Ngui uses containers to arrange widgets in different ways. The containers are widgets too.
' Every window needs a root widget, and it's usually a container. Here I create a vbox (vertical
' box), that aranges its children vertically. This will be the root widget of the window.
windowRoot = VBox(SIZE_EXPAND, SIZE_EXPAND)


' A menubar contains one or more menus. A menu has a title, like "File", and a bunch of children,
' like "Open", "Save" and "Save as".
'  Create a menubar and add it to windowRoot.
menuBar = MenuBar()
windowRoot.Add(menuBar)

' Create a menu. The parameter is a function that will be called every time the user selects
' something in the menu. The function FruitMenuCallback is defined later in this program.
fruitMenu = Menu(FruitMenuCallback)
' Add some items to fruitMenu. The second parameter can be used to display something to the right
' of a menu item, usually a keyboard shortcut such as "Ctrl+N", but let's just skip that.
fruitMenu.Add("Banana", unset)
fruitMenu.Add("Apple", unset)
fruitMenu.Add("Pear", unset)
' Add fruitMenu to menuBar, the first parameter is the menu title.
menuBar.Add("Fruits", fruitMenu)

' Create another menu with another callback function.
gameMenu = Menu(GameMenuCallback)
gameMenu.Add("Crap's Adventure", unset)
gameMenu.Add("Bulb Boy", unset)
gameMenu.Add("Farmer Man", unset)
gameMenu.Add("Robowack", unset)
menuBar.Add("Games", gameMenu)


' Create another vbox and add it to the root.
vbox = VBox(SIZE_EXPAND, SIZE_EXPAND)
windowRoot.Add(vbox)
' Make this vbox center its children.
vbox.SetHalign(ALIGN_CENTER)
vbox.SetValign(ALIGN_CENTER)
' Add some text widgets to the vbox
vbox.Add(Header("Menus are super fun!", SIZE_AUTO, SIZE_AUTO))
vbox.Add(Label("Select stuff in the menus and things will happen", SIZE_AUTO, SIZE_AUTO))
' Add a filler, just empty space, of height 16.
vbox.Add(Filler(SIZE_AUTO, 16))
' Add two more labels, that will be modified from the menu callback functions.
fruitLabel = Label("No fruit selected", SIZE_AUTO, SIZE_AUTO)
gameLabel = Label("No game selected", SIZE_AUTO, SIZE_AUTO)
vbox.Add(fruitLabel)
vbox.Add(gameLabel)


' Enter main loop with windowRoot as root widget. From here on all action goes through the callback
' functions.
EnterMainLoop(windowRoot)


' Callback function for the fruit menu.
function FruitMenuCallback(menu, index)
    select index
        case 0  fruitLabel.SetText("I know how to spell banananananana but not when to quit")
        case 1  fruitLabel.SetText("APPLE!!!")
        case 2  fruitLabel.SetText("I don't remember what the third fruit was, sorry ...")
        default  fruitLabel.SetText("Undefined fruit encountered")
    endsel
endfunc

' Callback function for the game menu.
function GameMenuCallback(menu, index)
    select index
        case 0, 1  gameLabel.SetText("You selected a platform game")
        case 2  gameLabel.SetText("You selected a pacman clone")
        case 3  gameLabel.SetText("You selected a first person shooter")
    endsel
endfunc



Attached Files
.n7   menus.n7 (Size: 3.31 KB / Downloads: 4)
Print this item

  Database
Posted by: johnno1956 - 11-18-2022, 08:33 AM - Forum: Questions and discussions - Replies (4)

Quick question.

Does anyone have instructions on creating a simple database application using Naalaa? As I have to record my blood sugars on a daily basis, I figured that rather than using N7 for just games, why not try to create a practical application?

LibreOffice has a builtin DB application... but where is the fun in that? lol

Any suggestions or advice would be appreciated.

Thank you.

J

Print this item

  My game MEGA-BOMBER!!
Posted by: luigui - 11-16-2022, 08:18 AM - Forum: Local pub - Replies (3)

Hello,
Some time ago I programmed a videogame in another language but not even the Pope in Rome knows it XD. I can provide code, I would pass it on to Naalaa, but I still haven't studied this language in depth.
The game is very simple, you just have to press the z key. When you get ten hits in a row, you throw a mega bomb that completely destroys the building. If you miss, be careful, increase the speed! until after a clock time... If you pass several levels, you enter the records panel and it looks like it's celebrated XD!!

Be careful if you fail, the speed will increase and the plane will end up shot down!!
A fan of the mythical amstrad computer

All the best
https://www.divgo.net/proyectos/mega-bomber/index.html

Print this item

  Bubble Universe
Posted by: Marcus - 11-14-2022, 06:18 PM - Forum: N7 - Replies (8)

Paul Dunn posted a cool program for SpecBAS in the BASIC Programming Language facebook group. I just had to rewrite it in n7.

The original source code can be found here: https://github.com/ZXDunny/SpecBAS-Demos...e_universe

Code:
' Bubble universe
' ---------------
' Paul Dunn posted this code but for SpecBAS in a facebook group. It looked so cool that I had to
' rewrite it in n7.

constant TAU = 6.283185307179586

set window "Bubble universe", 512, 512
set redraw off

n = 200; r = TAU/235
x = 0; y = 0;
v = 0; t = 0;
hw = width(primary)/2; hh = height(primary)/2

while not keydown(KEY_ESCAPE)
    set color 0, 0, 0
    cls
    for i = 0 to n  for j = 0 to n
        u = sin(i + v) + sin(r*i + x)
        v = cos(i + v) + cos(r*i + x)
        x = u + t
        set color i, j, 99
        set pixel hw + u*hw*0.4, hh + v*hh*0.4
    next
    t = t + 0.025
   
    set caret hw, 4
    set color 255, 255, 255
    center "Press esc to exit ..."
   
    fwait 60
    redraw
wend

Print this item