Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
11 crawler(s) on-line.
 128 guest(s) on-line.
 1 member(s) on-line.


 A1200

You are an anonymous user.
Register Now!
 A1200:  3 mins ago
 OlafS25:  17 mins ago
 outlawal2:  37 mins ago
 AndreasM:  40 mins ago
 sibbi:  49 mins ago
 saimo:  1 hr 3 mins ago
 DiscreetFX:  1 hr 4 mins ago
 vox:  1 hr 16 mins ago
 kolla:  1 hr 26 mins ago
 Mr_DBUG:  1 hr 27 mins ago

/  Forum Index
   /  Amiga Development
      /  GLFX & Hasteroids
Register To Post

PosterThread
Allanon 
GLFX & Hasteroids
Posted on 15-May-2018 10:24:17
#1 ]
Regular Member
Joined: 28-Jan-2009
Posts: 136
From: Unknown

Some time ago I released a news about my work on a OpenGL library using Hollywood & GLGalore plugin, it's a game oriented library aimed to help coders to develop their games with a bunch of handy tools, functions, objects and methods.

For people interested in the original news here is the link with more details about this project.

I'd like to share with you how the development proceed :)

The library is at a good 80% and seems very stable, recently I've fixed an issue raised running my demo game called Hasteroids on MorphOS, I have discovered that texture sizes must be power of two and seems that's true also on AmigaOS3 & AmigaOS4 systems (thank to all people that have helped to fix this!).

So I've patched my library to handle this case even if the coder passes textures in not allowed sizes, this help to code multiplatform games without adjusting a single line of code (which is my second goal).

Here is the latest released video on YouTube about Hasteroids & GLFX : https://www.youtube.com/watch?v=SfgZAJY9h0g

Soon I will publish a new video because of these recent changes:

GLFX Library
> Added GLFX:SceneIsQueued(sceneName) to check if a delayed scene change has bee already queued.
> Fixed GLFX:ChangeScene() so that the current scene will be uninialized only when the delay has been reached, and not when it is queued for the change.

HASTEROIDS (demo game)
> Changed the code so that, when the last player ship explodes objects on screen are kept in movement and the ship explosion is showed before switching to the Game Over scene.
> When a level is completed a new level will come in few seconds (configurable). The level text is animated when it is updated.

When the library will be completed will be released for free with the demo game included, however I accept donations or support on Patreon :)

Feel free to ask if you have questions

Happy Coding!

EDIT:
I'm also looking for a graphic for the final game since the graphics used is not mine but comes from the Internet :)

Last edited by Allanon on 15-May-2018 at 10:31 AM.

_________________
-----
[Allanon] Fabio Falcucci
AMC Website // Docs Site // Support Forum // => Patreon <=

 Status: Offline
Profile     Report this post  
klx300r 
Re: GLFX & Hasteroids
Posted on 16-May-2018 2:45:55
#2 ]
Elite Member
Joined: 4-Mar-2008
Posts: 3833
From: Toronto, Canada

@Allanon

that looks great Fab! & thanks for the AmiCloud work you do as it's much appreciated

_________________
____________________________
c64-2sids, A1000, A1200T-060@50(finally working!),A4000-CSMKIII
! My Master Miggies- Amiga 1000 & AmigaOne X1000 !
mancave-ramblings
X1000 I BELIEVE

 Status: Offline
Profile     Report this post  
arthoropod 
Re: GLFX & Hasteroids
Posted on 16-May-2018 13:51:00
#3 ]
Member
Joined: 14-Feb-2018
Posts: 80
From: Gotham

@Allanon

That's really cool.
So your intent on the development package, is it to create something that can run across all the mentioned OS', or would each program created be specific to one platform?

The only reason I'm asking that is if we use the lowest common denominator, 68K code, which all three OS' can run, we might be able to create something that could facilitate cross platform game development.

 Status: Offline
