• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 22:01
CEST 04:01
KST 11:01
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun12[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists22[ASL21] Ro16 Preview Pt1: Fresh Flow9
Community News
Code S Season 1 (2026) - RO12 Results02026 GSL Season 1 Qualifiers25Maestros of the Game 2 announced92026 GSL Tour plans announced15Weekly Cups (April 6-12): herO doubles, "Villains" prevail1
StarCraft 2
General
Code S Season 1 (2026) - RO12 Results Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun Team Liquid Map Contest #22 - The Finalists Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool MaNa leaves Team Liquid
Tourneys
RSL Revival: Season 5 - Qualifiers and Main Event GSL Code S Season 1 (2026) SC2 INu's Battles#15 <BO.9 2Matches> WardiTV Spring Cup SEL Masters #6 - Solar vs Classic (SC: Evo)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base Mutation # 521 Memorable Boss
Brood War
General
[BSL22] RO16 Group A - Sunday 21:00 CEST [BSL22] RO16 Group B - Saturday 21:00 CEST Pros React To: Leta vs Tulbo (ASL S21, Ro.8) RepMastered™: replay sharing and analyzer site BW General Discussion
Tourneys
Escore Tournament StarCraft Season 2 [BSL22] RO16 Group Stage - 02 - 10 May [Megathread] Daily Proleagues [ASL21] Ro8 Day 2
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Daigo vs Menard Best of 10 Stormgate/Frost Giant Megathread Nintendo Switch Thread Dawn of War IV Diablo IV
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread Russo-Ukrainian War Thread 3D technology/software discussion Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Formula 1 Discussion
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Sexual Health Of Gamers
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1697 users

The Big Programming Thread - Page 440

Forum Index > General Forum
Post a Reply
Prev 1 438 439 440 441 442 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
February 08 2014 22:54 GMT
#8781
@tofu that's one of my favourite posts on SE

alsooo, i just hit 300+ karma in SO

8D
There is no one like you in the universe.
bangsholt
Profile Joined June 2011
Denmark138 Posts
February 08 2014 23:05 GMT
#8782
On February 08 2014 11:30 darkness wrote:
Quick question on C++, is this link a good place to learn C++ basics from? Also, how transferable are my skills from Java and Objective-C for C++? I've used a little bit of basic C, too - stdlib.h (realloc, memset, malloc, free, exit), stdio.h, string.h and math.h.


You seem to be very obsessed with different languages all the time - learn how to program well in one language, once you think that you are capable of that (and if you think you are capable in less than a year - you probably aren't...) then you can move on to the point where you know, what and how to do it. Then it's a question of learning the syntax, because you know the principles of how to do what you want to accomplish.

What language you pick is utterly irrelevant - pick something and stick with it.
meatpudding
Profile Joined March 2011
Australia520 Posts
February 09 2014 00:53 GMT
#8783
On February 09 2014 05:04 one-one-one wrote:
Show nested quote +
On February 09 2014 00:55 BisuDagger wrote:
On February 08 2014 14:16 Rollin wrote:
On February 08 2014 03:45 BisuDagger wrote:
On February 08 2014 02:47 RoyGBiv_13 wrote:
On February 08 2014 02:39 BisuDagger wrote:
Every time I see this thread title I think we should put a project on SVN and give everyone access. Then we can all just jump in and add to the game whenever we have free time. C++ of course (my preference) and built from the ground up. I'd totally put together a frame for a game to jump start this.


Yeah, I'm down. We can collaborate on #tl.code.

I haven't done game dev for some time, but I can help with the lower level modules.


I think I'm going to follow through with this over the next week or two I'll put something together. The simplest style for an open source game is to make it open world. So i'll create a basic open world with directX graphics and setup a camera. From there anyone can literally add whatever the want to it. Physics, graphics, sound, a roaming dragon, anything lol. I'll give updates once I can open this to TL.

Just curious, why no opengl for linux/mac? Do you intend to use OS specific functionality (or keep that option open), hence directx over opengl?

DirectX is way more friendly for newer people imo. I don't want to spend time developing ogl tools.


For a collaborate project like this I would highly recommend that you use open standards and not proprietary stuff like DirectX. If you don't you make the project X86, Windows-only excluding people using Mac or Linux.
Also, if you want to run it on any non-windows platform you will not be able to unless you go for OpenGL.

Projects and products based on open standards are inherently superior to single platform proprietary crap from Microsoft.

The only place where Microsoft is still relevant is the Desktop, but tablets, chromebooks and similar devices will start eating into their 90% market share pretty soon.

I believe that learning OpenGL is a superior choice for young people interested in making games.

You should check out the SteamOS project from valve and try to do something cool with that.




Just to throw in my 2c. DirectX is fine and all, but it still takes a little while to learn, especially for newcomers to c++. MSDN is a great resource and there are heaps of tutorials online. But, mac and linux users will be left out.

When I was developing the updated SC2 map analyser, I started with DirectX graphics, but ended up having to rewrite in opengl due to popular demand. Eventually I switched to using the SDL library, and it's really sweet.

I would definitely reccomend SDL due to it's power, simplicity, licensing and platform support.
Be excellent to each other.
Manit0u
Profile Blog Joined August 2004
Poland17740 Posts
Last Edited: 2014-02-09 01:24:44
February 09 2014 01:22 GMT
#8784
Do you guys know if it's possible to get a hold of AMD's Mantle API? All they ever mention is "look how awesome this is" and all the reviews say that "it's awesome for low-end CPUs" etc. etc. but nowhere can you find a documentation for it or anything that would let you see how hard it is to actually use it, what do they exactly mean by "cross-platform" and how would you implement it in various programming languages...

From what I gather, it's a "step back" when it comes to GPU API, that gets you closer to the hardware and all that jazz.

P. S.

Also, meatpudding might be on the right track here. Some of the games using SDL do look and work amazing (0 a.d., Battle for Wesnoth, Trine).
Time is precious. Waste it wisely.
Zocat
Profile Joined April 2010
Germany2229 Posts
Last Edited: 2014-02-09 01:40:32
February 09 2014 01:39 GMT
#8785
From here: http://support.amd.com/en-us/kb-articles/Pages/mantle-faq.aspx#189

"When does AMD intend to release a public SDK?

We have not set a final date for releasing a public SDK, but we will provide more information later in 2014.​"
one-one-one
Profile Joined November 2011
Sweden551 Posts
February 09 2014 10:56 GMT
#8786
On February 09 2014 09:53 meatpudding wrote:
Show nested quote +
On February 09 2014 05:04 one-one-one wrote:
On February 09 2014 00:55 BisuDagger wrote:
On February 08 2014 14:16 Rollin wrote:
On February 08 2014 03:45 BisuDagger wrote:
On February 08 2014 02:47 RoyGBiv_13 wrote:
On February 08 2014 02:39 BisuDagger wrote:
Every time I see this thread title I think we should put a project on SVN and give everyone access. Then we can all just jump in and add to the game whenever we have free time. C++ of course (my preference) and built from the ground up. I'd totally put together a frame for a game to jump start this.


Yeah, I'm down. We can collaborate on #tl.code.

I haven't done game dev for some time, but I can help with the lower level modules.


I think I'm going to follow through with this over the next week or two I'll put something together. The simplest style for an open source game is to make it open world. So i'll create a basic open world with directX graphics and setup a camera. From there anyone can literally add whatever the want to it. Physics, graphics, sound, a roaming dragon, anything lol. I'll give updates once I can open this to TL.

Just curious, why no opengl for linux/mac? Do you intend to use OS specific functionality (or keep that option open), hence directx over opengl?

DirectX is way more friendly for newer people imo. I don't want to spend time developing ogl tools.


For a collaborate project like this I would highly recommend that you use open standards and not proprietary stuff like DirectX. If you don't you make the project X86, Windows-only excluding people using Mac or Linux.
Also, if you want to run it on any non-windows platform you will not be able to unless you go for OpenGL.

Projects and products based on open standards are inherently superior to single platform proprietary crap from Microsoft.

The only place where Microsoft is still relevant is the Desktop, but tablets, chromebooks and similar devices will start eating into their 90% market share pretty soon.

I believe that learning OpenGL is a superior choice for young people interested in making games.

You should check out the SteamOS project from valve and try to do something cool with that.




Just to throw in my 2c. DirectX is fine and all, but it still takes a little while to learn, especially for newcomers to c++. MSDN is a great resource and there are heaps of tutorials online. But, mac and linux users will be left out.

When I was developing the updated SC2 map analyser, I started with DirectX graphics, but ended up having to rewrite in opengl due to popular demand. Eventually I switched to using the SDL library, and it's really sweet.

I would definitely reccomend SDL due to it's power, simplicity, licensing and platform support.


That is a very good idea.

You also mention the other point, that if you want your software to run on a mac, tablet or smartphone, you need to use OpenGL anyways. I think that it is more likely that this will become a problem than the fact that you are excluding non-windows users in the development process.

http://www.youtube.com/watch?feature=player_embedded&v=1BFY4R7IIP4#t=1710s
Rollin
Profile Joined March 2011
Australia1552 Posts
February 09 2014 11:44 GMT
#8787
Well the issue with going multiplatform and building "from the ground up" is that each platform you want to target is going to need OS specific code, for input handling, audio, etc. In that regard, directx mightn't be a bad idea, or a low level library like allegro/sdl/sfml could be used to avoid the OS specific boilerplate code.
Throw off those chains of reason, and your prison disappears. | Check your posting frequency timeline: http://www.teamliquid.net/mytlnet/post_activity_img.php
one-one-one
Profile Joined November 2011
Sweden551 Posts
February 09 2014 11:56 GMT
#8788
On February 09 2014 20:44 Rollin wrote:
Well the issue with going multiplatform and building "from the ground up" is that each platform you want to target is going to need OS specific code, for input handling, audio, etc. In that regard, directx mightn't be a bad idea, or a low level library like allegro/sdl/sfml could be used to avoid the OS specific boilerplate code.


Well. The guy above specifically mentioned that he had to transition from DirectX to SDL due to popular demand of his program to run on Mac (and Linux?). So there is a success story for you.
SDL is cross platform and will take care of graphics (GL) , input and audio. So no OS specific code is needed for that. You would need different build options for each platform depending on which compiler you use etc.

So what is the point of your post?

http://www.youtube.com/watch?feature=player_embedded&v=1BFY4R7IIP4#t=1710s
Rollin
Profile Joined March 2011
Australia1552 Posts
Last Edited: 2014-02-09 15:16:43
February 09 2014 15:15 GMT
#8789
On February 09 2014 20:56 one-one-one wrote:
Show nested quote +
On February 09 2014 20:44 Rollin wrote:
Well the issue with going multiplatform and building "from the ground up" is that each platform you want to target is going to need OS specific code, for input handling, audio, etc. In that regard, directx mightn't be a bad idea, or a low level library like allegro/sdl/sfml could be used to avoid the OS specific boilerplate code.


Well. The guy above specifically mentioned that he had to transition from DirectX to SDL due to popular demand of his program to run on Mac (and Linux?). So there is a success story for you.
SDL is cross platform and will take care of graphics (GL) , input and audio. So no OS specific code is needed for that. You would need different build options for each platform depending on which compiler you use etc.

So what is the point of your post?


Let's see what BisuDagger said:
+ Show Spoiler +
On February 08 2014 03:45 BisuDagger wrote:
Show nested quote +
On February 08 2014 02:47 RoyGBiv_13 wrote:
On February 08 2014 02:39 BisuDagger wrote:
Every time I see this thread title I think we should put a project on SVN and give everyone access. Then we can all just jump in and add to the game whenever we have free time. C++ of course (my preference) and built from the ground up. I'd totally put together a frame for a game to jump start this.


Yeah, I'm down. We can collaborate on #tl.code.

I haven't done game dev for some time, but I can help with the lower level modules.



I think I'm going to follow through with this over the next week or two I'll put something together. The simplest style for an open source game is to make it open world. So i'll create a basic open world with directX graphics and setup a camera. From there anyone can literally add whatever the want to it. Physics, graphics, sound, a roaming dragon, anything lol. I'll give updates once I can open this to TL.

On February 09 2014 00:55 BisuDagger wrote:
Show nested quote +
On February 08 2014 14:16 Rollin wrote:
On February 08 2014 03:45 BisuDagger wrote:
On February 08 2014 02:47 RoyGBiv_13 wrote:
On February 08 2014 02:39 BisuDagger wrote:
Every time I see this thread title I think we should put a project on SVN and give everyone access. Then we can all just jump in and add to the game whenever we have free time. C++ of course (my preference) and built from the ground up. I'd totally put together a frame for a game to jump start this.


Yeah, I'm down. We can collaborate on #tl.code.

I haven't done game dev for some time, but I can help with the lower level modules.


I think I'm going to follow through with this over the next week or two I'll put something together. The simplest style for an open source game is to make it open world. So i'll create a basic open world with directX graphics and setup a camera. From there anyone can literally add whatever the want to it. Physics, graphics, sound, a roaming dragon, anything lol. I'll give updates once I can open this to TL.

Just curious, why no opengl for linux/mac? Do you intend to use OS specific functionality (or keep that option open), hence directx over opengl?

DirectX is way more friendly for newer people imo. I don't want to spend time developing ogl tools.

On February 09 2014 05:27 BisuDagger wrote:
I hear your points. As a games developer Windows has always been first choice as a the platform for development. I understand Linux has become far more popular over the past few years and if the belief is I'll be isolating a lot of interested developers on teamliquid then I will have no choice but to use OGL. So I will go ahead and setup ogl instead of being stubborn.


There is no mention of any library used other than raw opengl, bisudagger says he wants to do it "from the ground up", and roygbiv says he's willing to help out with "low level stuff". None of this hints at wanting to use a slightly more abstracted library like sdl, even with raw opengl underneath.

So what is the point of your post?
Throw off those chains of reason, and your prison disappears. | Check your posting frequency timeline: http://www.teamliquid.net/mytlnet/post_activity_img.php
one-one-one
Profile Joined November 2011
Sweden551 Posts
February 09 2014 15:29 GMT
#8790
On February 10 2014 00:15 Rollin wrote:
Show nested quote +
On February 09 2014 20:56 one-one-one wrote:
On February 09 2014 20:44 Rollin wrote:
Well the issue with going multiplatform and building "from the ground up" is that each platform you want to target is going to need OS specific code, for input handling, audio, etc. In that regard, directx mightn't be a bad idea, or a low level library like allegro/sdl/sfml could be used to avoid the OS specific boilerplate code.


Well. The guy above specifically mentioned that he had to transition from DirectX to SDL due to popular demand of his program to run on Mac (and Linux?). So there is a success story for you.
SDL is cross platform and will take care of graphics (GL) , input and audio. So no OS specific code is needed for that. You would need different build options for each platform depending on which compiler you use etc.

So what is the point of your post?


Let's see what BisuDagger said:
+ Show Spoiler +
On February 08 2014 03:45 BisuDagger wrote:
Show nested quote +
On February 08 2014 02:47 RoyGBiv_13 wrote:
On February 08 2014 02:39 BisuDagger wrote:
Every time I see this thread title I think we should put a project on SVN and give everyone access. Then we can all just jump in and add to the game whenever we have free time. C++ of course (my preference) and built from the ground up. I'd totally put together a frame for a game to jump start this.


Yeah, I'm down. We can collaborate on #tl.code.

I haven't done game dev for some time, but I can help with the lower level modules.



I think I'm going to follow through with this over the next week or two I'll put something together. The simplest style for an open source game is to make it open world. So i'll create a basic open world with directX graphics and setup a camera. From there anyone can literally add whatever the want to it. Physics, graphics, sound, a roaming dragon, anything lol. I'll give updates once I can open this to TL.

On February 09 2014 00:55 BisuDagger wrote:
Show nested quote +
On February 08 2014 14:16 Rollin wrote:
On February 08 2014 03:45 BisuDagger wrote:
On February 08 2014 02:47 RoyGBiv_13 wrote:
On February 08 2014 02:39 BisuDagger wrote:
Every time I see this thread title I think we should put a project on SVN and give everyone access. Then we can all just jump in and add to the game whenever we have free time. C++ of course (my preference) and built from the ground up. I'd totally put together a frame for a game to jump start this.


Yeah, I'm down. We can collaborate on #tl.code.

I haven't done game dev for some time, but I can help with the lower level modules.


I think I'm going to follow through with this over the next week or two I'll put something together. The simplest style for an open source game is to make it open world. So i'll create a basic open world with directX graphics and setup a camera. From there anyone can literally add whatever the want to it. Physics, graphics, sound, a roaming dragon, anything lol. I'll give updates once I can open this to TL.

Just curious, why no opengl for linux/mac? Do you intend to use OS specific functionality (or keep that option open), hence directx over opengl?

DirectX is way more friendly for newer people imo. I don't want to spend time developing ogl tools.

On February 09 2014 05:27 BisuDagger wrote:
I hear your points. As a games developer Windows has always been first choice as a the platform for development. I understand Linux has become far more popular over the past few years and if the belief is I'll be isolating a lot of interested developers on teamliquid then I will have no choice but to use OGL. So I will go ahead and setup ogl instead of being stubborn.


There is no mention of any library used other than raw opengl, bisudagger says he wants to do it "from the ground up", and roygbiv says he's willing to help out with "low level stuff". None of this hints at wanting to use a slightly more abstracted library like sdl, even with raw opengl underneath.

So what is the point of your post?


Are you drunk?

You asked them yourself about the whole DirectX vs OpenGL thing. It is even included in the nested quotes above.

Ok, I get that it is probably in the middle of the night in Australia, but programming should not be discussed under the influence of alcohol.
http://www.youtube.com/watch?feature=player_embedded&v=1BFY4R7IIP4#t=1710s
Uberrated
Profile Joined September 2010
Norway9 Posts
February 09 2014 17:43 GMT
#8791
You guys should consider Libgdx. It's java, but runs on all platforms (even HTML5), and solves all problems with input abstractions ect. It comes bundled with a sick implementation of Box2d for added awesome.
Rollin
Profile Joined March 2011
Australia1552 Posts
February 09 2014 19:41 GMT
#8792
On February 10 2014 00:29 one-one-one wrote:
Show nested quote +
On February 10 2014 00:15 Rollin wrote:
On February 09 2014 20:56 one-one-one wrote:
On February 09 2014 20:44 Rollin wrote:
Well the issue with going multiplatform and building "from the ground up" is that each platform you want to target is going to need OS specific code, for input handling, audio, etc. In that regard, directx mightn't be a bad idea, or a low level library like allegro/sdl/sfml could be used to avoid the OS specific boilerplate code.


Well. The guy above specifically mentioned that he had to transition from DirectX to SDL due to popular demand of his program to run on Mac (and Linux?). So there is a success story for you.
SDL is cross platform and will take care of graphics (GL) , input and audio. So no OS specific code is needed for that. You would need different build options for each platform depending on which compiler you use etc.

So what is the point of your post?


Let's see what BisuDagger said:
+ Show Spoiler +
On February 08 2014 03:45 BisuDagger wrote:
Show nested quote +
On February 08 2014 02:47 RoyGBiv_13 wrote:
On February 08 2014 02:39 BisuDagger wrote:
Every time I see this thread title I think we should put a project on SVN and give everyone access. Then we can all just jump in and add to the game whenever we have free time. C++ of course (my preference) and built from the ground up. I'd totally put together a frame for a game to jump start this.


Yeah, I'm down. We can collaborate on #tl.code.

I haven't done game dev for some time, but I can help with the lower level modules.



I think I'm going to follow through with this over the next week or two I'll put something together. The simplest style for an open source game is to make it open world. So i'll create a basic open world with directX graphics and setup a camera. From there anyone can literally add whatever the want to it. Physics, graphics, sound, a roaming dragon, anything lol. I'll give updates once I can open this to TL.

On February 09 2014 00:55 BisuDagger wrote:
Show nested quote +
On February 08 2014 14:16 Rollin wrote:
On February 08 2014 03:45 BisuDagger wrote:
On February 08 2014 02:47 RoyGBiv_13 wrote:
On February 08 2014 02:39 BisuDagger wrote:
Every time I see this thread title I think we should put a project on SVN and give everyone access. Then we can all just jump in and add to the game whenever we have free time. C++ of course (my preference) and built from the ground up. I'd totally put together a frame for a game to jump start this.


Yeah, I'm down. We can collaborate on #tl.code.

I haven't done game dev for some time, but I can help with the lower level modules.


I think I'm going to follow through with this over the next week or two I'll put something together. The simplest style for an open source game is to make it open world. So i'll create a basic open world with directX graphics and setup a camera. From there anyone can literally add whatever the want to it. Physics, graphics, sound, a roaming dragon, anything lol. I'll give updates once I can open this to TL.

Just curious, why no opengl for linux/mac? Do you intend to use OS specific functionality (or keep that option open), hence directx over opengl?

DirectX is way more friendly for newer people imo. I don't want to spend time developing ogl tools.

On February 09 2014 05:27 BisuDagger wrote:
I hear your points. As a games developer Windows has always been first choice as a the platform for development. I understand Linux has become far more popular over the past few years and if the belief is I'll be isolating a lot of interested developers on teamliquid then I will have no choice but to use OGL. So I will go ahead and setup ogl instead of being stubborn.


There is no mention of any library used other than raw opengl, bisudagger says he wants to do it "from the ground up", and roygbiv says he's willing to help out with "low level stuff". None of this hints at wanting to use a slightly more abstracted library like sdl, even with raw opengl underneath.

So what is the point of your post?


Are you drunk?

You asked them yourself about the whole DirectX vs OpenGL thing. It is even included in the nested quotes above.

Ok, I get that it is probably in the middle of the night in Australia, but programming should not be discussed under the influence of alcohol.

Thanks for the pointless insults. You still haven't shown me any evidence that an opengl wrapping library was to be used at all. Or maybe you have and I just lack the basic intelligence required to decipher your seemingly nonsensical replies?
Throw off those chains of reason, and your prison disappears. | Check your posting frequency timeline: http://www.teamliquid.net/mytlnet/post_activity_img.php
tofucake
Profile Blog Joined October 2009
Hyrule19210 Posts
February 09 2014 20:35 GMT
#8793
keep it civil, people
Liquipediaasante sana squash banana
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2014-02-10 00:56:33
February 10 2014 00:55 GMT
#8794
How do you guys make a deep copy of an object in Java? I've done a bit of Google, and I've learnt that object.clone() is bad unless you just clone a primitive data type (Effective Java book as an argument). I've read about 2 other solutions - copy constructor and serialisation. Which one do you prefer and why? I feel like the copy constructor approach has so much code duplication (well, attributes are redefined) if I've understood the knack of it.
sluggaslamoo
Profile Blog Joined November 2009
Australia4494 Posts
Last Edited: 2014-02-10 02:51:44
February 10 2014 02:42 GMT
#8795
On February 10 2014 04:41 Rollin wrote:
Show nested quote +
On February 10 2014 00:29 one-one-one wrote:
On February 10 2014 00:15 Rollin wrote:
On February 09 2014 20:56 one-one-one wrote:
On February 09 2014 20:44 Rollin wrote:
Well the issue with going multiplatform and building "from the ground up" is that each platform you want to target is going to need OS specific code, for input handling, audio, etc. In that regard, directx mightn't be a bad idea, or a low level library like allegro/sdl/sfml could be used to avoid the OS specific boilerplate code.


Well. The guy above specifically mentioned that he had to transition from DirectX to SDL due to popular demand of his program to run on Mac (and Linux?). So there is a success story for you.
SDL is cross platform and will take care of graphics (GL) , input and audio. So no OS specific code is needed for that. You would need different build options for each platform depending on which compiler you use etc.

So what is the point of your post?


Let's see what BisuDagger said:
+ Show Spoiler +
On February 08 2014 03:45 BisuDagger wrote:
Show nested quote +
On February 08 2014 02:47 RoyGBiv_13 wrote:
On February 08 2014 02:39 BisuDagger wrote:
Every time I see this thread title I think we should put a project on SVN and give everyone access. Then we can all just jump in and add to the game whenever we have free time. C++ of course (my preference) and built from the ground up. I'd totally put together a frame for a game to jump start this.


Yeah, I'm down. We can collaborate on #tl.code.

I haven't done game dev for some time, but I can help with the lower level modules.



I think I'm going to follow through with this over the next week or two I'll put something together. The simplest style for an open source game is to make it open world. So i'll create a basic open world with directX graphics and setup a camera. From there anyone can literally add whatever the want to it. Physics, graphics, sound, a roaming dragon, anything lol. I'll give updates once I can open this to TL.

On February 09 2014 00:55 BisuDagger wrote:
Show nested quote +
On February 08 2014 14:16 Rollin wrote:
On February 08 2014 03:45 BisuDagger wrote:
On February 08 2014 02:47 RoyGBiv_13 wrote:
On February 08 2014 02:39 BisuDagger wrote:
Every time I see this thread title I think we should put a project on SVN and give everyone access. Then we can all just jump in and add to the game whenever we have free time. C++ of course (my preference) and built from the ground up. I'd totally put together a frame for a game to jump start this.


Yeah, I'm down. We can collaborate on #tl.code.

I haven't done game dev for some time, but I can help with the lower level modules.


I think I'm going to follow through with this over the next week or two I'll put something together. The simplest style for an open source game is to make it open world. So i'll create a basic open world with directX graphics and setup a camera. From there anyone can literally add whatever the want to it. Physics, graphics, sound, a roaming dragon, anything lol. I'll give updates once I can open this to TL.

Just curious, why no opengl for linux/mac? Do you intend to use OS specific functionality (or keep that option open), hence directx over opengl?

DirectX is way more friendly for newer people imo. I don't want to spend time developing ogl tools.

On February 09 2014 05:27 BisuDagger wrote:
I hear your points. As a games developer Windows has always been first choice as a the platform for development. I understand Linux has become far more popular over the past few years and if the belief is I'll be isolating a lot of interested developers on teamliquid then I will have no choice but to use OGL. So I will go ahead and setup ogl instead of being stubborn.


There is no mention of any library used other than raw opengl, bisudagger says he wants to do it "from the ground up", and roygbiv says he's willing to help out with "low level stuff". None of this hints at wanting to use a slightly more abstracted library like sdl, even with raw opengl underneath.

So what is the point of your post?


Are you drunk?

You asked them yourself about the whole DirectX vs OpenGL thing. It is even included in the nested quotes above.

Ok, I get that it is probably in the middle of the night in Australia, but programming should not be discussed under the influence of alcohol.

Thanks for the pointless insults. You still haven't shown me any evidence that an opengl wrapping library was to be used at all. Or maybe you have and I just lack the basic intelligence required to decipher your seemingly nonsensical replies?


I think this is assumed. Regardless its not that hard to do everything from scratch when it concerns OpenGL or DirectX, I prefer to do "raw" OpenGL for 2.5D projects but even 3D is not that big of a deal.

The main reason I don't do raw OpenGL for 3d projects is not so much the code but the authoring tools, like scene editors, which allow me to view 3d models and know exactly how they will appear in game. There's no point reinventing the wheel for tools such as these.

If boilerplate is an issue then DirectX is a bad idea, DirectX has a TON of boilerplate and setup. OpenGL is much much simpler to get started on. OS specific boilerplate really isn't a major concern, and many simple 3D libraries do not really help with this, such as SDL or SFML.

Also are you saying that DirectX is better because we do not have to address OS specific boilerplate (because it only supports Windows)? If so it seems like a really strange solution, you could do the same thing with OpenGL by only supporting Windows. Regardless you will always have significantly less boilerplate in OpenGL except for very large projects (and I'm talking AAA title projects here).

This is because you don't have to do anything to get cross-platformability with OpenGL except for very advanced features. Graphics cards are a much greater problem when it comes to this, not OS's.

Although I'm going to go out on a limb here and say that this project will barely get off the ground. Focusing on such issues is very immature when you don't even know what it is you are actually making, MVP is the most important thing right now.
Come play Android Netrunner - http://www.teamliquid.net/forum/viewmessage.php?topic_id=409008
PaiNt)
Profile Joined June 2009
United States38 Posts
February 10 2014 03:59 GMT
#8796
Hey guys, not sure if this is something I should be posting here... but oh well . I recently released my first game for Android and it would be cool if tried it out. It's one of the many geometry wars clones out there, but I figured it was a simple game that would be a good starting point for me. I'm still making some improvements, but the core game play is all there. If you have any feedback I'm definitely open to it.

https://play.google.com/store/apps/details?id=com.hsoft.spaceshapes
dapierow
Profile Blog Joined April 2010
Serbia1316 Posts
February 10 2014 06:18 GMT
#8797
Hey guys, been trying to pop a card(class) off my stack(deck) in a java class for the past hour but it will always return the top card, even after Ive popped it off, can anyone help out?


public class Card
{
public static final int JACK = 11;
public static final int QUEEN = 12;
public static final int KING = 13;
public static final int ACE = 14;

public static final int DIAMONDS = 0;
public static final int HEARTS = 1;
public static final int SPADES = 2;
public static final int CLUBS = 3;

public static final int[] SUITSOFCARDS= {DIAMONDS, HEARTS, SPADES ,CLUBS};

public static final int MIN_CARD_VALUE = 2;
public static final int MAX_CARD_VALUE = 14;

public static int value;
public static int suit;

public Card(int valueofCard, int suitofCard)
{
this.value = valueofCard;
this.suit = suitofCard;
}

public int getValueOfCard() { return value; }
public int getSuitOfCard() { return suit; }

private String valueToString()
{
String val= "";

if( value >= MIN_CARD_VALUE && value < JACK )
val += value;
else
{
switch(value)
{
case JACK: val = "Jack"; break;
case QUEEN: val = "Queen"; break;
case KING: val = "King"; break;
case ACE: val = "Ace"; break;
}

}

return val;
}

private String suitToString()
{
String su = "";

switch(suit)
{
case DIAMONDS: su = "Diamonds"; break;
case HEARTS: su = "Hearts"; break;
case CLUBS: su = "Clubs"; break;
case SPADES: su = "Spades"; break;
}

return su;
}

public boolean equals(Card compareToObj )
{
return (value == compareToObj.value ) && ( suit == compareToObj.suit );
}

public String toString()
{
return valueToString() + " of " + suitToString();
}


}



import java.util.*;

public class Deck
{
public Stack<Card> deck;

public Deck()
{
setUpDeck();
}

public void setUpDeck()
{
deck = new Stack<Card>();
for(int suit = 0; suit < Card.SUITSOFCARDS.length; suit++)
{
for(int value=Card.MIN_CARD_VALUE; value <= Card.MAX_CARD_VALUE; value++)
{
Card card = new Card(value, Card.SUITSOFCARDS[suit]);
deck.push(card);
System.out.println("Top Card is: "+deck.peek());
}
}

}

public boolean isEmpty()
{
return deck.isEmpty();
}

public int size()
{
return deck.size();
}

public Card drawCard()
{
return deck.pop();
}

public Card showTopCard()
{
return deck.peek();
}
}




public class Main
{
public static void main(String args[])
{
Main program = new Main();
program.run();

}

public void run()
{
Deck gameDeck = new Deck();

System.out.println("Deck has: " + gameDeck.size() + " Cards");

int count = 0;
while(gameDeck.size()>0)
{
Card card = gameDeck.drawCard();
System.out.println(String.format("[Card %2d]: Drew the %s card.", (++count), card.toString()));

}

System.out.println("Deck is empty.");

}
}



The output works in the setUpDeck class, but in the main, it always returns ACE of CLUBS...
Eat.Sleep.Starcraft 2
Creepseep
Profile Joined July 2012
Germany9 Posts
February 10 2014 06:46 GMT
#8798
On February 10 2014 15:18 dapierow wrote:
Hey guys, been trying to pop a card(class) off my stack(deck) in a java class for the past hour but it will always return the top card, even after Ive popped it off, can anyone help out?

...

The output works in the setUpDeck class, but in the main, it always returns ACE of CLUBS...


Just looked over it for a sec, maybe I'm wrong, but your class variables value and suit should'nt be static in this case.
dapierow
Profile Blog Joined April 2010
Serbia1316 Posts
February 10 2014 06:56 GMT
#8799
On February 10 2014 15:46 Creepseep wrote:
Show nested quote +
On February 10 2014 15:18 dapierow wrote:
Hey guys, been trying to pop a card(class) off my stack(deck) in a java class for the past hour but it will always return the top card, even after Ive popped it off, can anyone help out?

...

The output works in the setUpDeck class, but in the main, it always returns ACE of CLUBS...


Just looked over it for a sec, maybe I'm wrong, but your class variables value and suit should'nt be static in this case.


2 hours of headache... because of that shit... are you fucking kidding me...
that'll teach me to write more than one class without testing it...

Thanks a bunch, ima go cry now for all that wasted time.
Eat.Sleep.Starcraft 2
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
February 10 2014 07:59 GMT
#8800
On February 10 2014 09:55 darkness wrote:
How do you guys make a deep copy of an object in Java? I've done a bit of Google, and I've learnt that object.clone() is bad unless you just clone a primitive data type (Effective Java book as an argument). I've read about 2 other solutions - copy constructor and serialisation. Which one do you prefer and why? I feel like the copy constructor approach has so much code duplication (well, attributes are redefined) if I've understood the knack of it.

This is mostly an assumption on my end, but I would assume that serialization is slower and uses more resources, but requires far less code to do and is more generic. It's quite a lot of work to write a copy constructor for each object you need to deep copy, but then again, it's just basic object initialization where as serialization requires a bit more intermediate steps.

Then again, I could be wrong and serialization might be very optimized in Java.

I would go with the serialization approach unless it's really simple objects.
Prev 1 438 439 440 441 442 1032 Next
Please log in or register to reply.
Live Events Refresh
Replay Cast
00:00
2026 GSL S1: Ro12 Group A
CranKy Ducklings109
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 144
PiGStarcraft114
ProTech102
PattyMac 5
StarCraft: Brood War
NaDa 23
Dota 2
monkeys_forever836
League of Legends
Doublelift3914
Counter-Strike
fl0m4144
taco 664
Super Smash Bros
C9.Mang0342
Other Games
summit1g7198
tarik_tv5023
JimRising 372
WinterStarcraft326
ViBE65
amsayoshi38
Organizations
Other Games
gamesdonequick664
BasetradeTV151
Dota 2
PGL Dota 2 - Main Stream65
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 11 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• Scarra1218
Upcoming Events
Replay Cast
6h 59m
RSL Revival
7h 59m
Classic vs GgMaChine
Rogue vs Maru
WardiTV Invitational
8h 59m
Percival vs Shameless
ByuN vs YoungYakov
IPSL
13h 59m
Ret vs Art_Of_Turtle
Radley vs TBD
BSL
16h 59m
Replay Cast
21h 59m
RSL Revival
1d 7h
herO vs TriGGeR
NightMare vs Solar
uThermal 2v2 Circuit
1d 11h
BSL
1d 16h
IPSL
1d 16h
eOnzErG vs TBD
G5 vs Nesh
[ Show More ]
Patches Events
1d 21h
Replay Cast
2 days
Wardi Open
2 days
Afreeca Starleague
2 days
Jaedong vs Light
Monday Night Weeklies
2 days
Replay Cast
2 days
Sparkling Tuna Cup
3 days
Afreeca Starleague
3 days
Snow vs Flash
WardiTV Invitational
3 days
GSL
4 days
Classic vs Cure
Maru vs Rogue
GSL
5 days
SHIN vs Zoun
ByuN vs herO
Replay Cast
5 days
Escore
6 days
The PondCast
6 days
WardiTV Invitational
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Escore Tournament S2: W5
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
KK 2v2 League Season 1
Acropolis #4
SCTL 2026 Spring
RSL Revival: Season 5
2026 GSL S1
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.