Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 09:27:17 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)General thread for quick questions
Pages: 1 ... 15 16 [17] 18 19 ... 69
Print
Author Topic: General thread for quick questions  (Read 134662 times)
Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #320 on: October 08, 2015, 01:58:26 PM »

The surface pro should come with at least an Intel HD something GPU right?
Logged
ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #321 on: October 08, 2015, 02:01:38 PM »

Yeah but it's integrated to the CPU, though that might be enough to test things.
Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #322 on: October 08, 2015, 02:04:37 PM »

Intel HD GPUs should have drivers that support higher OpenGL versions, and it's still a GPU instead of a CPU.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #323 on: October 08, 2015, 02:13:32 PM »

Yeah surface pro should have something quite decent actually, it's not like you are on a voodoo card anymore. Even weak sauce like intel gma950 can handle the yesterday latest effects for the price of a slideshow
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #324 on: October 08, 2015, 02:19:45 PM »

This surface pro?
https://en.wikipedia.org/wiki/Surface_Pro

Then it more or less as powerful than a wii U

https://en.wikipedia.org/wiki/Intel_HD_and_Iris_Graphics
http://www.xbitlabs.com/articles/graphics/display/intel-hd-graphics-4000-2500.html

Arkham city run at 51fps at ~720p and 29fps at 1080p
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #325 on: October 08, 2015, 02:35:45 PM »

I have a surface pro 3 with an i5 intel processor on it. If it's around the performance of a WiiU then it's not very cost efficient lol (but not lol actually... Sad )

I runs most games slightly better than my old Alienware though, which is nice but not great. I do wish more games had touch screen support though, like FTL and such.

Anyways I'll see what I can whip up with OpenGL with it. Should be enough to test things out and see what works.
Logged

JWki
Level 4
****


View Profile
« Reply #326 on: October 08, 2015, 03:00:10 PM »

One quick thing about the immediate mode stuff - don't use that. Ever. I mean, it does get you something on screen somewhat faster than doing it properly, but using that API just does exactly the same thing you could do yourself using the newer API, just with more overhead, because that's how the GPU works these days.
If you're gonna go low level with OpenGL, do it the right way, if you're just trying to get something on screen as fast as possible then OpenGL isn't really what you should be looking at but rather something like SDLs 2D API or an engine.
Plus, it's not that complicated actually with the new API either. There's really no reason to hold yourself back with OpenGL 1.x or even 2.x, even with an Intel HD (but these have some unrelated issues with some OpenGL stuff so be prepared for that).
Logged
BBreakfast
Level 2
**



View Profile WWW
« Reply #327 on: October 08, 2015, 04:10:40 PM »

welp, sounds like it definitely does depend on the programmer and their personal preferences after all! i suppose i will leave this decision to whomever we decide to work with. thanks for taking the time to answer, fellas.  Tiger
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #328 on: October 08, 2015, 04:29:22 PM »

And thank you for letting me know there is a new rpgmk
Logged

ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #329 on: October 08, 2015, 07:35:41 PM »

JWki, I'm kind of split on this one... Using a VBO is definitely better than immediate mode, but OpenGL is so arcane that any barrier to having a working example that draws something visible can be the difference between being able to make progress, and being completely stuck. Every OpenGL programmer I know (myself included) goes through a period of debugging for every single new OpenGL project they start, where there's nothing but a black screen and they don't know why. Immediate mode and the fixed function pipeline are sometimes a useful debugging tool to find out if anything can be drawn, and since they have a lower barrier to entry, they can also be useful for getting started.

That said, it's definitely worth learning VBOs and shaders as early as possible and not bothering with the old stuff if you can avoid it, but I don't think it's always practical to avoid it. Understanding how immediate mode works is also useful if you find yourself in the position of maintaining old code that was never updated for another way of drawing.
Logged

TheLastBanana
Level 9
****



View Profile WWW
« Reply #330 on: October 08, 2015, 08:49:49 PM »

ProgramGamer, you mentioned earlier that you'd be interested in a wrapper that makes OpenGL easier to work with. Have you tried SFML? It has decent support for simple shapes and polygons, and its graphics components are ultimately just a wrapper for OpenGL -- if you want to hack at it and get into more complicated OpenGL functionality, it's still possible.
Logged
Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #331 on: October 08, 2015, 10:49:38 PM »

Every OpenGL programmer I know (myself included) goes through a period of debugging for every single new OpenGL project they start, where there's nothing but a black screen and they don't know why.

Oh god imagine how long this stage will be with vulkan.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #332 on: October 09, 2015, 06:30:24 AM »

JWki, I'm kind of split on this one... Using a VBO is definitely better than immediate mode, but OpenGL is so arcane that any barrier to having a working example that draws something visible can be the difference between being able to make progress, and being completely stuck. Every OpenGL programmer I know (myself included) goes through a period of debugging for every single new OpenGL project they start, where there's nothing but a black screen and they don't know why. Immediate mode and the fixed function pipeline are sometimes a useful debugging tool to find out if anything can be drawn, and since they have a lower barrier to entry, they can also be useful for getting started.

That said, it's definitely worth learning VBOs and shaders as early as possible and not bothering with the old stuff if you can avoid it, but I don't think it's always practical to avoid it. Understanding how immediate mode works is also useful if you find yourself in the position of maintaining old code that was never updated for another way of drawing.

This was my thinking. When you are starting out it can be frustrating to not know why nothing is showing up on screen.

Also immidiate mode operations can be sped up significantly using display lists.... Was it called display lists? It's been so long.

EDIT : yes, it's called display lists http://www.songho.ca/opengl/gl_displaylist.html

Logged

Dacke
Level 10
*****



View Profile
« Reply #333 on: October 09, 2015, 07:49:15 AM »

welp, sounds like it definitely does depend on the programmer and their personal preferences after all! i suppose i will leave this decision to whomever we decide to work with. thanks for taking the time to answer, fellas.  Tiger

I think we at least reached a consensus that you shouldn't roll a completely new engine, that always takes forever. Just port the scripts to the new engine OR rewrite the scripts for the new engine OR a mix.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #334 on: October 09, 2015, 11:30:03 AM »

Actually I found a pretty good read on how to use OpenGL completely randomly! Here it is: http://www.glprogramming.com/red/index.html

Also, I did hear about a bunch of libraries that go hand in hand with OpenGL and I will be checking then out.

I guess if I state my intentions with OpenGL it would be easier to help me as well, so I'll do that right now. I want to make a flash-like polygon based 2D game, and I want to use polygons because I'm expecting to use a lot of zooming, rotating and resizing in general. I guess building it from the ground up isn't the greatest idea ever, but I'm genuinely interested in the process of hacking at it until it works and implementing my own things as I see fit. Also, I don't have any particular urgency to release the game in a set period of time, so there's that too. Smiley

Also I like skeleton-based animation so I'll be making that as well.
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #335 on: October 09, 2015, 11:32:49 AM »

I'd still say immidiate mode is fine to start BUT if you make a inteface that defines the actual actions you want then switching between GL1 and GL3+ later will just mean writing another implementation of your drawing interface.

So if you define an interface with functions like the following :


void DrawSquare(float,float,float,float)
void DrawTriangle(float,float,float,float,float,float)
etc...

Then you don't have to worry about the underlying api you use. Hell you could even switch from opengl to directX if you wanted to.
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #336 on: October 09, 2015, 11:39:10 AM »

What's the difference between OpenGL and Directx actually? Is it just another graphics API? Also why not both so that I could switch between the two easily?

Also yeah, I'll probably make like a library or something so that I don't have to re-program everything for every project. This is gonna be a fun ride, I can feel it!
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #337 on: October 09, 2015, 11:53:15 AM »

Directx only works on microsoft devices. There's a couple platforms like the xbox console that only work with directx.

Generally I'd say just use opengl for now.
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #338 on: October 09, 2015, 12:31:25 PM »

So I have a question I'm not sure how to formulate it clearly:

I want a random shuffling such as:
- for an ordered list of size n
- I want access members of that list in a disorder in 0(1)
- from any index
- with all members only access once, once all members have been picked

Or maybe I should express it that way

I want a random sampling such
- for a list of size n
- all samples are uniquely referenced by a single index
- such as for an ordered index, all samples are picked disorderly once

for example let say you have:
- an ordered and continuous range of number starting from 1 (1,2,3,4,5)
- all number taken as index reference themselves (1=1, 2=2, 3=3, 4=4, 5=5)
- what I want is that the list is picked in disorder (4,5,2,1,3)
- that is all the indexes reference another (1=4, 2=5, 3=2, 4=1, 5=3)
- but in O(1) instead of O(n) so when querying (2) I get (5) without having to go through the list.
>>> I could sort the list from order to disorder first, cache that and then use it later to access member, but that's where there is a problem, it's for potentially almost infinite procedural list of variable interval and to which only a range of interval could be known at some moment,so it has to be consistent for the entire range without knowing te range. I need "locality" ie context independent generation.

My intuition is saying me that is a sort of hashing problem.
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #339 on: October 09, 2015, 01:45:51 PM »

I'm not sure I understand, but to my understanding here's what I'd do:

If I have an array of elements such as [1,2,3,4,5] and I want them in disorder, I would create a new array of the same size [?,?,?,?,?] and randomly transfer them over to the new array.

For the first number, 1, pick a random number from 1 to n where n is the size of the array, here it would be 5. that number is now the position of 1 in the new array. lets say we rolled a 4.

old [1,2,3,4,5]
new [?,?,?,1,?]

Then, since there are only four spaces left in the second array, you would this time roll a number from 1 to n - m, where m is the amount of values already transferred over to the new array (easily trackable with a for loop or something). In this case you roll a number from 1 to 4, since one of the spaces is already occupied by the 1 from the first step. lets say you roll a 2, this is what your arrays would look like.

old [1,2,3,4,5]
new [?,2,?,1,?]

And you keep going like this until you went through your original array and all your values have been transferred over to the new one. you now have a randomly disorganized array from an ordered one! You can of course manipulate the randomness so that you don't accidentally generate an array with similar values to the old one, but that's something I think you can figure out on your own. Hope my humble explanation helps! Smiley
Logged

Pages: 1 ... 15 16 [17] 18 19 ... 69
Print
Jump to:  

Theme orange-lt created by panic