Profile     Report this post  
Allanon 
Re: GLFX & Hasteroids
Posted on 16-May-2018 14:30:51
#4 ]
Regular Member
Joined: 28-Jan-2009
Posts: 136
From: Unknown

@klx300r
Thank you! :)

@arthoropod
My goal is to create a library for Hollywood, which uses GLGalore (OpenGL), aimed to game development.
Once you have this library and Hollywood you will be able to compile for every platform supported by Hollywood (and GLGalore plugin) without changing a single line of code for a true crossplatform game development.

From a developer point of view you should be able to:
- Code your game in any environment you like most using Hollywood
- Compile for the target platforms you wish to release the game for
- Enjoy!

If you are interested and you need more details on the current development status of the library just ask :)

Here is an old video showing some features of my GLFX library:
https://www.youtube.com/watch?v=uMPc9Jiwh-c

_________________
-----
[Allanon] Fabio Falcucci
AMC Website // Docs Site // Support Forum // => Patreon <=

 Status: Offline
Profile     Report this post  
Allanon 
Re: GLFX & Hasteroids
Posted on 22-May-2018 9:07:31
#5 ]
Regular Member
Joined: 28-Jan-2009
Posts: 136
From: Unknown

Update :
- Added Inverted Particle Systems
- Added player ship respawn animation using an inverted particle system

Here is a video from the latest sources : https://www.youtube.com/watch?v=WO7oseq-R-4
Here is the complete post on Patreon : https://www.patreon.com/posts/hasteroids-glfx-18941602

Sources will be available for Patrons ASAP

_________________
-----
[Allanon] Fabio Falcucci
AMC Website // Docs Site // Support Forum // => Patreon <=

 Status: Offline
Profile     Report this post  
Hans 
Re: GLFX & Hasteroids
Posted on 24-May-2018 0:16:02
#6 ]
Elite Member
Joined: 27-Dec-2003
Posts: 5066
From: New Zealand

@Allanon

Looks like a great project. How easy do you think it is for people to write a simple game using your GLFX library?

Do you have anyone else using the framework to create games right now?

Hans

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project.
https://keasigmadelta.com/ - More of my work.

 Status: Offline
Profile     Report this post  
Allanon 
Re: GLFX & Hasteroids
Posted on 24-May-2018 14:56:28
#7 ]
Regular Member
Joined: 28-Jan-2009
Posts: 136
From: Unknown

@Hans

Thank you for the kind words!

I think I'm the only one, or at least me and the few supporters on Patreon where I'm sharing the soruces.

About easyness, I think it's quite easy if the coder is used to OOP, if you have looked at the demo video of the library (https://www.youtube.com/watch?v=uMPc9Jiwh-c), at 00:11, here is the code used :


; Create a new GLFX instance
Local fw = GLFX:New(
{ Display = 1,
Width = prefs.Width,
Height = Prefs.Height,
FlipSync = Prefs.FlipSync,
FPS = Prefs.FPS,
Title = "GLFX DEMO",
})

; Clean up things
fw:Init()

... ... ...

