Categories
Mastering Development

Unity2D – How to move and rotate particle system around a circle?

I’m trying to instantiate a rain particle system to follow a circular path. The clouds rotate and move around a circular planet perfectly fine. The problem arises when the particle system is instantiated, it almost never has the correct rotation, no matter where it is spawned. I tried making the particles a child of the […]

Categories
Development Game Creation

How do I initialise levels sequentially?

I have been learning opengl and I have made good progress over past few months. However I still struggle to understand game logic in C++, I am new to C++ too. Say I have this program. #include <headers> int main() { #Step 1 VAO_VBO_EBO_inits(); while(!glfwWindowShouldClose(window)) { glClearColor(.2f, .2f, .3f, 1.f); glClear(GL_COLOR_BUFFER_BIT); #Step 2 DrawCalss(); glfwPollEvents(); […]

Categories
Development Game Creation

What is Unity Quaternion range?

I’ve read somewhere that a Quaternion in Unity ranges between [-1,1] values. I mean the individual XYZW values. Ex: new Quaternion(.1f,.2f,-.3f,-.4f) Is this true? More clearly: I know they take float values therefore the theoretical limit is floating point value limitations, I’m asking the real rotation results. For instance when I look up Quaternion values […]

Categories
Development

Code Error. The modifier public is not valid. Why?

I am making a 2D game in Unity and am trying to make my moveable character stop every time dialogue appears on screen. I am using the Fungus extension for my dialogue as I’m a newbie to coding. Every thing I try however I run in to problems. My current issue is that the modifier […]

Categories
Development

String to ASCII Hex splitting in C

I am using C in Labwindows CVI 8.5. I need to convert the float to ASCII Hex: #include <stdio.h> #include <string.h> int main () { char K_char[20], K_ASCII[20]; int a = 30; //30 degree Celsius int i, len ; float k = a + 273.15; //Temperature Celsius to Kelvin sprintf(K_char, “%.2f”, k); //Temperature K convert […]

Categories
Development

An incomprehensible error appears at startup

Sorry for my English. I’m beginner in OpenglES. I wrote this code to draw simple table for airhockey. The code was taken from book OpenglES2 for Android and i’m a bit to modified it. When i launched my app, it’s crashed. Wherein do not appear an errors. The code from ShaderHandler.java public class ShaderHandler { […]

Categories
Development

OpenGL ES3 displays blank screen, but compiles fine

I can’t seem to get my vertex data to display on my GLSurfaceView, but everything renders fine. I am familiar with basic OpenGL but I am new to OpenGL ES 2/3 and GLSL, so I figure I am missing something obvious. I have refactored my app a number of times to resolve context and syntax […]

Categories
Development

My super is not working even though I think its set up right

I’m doing an assignment for school and im implementing a super but its not working yet i feel its done right. anyone have any idea why my super gives me a syntax error. It tells me “The Constructor Employee(String, String, String) is undefined yet it is though. Here’s my employee class that my other classes […]

Categories
Development

Why can my first_pay not be defined? My second_pay works fine

The goal here is to calculate a salesperson’s total pay for selling two vehicles, each one of any type. When they sell a new vehicle, they make $1,500. When they sell a used vehicle, they make a commission of 5% of the vehicle price. I have to make it prompt the salesperson to enter the […]

Categories
Development

Calculating Tuition Cost Increase Over 5 Years

Still very new to Python programming and learning the basics, any help is greatly appreciated. #Define Variables # x= starting tuition # y= tuition increae per year # z = new tuition #List known Variables cost = int(25000) increase = float(.025) #Calculate the tuiton increase tuition = cost * increase #Calculate the cost increase over […]