Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
programming is ace
User Banned
Posted: 14th Apr 2017 23:42
Just downloaded and used and struggling at first step.

I loading a sprite and move with a mouse.

stuck!!

All I know is loadimage at moment

Anyone
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Apr 2017 07:42
Welcome
There are lots of demo programs installed for you to learn the basics.
They are usually found in:

C:\Users\<USERNAME>\AppData\Local\AGK Projects
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
programming is ace
User Banned
Posted: 15th Apr 2017 20:34
I like to get into 3D so here is something ive knocked up today



Hopefully more substantial later in the year

Enjoy
programming is ace
User Banned
Posted: 16th Apr 2017 16:17
Added a lot more



The buttons don't work, but its work in progress - all the key press options work though - best to use it 1024x768 resolutions of higher for nicer effect

Shall send more in about a month time after further development

Happy Easter

programming is ace
User Banned
Posted: 16th Apr 2017 17:44
That last entry had a fault in it

This one as player focus and the last added object




programming is ace
User Banned
Posted: 16th Apr 2017 18:19
A fixed set parameter skybox added - which I will make this editor customizable.



Add more in a few week

Enjoy for the time being
programming is ace
User Banned
Posted: 17th Apr 2017 13:58
This is just an example of what potentially could do with my new 3D engine

- Extract contents of the zip file

- Open and Run

Will be a football pitch shown hopefully on the main plane - all used is a football pitch texture and applied.

- Add a ball/sphere by pressing 2 - with a ball texture

- Move the ball with cursors.

Plus all the other functions available in the menus

Enjoy

Attachments

Login to view attachments
programming is ace
User Banned
Posted: 20th Apr 2017 18:00
Hello

Just curious if anyone has ever tried doing a terrain generator working on a plane with createobjectplane()

where can

- Choose randomized points on the plane

- lift those x#, z# points with a height on the y#,

- join them up onto the plane at ground 0 somehow - maybe a multitude of objects creating the feel of the height.

or is this method totally incorrect or cpu/gpu intensive.



PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 20th Apr 2017 18:09
You mean something like that, but randomly generated?

https://www.youtube.com/watch?v=sPas66EHpco
PSY LABS Games
Coders don't die, they just gosub without return
programming is ace
User Banned
Posted: 20th Apr 2017 18:15
Perfect... Exactly like that...

PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 20th Apr 2017 18:17
That's definitely possible
PSY LABS Games
Coders don't die, they just gosub without return
programming is ace
User Banned
Posted: 20th Apr 2017 18:23
Thanks, as you confirmed it is do-able... I shall look deeper into it.

I just didn't want to spend 1 month trying to achieve something that's not do-able

Cheers

PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 20th Apr 2017 18:28
Have a look at this to get the idea of a basic approach:

http://www.playfuljs.com/realistic-terrain-in-130-lines/
PSY LABS Games
Coders don't die, they just gosub without return
programming is ace
User Banned
Posted: 20th Apr 2017 19:55
Hmmmm - Using a plane already created - eg createobjectplane(plane, 64,64)

Pre-work.
- Create a gray scale height map image (64x64) PNG - best to use gradient gray scale blobs here and everywhere In the picture.

Pre-MainLoop

- Process a heightmap in a 64x64 array with values depending on the colors on the gray scale... 0 is ground, 255 is the highest of a mountain say..

- On the plane, calculate intersecting / dividing lines horizontally and vertically or maybe diagonally too.

[Main loop processing]

- where there is a intersection point of the lines and depending on the value in the hightmap array, use drawlines to join intersection x#, height, z# values up

- Use a fill mechanism to fill in a color or gradient color of a mountain / snowy / high ground etc

- Sync()

[End main loop processing]


https://www.youtube.com/watch?v=istvTrLR4J4

PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 20th Apr 2017 20:25
Or create a mesh from memblocks
PSY LABS Games
Coders don't die, they just gosub without return
programming is ace
User Banned
Posted: 20th Apr 2017 20:33
Mesh! who would have thought of that..Only the experienced that's has used these set of commands - makes sense(as it is a mesh.

Some heavy researching this weekend on these commands, to have a go at it at least


Cheers @Psy for you inputs
PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 20th Apr 2017 20:34
welcome
PSY LABS Games
Coders don't die, they just gosub without return
programming is ace
User Banned
Posted: 22nd Apr 2017 12:23
After checking, we cannot create different sides of an object with different colours or apply textures

I.E. createobjectcube and setting image - will place a texture all over the cube.


So if any of you interested, I will over this weekend, I write a function to be able to create our own cube, which will build it using 6 planes, to allow each and every side of it to have a different color or texture.

Shall post Sunday night

programming is ace
User Banned
Posted: 22nd Apr 2017 15:23
This should do it..



Only done colors so far, but it will work with individual plane textures.

Like a TNT box!!!

programming is ace
User Banned
Posted: 22nd Apr 2017 16:08 Edited at: 22nd Apr 2017 16:11
Optimised



Dec / Inc Vertices variable

Youll get the idea
PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 22nd Apr 2017 16:23
Nice,

reminds me of QBERT
PSY LABS Games
Coders don't die, they just gosub without return
programming is ace
User Banned
Posted: 22nd Apr 2017 18:41
Thanks, now we can join objects together.

I might do an object builder editor inside this 3D engine project I'm wanting to achieve.

so we not just solely using cubes, cones, cylinders, spheres as individual objects.

Surely we can

- use each individual object here more than once in one model

- attach them all to 1 object,

- texture it them to make more primitive shapes and models

- Use them inside the engine

OK we could use Blender and such like, but that be too easy for us, but not for anyone who doesn't know programming and wants to create 3d games.

As I am wanting to create a D.I.Y 3D game editor as easy as 1 2 3, for someone with no modelling/programming required

That's the idea anyway
programming is ace
User Banned
Posted: 22nd Apr 2017 19:48
eg..



This is really good!!

programming is ace
User Banned
Posted: 22nd Apr 2017 20:20
eg.



anyway.... I'm only a beginner

programming is ace
User Banned
Posted: 23rd Apr 2017 11:02 Edited at: 23rd Apr 2017 11:04
Cannot do a 3D world without collision detection

so here is the start of mine



move mouse around to move main player / mouse object in a 3D environment

Just need to add rawkeypressed, to see if can pick up objects and move with the mouse then drop them at different location
programming is ace
User Banned
Posted: 23rd Apr 2017 11:29 Edited at: 23rd Apr 2017 11:32
an infinite loop of spheres heading towards you - soon as sphere goes out of view of the screen or been hit by the player then its repositioned in the depths of Z



Enjoy
programming is ace
User Banned
Posted: 23rd Apr 2017 11:56 Edited at: 23rd Apr 2017 11:57
A nice space game

Hit the spheres to increase their individual level, if miss any they will go out of existence.

try and reach maximum score by hitting the level up spheres

PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 23rd Apr 2017 15:02 Edited at: 23rd Apr 2017 15:03
Getting an array out of bounds @ this line SetObjectColor(balls[a].id, rgba(levels[balls[a].level],1),rgba(levels[balls[a].level],2),rgba(levels[balls[a].level],3),255)

You don't check if your levels array is getting out of bounds

probably need to change line 88 from inc balls[a].level to if balls[a].level < 5 then inc balls[a].level
PSY LABS Games
Coders don't die, they just gosub without return
programming is ace
User Banned
Posted: 23rd Apr 2017 15:12
I didn't write a full on game here, I just provided the priniciple of how it works.

programming is ace
User Banned
Posted: 23rd Apr 2017 17:59


Login to post a reply

Server time is: 2024-04-26 17:48:21
Your offset time is: 2024-04-26 17:48:21