; Define the scene
Local scene03 = fw.Scene:New()
scene03:Setup(
{ ; SCENE NAME
Name = "03 Sprite / Clone",

; SCENE INITIALIZATION CALLBACK
; Load and setup the background and a single sprite that will be
; initially cloned 49 times.
Init =
Function(scene)
; Message for the stats screen
fw.UserMessage = "Hit + to add clones."
; Define resources
Local bgFile = "glfx_test/BG_800x600.jpg"
Local spriteFile = "glfx_test/small_planet.png"
; Define a new sprite engine
scene.SpriteEngine = fw.SpriteEngine:Create(fw)
scene.SpriteEngine:YSort_Set(False, False)
; Load and setup a static background
scene.Background = fw.Sprite:Load(bgFile, scene.SpriteEngine, { AnchorX = 0, AnchorY = 0 })
scene.Background:Resize(prefs.width, Nil, True)
; Create one sprite that will be cloned
scene.Sprites = {}
scene.Sprites[0] = fw.Sprite:Load(spriteFile, scene.SpriteEngine, { x = 512, y = 300, blendEnabled = True })
scene.Sprites[0]._Speed = RndF()
For Local i = 1 To 49
scene.Sprites[i] = scene.Sprites[0]:Clone({ x = Rnd(prefs.width-64), y = Rnd(prefs.height-64)})
scene.Sprites[i]._Speed = RndF()
Next
scene.clonesCount = 49
EndFunction,

; SCENE UNINITIALIZATION CALLBACK
; Simply destroy the sprite engine and all its resources
UnInit =
Function(scene) scene.SpriteEngine:Destroy() EndFunction,

; CLEAR SCENE CUSTOM CODE
Clear =
Function() EndFunction,

; SCENE RENDER CODE
; Draw all sprite engine's items
Render =
Function(scene)
scene.SpriteEngine:All_DrawUnorderedLayered()
EndFunction,

; SCENE UPDATE CODE
; Called before every render, here we update all our sprites manually
; and we check for keypresses.
; Updating the coordinates here, in this way, it's not a good idea because on
; slow systems the target FPS could be violated resulting in a wrong movement.
; A good way could be to use the :MoveTo() method or use directly a tween
; to move the objects. But this is just a simple example to show how GLFX works.
Update =
Function(scene)
; Check for th e + key
If IsKeyDown("+")
Local i = scene.clonesCount + 1
scene.Sprites[i] = scene.Sprites[0]:Clone({ x = Rnd(prefs.width-64), y = Rnd(prefs.height-64)})
scene.Sprites[i]._Speed = RndF()
scene.clonesCount = i
EndIf

; Updates all planet sprites
For _, s In IPairs(scene.Sprites) Do s:MoveRel(s._Speed, 0, True)

; Check for the ESCAPE key
checkESC()

EndFunction
}
)

; ADD THE SCENE TO THE FRAMEWORK
fw:AddScene(scene03)

... ... ...
; Switch to the starting scene
fw:ChangeScene("03 Sprite / Clone")

; Initialize the framework
fw:Init()

; Let's Rock!
fw:Start()



Once you have defined the scene it's all up to GLFX to keep updated, no OpenGL required from the coder.

An empty scene setup looks like this:

Local scene01 = fw.Scene:New()
scene01:Setup(
{ Name = "01 Scene Setup",
Init = Function() EndFunction,
UnInit = Function() EndFunction,
Clear = Function() EndFunction,
Render = Function() EndFunction,
Update = Function() checkESC() EndFunction })
fw:AddScene(scene01)


A simple game probably would require 3 scenes, one for the title screen, one for the gameplay and one for the game over screen.
GLFX supports transitions between scenes as you may have seen in the Hasteroids video, right now it supports two effects, one crossfade and one slide fx.

Basically you have to fill the empty functions with your code and game logics.
If you need more details just ask!

_________________
-----
[Allanon] Fabio Falcucci
AMC Website // Docs Site // Support Forum // => Patreon <=

 Status: Offline
Profile     Report this post  
Karlos 
Re: GLFX & Hasteroids
Posted on 27-May-2018 2:34:07
#8 ]
Elite Member
Joined: 24-Aug-2003
Posts: 4394
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition!

@Allanon

It looks great! You should call it Onsteroids

_________________
Doing stupid things for fun...

 Status: Offline
Profile     Report this post  
Allanon 
Re: GLFX & Hasteroids
Posted on 1-Jun-2018 22:12:22
#9 ]
Regular Member
Joined: 28-Jan-2009
Posts: 136
From: Unknown

@Karlos

Good idea! I could be the title of the final release :D

_________________
-----
[Allanon] Fabio Falcucci
AMC Website // Docs Site // Support Forum // => Patreon <=

 Status: Offline
Profile     Report this post  

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle