Jump to content


Xelostar

Member Since 05 Jun 2016
Offline Last Active Jun 19 2018 08:36 PM
*****

Topics I've Started

Get real time?

08 April 2018 - 01:12 PM

Hi. I know it's late, but I needed to do this myself just now and the link Lyqyd gave doesn't work for me.
I just used Google and it seems to work fine, though it's sketchy, I thought I'd share my code for the people who want to have the real time as well and stumble upon this thread using Google or something =P

function getRealTime()
	local page = http.get("http://www.google.nl/search?&q=time")
	local raw = page:readAll()
	local raw2 = ""
	for a in raw:gmatch(">%d?%d:%d%d</div>") do raw2 = a end
	local time = ""
	for a in raw2:gmatch("%d?%d:%d%d") do time = a end
	return time
end

[Split from here. -L]

3D rendered randomly generated mountains

21 March 2018 - 04:59 PM

I was playing around with an update for my 3D rendering API which I was working on. I decided to test some 3D terrain generation with some noise and I made some screenshots of mountains. I thought I'd share them, because they might look nice as backgrounds =)

Posted Image

Posted Image

Doom - CC's first 3D FPS (with online highscores)

17 February 2018 - 02:24 PM

Hello everyone! Today I present to you:


Posted Image


Small update:
  • Gun bobbing added
  • Death animation

It has 3D rendering using my 3D rendering API:
http://www.computerc...5-finally-here/

Summary:
  • There are two types of enemies.
  • Normal mode and endless mode.
  • Online highscores
  • Installer
Controlls:
  • WASD for walking
  • Arrows for looking
  • Spacebar for shooting
How to install:
Run the following command
pastebin run 6BcdRV75

For the old version:
Spoiler

If you have LDDestroier's STD installed you can also run
std ld ccdoom
The game is on STD-GUI too




Special thanks to LDDestroier!


Buffer API

03 February 2018 - 02:29 PM

Hello there,
Today I've got my buffer API to how you. It's fairly simple to use:


Posted Image
Posted Image

Code (for copying):
Spoiler

Download:
https://pastebin.com/qU2pf0jy
Or type the following into the CraftOS shell:
pastebin get qU2pf0jy bufferAPI


Let me know if you have any questions.

- Resolved - 3D Rendering Optimization (polygon facing direction)

01 September 2017 - 01:20 PM

So, I've been working on a 3D renderer:
http://www.computerc...-rendering-api/
http://www.computerc...48-3d-renderer/

Here's a GIF (Real time ; Not sped up):
Posted Image

I'd like to optimize the performance by not rendering as many polygons, because the lag starts kicking in as soon as more polygons are rendered. Bomb Bloke recommended that I should only render polygons if they are facing towards the camera.

Does anyone know how I can pull this off? Do I need to save the "front" of a polygon inside the model file? How do I detect which way it is from the camera?

For example:
local cameraX
local cameraY -- Y is the height just like in MC
local cameraZ
local model = {
  {x1 = ..., y1 = ..., z1 = ..., x2 = ..., y2 = ..., z2 = ..., x3 = ..., y3 = ..., z3 = ..., color = ...}; -- This is one of the vertices in the model
  {x1 = ..., y1 = ..., z1 = ..., x2 = ..., y2 = ..., z2 = ..., x3 = ..., y3 = ..., z3 = ..., color = ...};
  {x1 = ..., y1 = ..., z1 = ..., x2 = ..., y2 = ..., z2 = ..., x3 = ..., y3 = ..., z3 = ..., color = ...};
  {x1 = ..., y1 = ..., z1 = ..., x2 = ..., y2 = ..., z2 = ..., x3 = ..., y3 = ..., z3 = ..., color = ...};
}

An object can be loaded at oX, oY, oZ with one of the loaded models.